blob: f5c0c0236c1d4b36986c2897c3e7b0ad4a53d2da [file] [log] [blame]
@GenModel(fileExtensions="chart")
@GenModel(modelName="ChartDSL")
@GenModel(prefix="ChartDSL")
// force bigModel == false
@GenModel(loadInitialization="false")
@GenModel(literalsInterface="true")
@GenModel(copyrightText="Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License 2.0
which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-2.0/
SPDX-License-Identifier: EPL-2.0
Based on ideas from Xtext, Xtend, Xcore
Contributors:
Joerg Riegel - Initial implementation
")
@Ecore(nsURI="http://osbp.eclipse.org/xtext/chart/ChartDSL")
@Ecore(nsPrefix="chartdsl")
@Ecore(rootPackage="chartdsl")
package org.eclipse.osbp.xtext.chart
import org.eclipse.osbp.xtext.datamartdsl.DatamartAxis
import org.eclipse.osbp.xtext.datamartdsl.DatamartDefinition
import org.eclipse.emf.ecore.EObject
import org.eclipse.emf.ecore.InternalEObject
import org.eclipse.osbp.dsl.semantic.common.types.LPackage
import org.eclipse.osbp.xtext.oxtype.resource.EcoreUtil3
import org.eclipse.xtext.xtype.XImportSection
import org.eclipse.osbp.xtext.action.ActionToolbar
class ChartModel {
contains XImportSection importSection
contains ChartPackage[] packages
}
type InternalEObject wraps InternalEObject
class ChartLazyResolver {
op EObject eResolveProxy(InternalEObject proxy) {
return EcoreUtil3.resolve(proxy, this.eResource().resourceSet);
}
}
class ChartBase extends ChartLazyResolver{
String name
}
class ChartPackage extends LPackage{
boolean hasColors
contains SeriesColor[] colors
CanvasFontFamilyEnum defaultFontFamily
contains Chart[] charts
}
class SeriesColor extends ChartLazyResolver{
String rgb
}
class TextColor extends ChartLazyResolver{
String rgb
}
class Chart extends ChartBase{
boolean selectById
boolean description
String descriptionValue
contains ChartOption charttype
contains ChartDatamart source
refers ActionToolbar toolbar
}
interface ChartOption extends ChartLazyResolver{}
class ChartBar extends ChartOption {
boolean shadow
boolean animated
boolean swapped
boolean stacked
}
class ChartLine extends ChartOption {
boolean animated
boolean showMarker
boolean trendLine
boolean zoom
boolean cursor
boolean tooltip
boolean fillToZero
boolean fillArea
}
class ChartPie extends ChartOption {
boolean empty
}
class ChartDonut extends ChartOption {
}
class ChartBubble extends ChartOption {
boolean multiplier
String multiplierValue
boolean gradient
boolean transparent
}
class ChartGauge extends ChartOption {
boolean labeled
String labelValue
boolean hasTicks
int minValue
int maxValue
boolean hasIntervals
contains ChartInterval[] intervals
}
class ChartTree extends ChartOption {
boolean map
boolean collapsible
}
interface ChartInterval extends ChartLazyResolver {}
class ChartNumberInterval extends ChartInterval {
int numberIntervalValue
contains ChartRangeElement numberRange
}
class ChartDatamart extends ChartLazyResolver {
refers DatamartDefinition datamartRef
contains ChartElement[] elements
}
interface ChartElement extends ChartLazyResolver{}
class ChartLegend extends ChartElement {
boolean noLegend
LegendPlacementEnum placement
boolean toggle
boolean replot
ToggleTypeEnum toggleType
int fontSize
String textColor
}
class ChartHighlighter extends ChartElement {
TooltipLocationEnum location
boolean tooltipAlways
boolean insideChart
}
class ChartAxis extends ChartElement {
refers DatamartAxis axis
RenderTypeEnum renderType
boolean shortLabel
int labelAngle
int labelFontSize
String labelTextColor
int tickAngle
int tickFontSize
String tickTextColor
}
interface ChartRangeElement extends ChartLazyResolver {}
class ChartSegmentColor extends ChartRangeElement {
String rgb
}
enum LegendPlacementEnum{
INSIDE as 'inside'
INSIDE_GRID as 'inside-grid'
OUTSIDE as 'outside'
OUTSIDE_GRID as 'outside-grid'
}
enum ToggleTypeEnum{
NORMAL as 'normal'
SLOW as 'slow'
FAST as 'fast'
}
enum TooltipLocationEnum{
NORTH as 'north'
NORTH_EAST as 'north-east'
EAST as 'east'
SOUTH_EAST as 'south-east'
SOUTH as 'south'
SOUTH_WEST as 'south-west'
WEST as 'west'
NORTH_WEST as 'north-west'
}
enum RenderTypeEnum{
CATEGORY as 'category'
LINEAR as 'linear'
DATE as 'date'
LOG as 'logarithmic'
PYRAMID as 'pyramid'
}
enum CanvasFontFamilyEnum{
DEFAULT as 'Default'
ARIAL as 'Arial'
VERDANA as 'Verdana'
TIMESNEWROMAN as 'Times New Roman'
COURIERNEW as 'Courier New'
SERIF as 'serif'
SANSERIF as 'sans-serif'
}