Chart Model Schema Version 0.9

The chart generator operates on the 0.9 version of the chart model which has the following containment hierarchy. This schema defines the format for specifying charts. This is a provisional chart schema.


simple type alignmentType

Description

An enumeration of  alignments

Type

restriction of xs:string

Facets

Enumeration value

Renderer Support

top

SVG, SWT, Static Image

bottom

SVG, SWT, Static Image

left

SVG, SWT, Static Image

right SVG, SWT, Static Image

 

simple type chartType

Description

An enumeration of chart types. Note that “3D” is the effect of adding depth to 2 dimensions.

Type

restriction of xs:string

Facets

Enumeration value

Renderer Support

line

SVG, SWT, Static Image

area SVG, SWT, Static Image

stackedArea

SVG, SWT, Static Image

scatter

SVG, SWT, Static Image

verticalBar SVG, SWT, Static Image
verticalBar3D SVG, SWT, Static Image
verticalStackedBar SVG, SWT, Static Image
verticalStackedBar3D SVG, SWT, Static Image
pie SVG, SWT, Static Image
pie3D SVG, SWT, Static Image
meter SVG, SWT, Static Image

simple type formatType

Description

An enumeration of  label formats.

Type

restriction of xs:string

Facets

Enumeration value

Renderer Support

date

SVG, SWT, Static Image

number

SVG, SWT, Static Image

string

SVG, SWT, Static Image


simple type scaleType

Description

An enumeration of  axis scales.

Type

restriction of xs:string

Facets

Enumeration value

Renderer Support

linear

SVG, SWT, Static Image

log

SVG, SWT, Static Image

complex type TickDefinition

Description

Complex type that defines configuration attributes for tick and grid lines.

Attributes

Name

Type

Required

Default

Description

Renderer Support

value

xs:string

 

 

If value=x, puts a tick mark or grid line at every x units along the axis

SVG, SWT, Static Image

showTick

xs:boolean

 

true

show tick marks

SVG, SWT, Static Image

showGridLine

xs:boolean

 

true

show grid lines.

SVG, SWT, Static Image

Source
<xs:complexType name="tickDefinition">
<xs:attribute name="value" type="xs:string"/>
<xs:attribute name="showTick" type="xs:boolean" default="true"/>
<xs:attribute name="showGridLine" type="xs:boolean" default="true"/>
</xs:complexType>

element chart

Description

 Root element that defines a chart.

Attributes

Name

Type

Required

Default

Description

Renderer Support

backgroundColor

xs:string

 

 

Color for the background

SVG, SWT, Static Image

width

xs:integer

 

 

Maximum chart width in pixels. For SVG rendering, this width is the fixed width.

SVG, SWT, Static Image

height

xs:integer

 

 

Maximum height of graphic in pixels. For SVG rendering, this height is the fixed height.

SVG, SWT, Static Image

minWidth

xs:integer

 

 

Minimum chart width in pixels. Ignored by SVG renderer.

SWT

minHeight

xs:integer

 

 

Minimum height of graphic in pixels. Ignored by SVG renderer.

SWT

Content
sequence
legend{0,1}
chartTitle{0,1}
plotArea{0,1}
Source
<xs:element name="chart">
<xs:complexType>
<xs:sequence>
<xs:element ref="legend" minOccurs="0" maxOccurs="1"/>
<xs:element ref="chartTitle" minOccurs="0" maxOccurs="1"/>
<xs:element ref="plotArea" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="width" type="xs:integer" use="required"/>
<xs:attribute name="minWidth" type="xs:integer" use="required"/>
<xs:attribute name="height" type="xs:integer" use="required"/>
<xs:attribute name="minHeight" type="xs:integer" use="required"/>
<xs:attribute name="backgroundColor" type="xs:string"/>
</xs:complexType>
</xs:element>

element chartTitle

Description

 Section of the chart that configures the title bar.

Attributes

Name

Type

Required

Default

Description

Renderer Support

label

xs:string

 X

 

Title text

SVG, SWT, Static Image

show

xs:boolean

 

true

If true, displays the title text

SVG, SWT, Static Image

Source
<xs:element name="chartTitle">
<xs:complexType>
<xs:attribute name="show" type="xs:boolean" default="true"/>
<xs:attribute name="label" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>

element legend

Description

 Section of the chart that configures the legend.

Attributes

Name

Type

Required

Default

Description

Renderer Support

sizingFactor

xs:integer

 

4

Factor of the overall chart width or height that the legend can occupy.  If legend has a LEFT/RIGHT layout, the  width of the chart is  divided by the factor.. If the legend has a TOP/BOTTOM layout,  the height of the chart is divided by the factor. Note that the factor  must be  greater than 1.

SVG, SWT, Static Image

alignment

alignmentType

 

right

Alignment with respect to the chart

SVG, SWT, Static Image

show xs:boolean   true Sets the visibility of the legend section of the chart. If true the legend section is displayed. SVG, SWT, Static Image

 

Source
<xs:element name="legend">
<xs:complexType>
<xs:attribute name="sizingFactor" type="xs:integer" default="4"/>
<xs:attribute name="alignment" type="alignmentType" default="right"/>
<xs:attribute name="show" type="xs:boolean" default="true"/>
</xs:complexType>
</xs:element>

element plotArea

Description

Section of the chart that displays the data

Attributes

Name

Type

Required

Default

Description

Renderer Support

type

chart Type

X

 

Chart type

SVG, SWT, Static Image

backgroundColor

xs:string

 

 

Background color of the plot area.

SVG, SWT, Static Image

showPercentage

xs:boolean

 

false

Show dataset values as a percentage of the pie

SVG, SWT, Static Image.

showValues

xs:boolean

 

false

Show dataset values

SVG, SWT, Static Image

margin

xs:integer

 

10

Pixel width of margin between legend and plot area

SVG, SWT, Static Image

 

Content
sequence
palettes{0,1}
axes{0,1}
datasets{0,1}
Source
<xs:element name="plotArea">
<xs:complexType>
<xs:sequence>
<xs:element ref="palettes" minOccurs="0" maxOccurs="1"/>
<xs:element ref="axes" minOccurs="0" maxOccurs="1"/>
<xs:element ref="datasets" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="type" type="chartType" use="required"/>
<xs:attribute name="backgroundColor" type="xs:string"/>
<xs:attribute name="showPercentage" type="xs:boolean" default="false"/>
<xs:attribute name="showValues" type="xs:boolean" default="false"/>
<xs:attribute name="margin" type="xs:integer" default="10"/>
</xs:complexType>
</xs:element>

element palettes

Description

Custom sets of colors used to distinguish datasets. Use to replace the default palettes. The default palette is "SEASIDE".

Attributes

Name

Type

Required

Default

Description

Renderer Support

location

xs:string

 

 

Location of the XML definition file of the color palettes which conforms to the palette schema. If the location of the palette definition file is not found, the default palettes will be used.

SVG, SWT, Static Image

paletteSetId

xs:string

 

 

Identifier for the palette set to be used.

SVG, SWT, Static Image

paletteId

xs:string

 

 

Identifier for the palette to be used.

SVG, SWT, Static Image

Source
<xs:element name="palettes">
<xs:complexType>
<xs:attribute name="location" type="xs:string"/>
<xs:attribute name="paletteSetId" type="xs:string"/>
<xs:attribute name="paletteId" type="xs:string"/>
</xs:complexType>
</xs:element>

element categories

Description

Contains a list of category elements.

Content
sequence
category{1,unbounded}
Source
<xs:element name="categories">
<xs:complexType>
<xs:sequence>
<xs:element ref="category" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>

element category

Description

Defines a category.

Attributes

Name

Type

Required

Default

Description

Renderer Support

id

xs:ID

X

 

A unique identifier that identifies a category.

SVG, SWT, Static Image

label

xs:string

 

 

Category text

SVG, SWT, Static Image

Source
<xs:element name="category">
<xs:complexType>
<xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="label" type="xs:string"/>
</xs:complexType>
</xs:element>

element labelFormat

Description

Defines a formatting element for a label. To format a label the type should be specified as either a 'number' or a 'date' value. A formatting pattern can be defined to format the label. For date formats the syntax of the formating pattern is defined by the java.text.SimpleDateFormat class. For number formats the syntax of the formating pattern is defined by the java.text.DecimalFormat.

Attributes

Name

Type

Required

Default

Description

Renderer Support

type

formatType

 X

 

Format the label according to the specified format type

SVG, SWT, Static Image

pattern

xs:string

 

 

Pattern string to use to format the label value..

SVG, SWT, Static Image

Source
<xs:element name="labelFormat">
<xs:complexType>
<xs:attribute name="type" type="formatType" use="required"/>
<xs:attribute name="pattern" type="xs:string"/>
</xs:complexType>
</xs:element>

element axes

Description

Contains a list of axes for the chart.

Content
choice
axis {0, 3}
Source
<xs:element name="axes">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="3">
<xs:element ref="axis"/>
</xs:choice>
</xs:complexType>
</xs:element>

element axis

Description

Chart axis

Attributes

Name

Type

Required

Default

Description

Renderer Support

id

xs:string

X

 

Identifier for the axis

SVG, SWT, Static Image

title

xs:string

 

 

Label

SVG, SWT, Static Image

showTitle

xs:boolean

 

true

Display the axis title

SVG, SWT, Static Image

scale

scaleType

 

linear

Scale type

SVG, SWT, Static Image

min

xs:float

 

 

Minimum value of the axis.

SVG, SWT, Static Image

max

xs:float

 

 

Maximum value of the axis.

SVG, SWT, Static Image

rotateLabels

xs:float

 

0

Rotate axis labels. Currently the supported values are 0, 90 and -90. Additional values may be supported in future releases.

SVG, SWT, Static Image

dataFormatType formatType     Specifies the data type that is used in the coordinate values associated with an axis. One can explicitly set the data type of a coordinate value to a 'number' , 'date' or 'string' SVG, SWT, Static Image

Content
sequence
markerLine{0,unbounded}
categories{0,1}
minorUnit{0,1}
majorUnit{0,1}
labelFormat{0,1}
Source
<xs:element name="axis">
<xs:complexType>
<xs:sequence>
<xs:element ref="markerLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="categories" minOccurs="0" maxOccurs="1"/>
<xs:element name="minorUnit" type="tickDefinition" minOccurs="0" maxOccurs="1"/>
<xs:element name="majorUnit" type="tickDefinition" minOccurs="0" maxOccurs="1"/>
<xs:element ref="labelFormat" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required"/>
<xs:attribute name="title" type="xs:string"/>
<xs:attribute name="scale" type="scaleType" default="linear"/>
<xs:attribute name="min" type="xs:float"/>
<xs:attribute name="max" type="xs:float"/>
<xs:attribute name="rotateLabel" type="xs:float" default="0"/>
<xs:attribute name="dataFormatType" type="formatType" defaul="string"/>
<xs:attribute name="showTitle " type="xs:boolean" default="true"/>
</xs:complexType>
</xs:element>

element majorUnit

Description

Reference values are marked along an axis. A major unit is the value between the reference points. Grid lines for major reference points are solid lines.

Type

tickDefinition

Source
<xs:element name="majorUnit" type="tickDefinition" minOccurs="0" maxOccurs="1"/>

element minorUnit

Description

A minor unit defines the value between finer divisions along the axis. A minor unit value should be less that that of a major unit. Grid lines for minor reference points are dash lines.

Type

tickDefinition

Source
<xs:element name="minorUnit" type="tickDefinition" minOccurs="0" maxOccurs="1"/>

element markerLine

Description

Marks a special value along the axis.

Attributes

Name

Type

Required

Default

Description

Renderer Support

value

xs:string

 X

 

Marker line value.

SVG, SWT, Static Image

label

xs:string

 

 

Display text for the marker line.

SVG, SWT, Static Image

color

xs:string

 

 black

Color of the marker line

SVG, SWT, Static Image

thickness

xs:double

 

 1

Pixel thickness of the marker line

SVG, SWT, Static Image

Source
<xs:element name="markerLine">
<xs:complexType>
<xs:attribute name="value" type="xs:string" use="required"/>
<xs:attribute name="label" type="xs:string"/>
<xs:attribute name="color" type="xs:string"/>
<xs:attribute name="thickness" type="xs:double" default="1"/>
</xs:complexType>
</xs:element>

element datasets

Description

Contains a list of datasets

Content
sequence

dataset {0,unbounded}

Source
<xs:element name="datasets">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="dataset"/>
</xs:sequence>
</xs:complexType>
</xs:element>

element dataset

Description

Holds a set or series of data values

Attributes

Name

Type

Required

Default

Description

Renderer Support

label

xs:string

 

 

Label that identifies the dataset in the legend.

SVG, SWT, Static Image

symbol

xs:string

 

 

Identifier for the custom symbol to be associated with the dataset

SVG, SWT, Static Image

color

xs:string

 

 

Display color associated with the dataset

SVG, SWT, Static Image

Content
sequence
point{0,unbounded}
Source
<xs:element name="dataset">
<xs:complexType>
<xs:sequence>
<xs:element ref="point" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="label" type="xs:string"/>
<xs:attribute name="symbol" type="xs:string"/>
<xs:attribute name="color" type="xs:string"/>
</xs:complexType>
</xs:element>

element point

Description

Contains point coordinates

Content
sequence

coord{1,3}

Source
<xs:element name="point">
<xs:complexType>
<xs:sequence>
<xs:element ref="coord" minOccurs="1" maxOccurs="3"/>
</xs:sequence>
</xs:complexType>
</xs:element>

element coord

Description

Element that holds a coordinate value.

Attributes

Name

Type

Required

Default

Description

Renderer Support

axis

xs:string

X

 

Identifier for the axis this coordinate refers to

SVG, SWT, Static Image

value

xs:string

X

 

Value of this coordinate.

SVG, SWT, Static Image

Source
<xs:element name="coord">
<xs:complexType>
<xs:attribute name="axis" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>

Related reference
Formatting input data for charting

Related samples
Common input schema (XSD)