xref: /trunk/main/xmloff/dtd/chart.mod (revision cdf0e10c)
1<!--
2
3  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
5  Copyright 2000, 2010 Oracle and/or its affiliates.
6
7  OpenOffice.org - a multi-platform office productivity suite
8
9  This file is part of OpenOffice.org.
10
11  OpenOffice.org is free software: you can redistribute it and/or modify
12  it under the terms of the GNU Lesser General Public License version 3
13  only, as published by the Free Software Foundation.
14
15  OpenOffice.org is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  GNU Lesser General Public License version 3 for more details
19  (a copy is included in the LICENSE file that accompanied this code).
20
21  You should have received a copy of the GNU Lesser General Public License
22  version 3 along with OpenOffice.org.  If not, see
23  <http://www.openoffice.org/license.html>
24  for a copy of the LGPLv3 License.
25
26-->
27
28
29<!ENTITY % chart-class "(line|area|circle|ring|scatter|radar|bar|stock|add-in)">
30<!ENTITY % chart-solid-type "(cuboid|cylinder|cone|pyramid)">
31
32<!-- Chart element -->
33<!ELEMENT chart:chart ( chart:title?, chart:subtitle?, chart:legend?,
34					    chart:plot-area,
35						table:table? )>
36<!ATTLIST chart:chart
37		  chart:class %chart-class; #REQUIRED
38		  chart:add-in-name %string; #IMPLIED
39		  chart:table-number-list %string; #IMPLIED
40		  draw:name %string; #IMPLIED
41		  %draw-position;
42		  %draw-size;
43		  %draw-style-name;
44		  chart:column-mapping %string; #IMPLIED
45		  chart:row-mapping %string; #IMPLIED
46		  chart:style-name %styleName; #IMPLIED>
47
48<!ATTLIST chart:chart %presentation-class; >
49<!ATTLIST chart:chart %zindex;>
50<!ATTLIST chart:chart %draw-end-position; >
51<!ATTLIST chart:chart draw:id %draw-shape-id; >
52<!ATTLIST chart:chart draw:layer %layerName; #IMPLIED>
53
54<!ATTLIST style:properties
55		  chart:scale-text %boolean; "true"
56		  chart:stock-updown-bars %boolean; "false"
57		  chart:stock-with-volume %boolean; "false"
58		  chart:three-dimensional %boolean; "false"
59		  chart:deep %boolean; "false"
60		  chart:lines %boolean; "false"
61		  chart:percentage %boolean; "false"
62		  chart:solid-type %chart-solid-type; "cuboid"
63		  chart:splines %nonNegativeInteger; "0"
64		  chart:stacked %boolean; "false"
65		  chart:symbol %integer; "-1"
66		  chart:vertical %boolean; "false"
67		  chart:lines-used %nonNegativeInteger; "0"
68		  chart:connect-bars %boolean; "false"
69		  chart:spline-order %nonNegativeInteger; "2"
70		  chart:spline-resolution %nonNegativeInteger; "20"
71          chart:pie-offset %nonNegativeInteger; "0">
72
73<!-- Main/Sub Title -->
74<!-- the cell-address attribute is currently not supported for titles -->
75<!ELEMENT chart:title (text:p)?>
76<!ATTLIST chart:title
77		  table:cell-range %cell-address; #IMPLIED
78		  svg:x %coordinate; #IMPLIED
79		  svg:y %coordinate; #IMPLIED
80		  chart:style-name %styleName; #IMPLIED >
81
82<!ELEMENT chart:subtitle (text:p)?>
83<!ATTLIST chart:subtitle
84		  table:cell-range %cell-address; #IMPLIED
85		  svg:x %coordinate; #IMPLIED
86		  svg:y %coordinate; #IMPLIED
87		  chart:style-name %styleName; #IMPLIED >
88
89<!-- you must specify either a legend-position or both, x and y coordinates -->
90<!ELEMENT chart:legend EMPTY>
91<!ATTLIST chart:legend
92		  chart:legend-position (top|left|bottom|right) "right"
93		  svg:x %coordinate; #IMPLIED
94		  svg:y %coordinate; #IMPLIED
95		  chart:style-name %styleName; #IMPLIED >
96
97<!-- Plot-Area specification -->
98
99<!ELEMENT chart:plot-area (dr3d:light*,
100						   chart:axis*,
101						   chart:categories?,
102						   chart:series*,
103						   chart:stock-gain-marker?,
104						   chart:stock-loss-marker?,
105						   chart:stock-range-line?,
106						   chart:wall?,
107						   chart:floor?) >
108
109<!ATTLIST chart:plot-area
110		  svg:x %coordinate; #IMPLIED
111		  svg:y %coordinate; #IMPLIED
112		  svg:width %length; #IMPLIED
113		  svg:height %length; #IMPLIED
114		  chart:style-name %styleName; #IMPLIED
115		  table:cell-range-address %cell-range-address; #IMPLIED
116		  chart:table-number-list %string; #IMPLIED
117		  chart:data-source-has-labels (none|row|column|both) "none" >
118
119<!-- 3d scene attributes on plot-area -->
120<!ATTLIST chart:plot-area
121		  dr3d:vrp %vector3D; #IMPLIED
122		  dr3d:vpn %vector3D; #IMPLIED
123		  dr3d:vup %vector3D; #IMPLIED
124		  dr3d:projection (parallel|perspective) #IMPLIED
125		  dr3d:transform CDATA #IMPLIED
126		  dr3d:distance %length; #IMPLIED
127		  dr3d:focal-length %length; #IMPLIED
128		  dr3d:shadow-slant %nonNegativeInteger; #IMPLIED
129		  dr3d:shade-mode (flat|phong|gouraud|draft) #IMPLIED
130		  dr3d:ambient-color %color; #IMPLIED
131		  dr3d:lighting-mode %boolean; #IMPLIED >
132
133<!ATTLIST style:properties
134		  chart:series-source (columns|rows) "columns" >
135
136<!ELEMENT chart:wall EMPTY>
137<!ATTLIST chart:wall
138		  svg:width %length; #IMPLIED
139		  chart:style-name %styleName; #IMPLIED >
140
141<!ELEMENT chart:floor EMPTY>
142<!ATTLIST chart:floor
143		  svg:width %length; #IMPLIED
144		  chart:style-name %styleName; #IMPLIED >
145
146<!-- Stock chart elements -->
147
148<!ELEMENT chart:stock-gain-marker EMPTY>
149<!ATTLIST chart:stock-gain-marker
150		  chart:style-name %styleName; #IMPLIED >
151
152<!ELEMENT chart:stock-loss-marker EMPTY>
153<!ATTLIST chart:stock-loss-marker
154		  chart:style-name %styleName; #IMPLIED >
155
156<!ELEMENT chart:stock-range-line EMPTY>
157<!ATTLIST chart:stock-range-line
158		  chart:style-name %styleName; #IMPLIED >
159
160<!-- Axis -->
161
162<!ELEMENT chart:axis (chart:title?, chart:grid*)>
163<!ATTLIST chart:axis
164		  chart:class (category|value|series|domain) #REQUIRED
165		  chart:name %string; #IMPLIED
166		  chart:style-name %styleName; #IMPLIED >
167
168<!ATTLIST style:properties
169		  chart:tick-marks-major-inner %boolean; "false"
170		  chart:tick-marks-major-outer %boolean; "true"
171		  chart:tick-marks-minor-inner %boolean; "false"
172		  chart:tick-marks-minor-outer %boolean; "false"
173		  chart:logarithmic %boolean; "false"
174		  chart:maximum %float; #IMPLIED
175		  chart:minimum %float; #IMPLIED
176		  chart:origin %float; #IMPLIED
177		  chart:interval-major %float; #IMPLIED
178		  chart:interval-minor %float; #IMPLIED
179		  chart:gap-width %integer; #IMPLIED
180		  chart:overlap %integer; #IMPLIED
181		  text:line-break %boolean; "true"
182		  chart:display-label %boolean; "true"
183		  chart:label-arrangement (side-by-side|stagger-even|stagger-odd) "side-by-side"
184		  chart:text-overlap %boolean; "false"
185		  chart:visible %boolean; "true"
186		  chart:link-data-style-to-source %boolean; "true" >
187
188<!ELEMENT chart:grid EMPTY>
189<!ATTLIST chart:grid
190		  chart:class (major|minor) "major"
191		  chart:style-name %styleName; #IMPLIED >
192
193
194<!ELEMENT chart:categories EMPTY>
195<!ATTLIST chart:categories
196		  table:cell-range-address %cell-range-address; #IMPLIED >
197
198<!--
199	each series element must have an cell-range-address element that points
200	to the underlying table data.
201	Impl. Note: Internally all href elements are merged to one table range
202	that represents the data for the whole chart
203-->
204<!ELEMENT chart:series ( chart:domain*,
205                         chart:mean-value?,
206						 chart:regression-curve?,
207						 chart:error-indicator?,
208						 chart:data-point* )>
209<!ATTLIST chart:series
210		  chart:values-cell-range-address %cell-range-address; #IMPLIED
211		  chart:label-cell-address %cell-address; #IMPLIED
212		  chart:class %chart-class; #IMPLIED
213		  chart:attached-axis %string; #IMPLIED
214		  chart:style-name %styleName; #IMPLIED >
215
216<!ELEMENT chart:domain EMPTY>
217<!ATTLIST chart:domain
218		  table:cell-range-address %cell-range-address; #IMPLIED >
219
220<!ELEMENT chart:data-point EMPTY>
221<!ATTLIST chart:data-point
222		  chart:repeated %nonNegativeInteger; #IMPLIED
223		  chart:style-name %styleName; #IMPLIED >
224
225<!-- statistical properties -->
226
227<!ELEMENT chart:mean-value EMPTY>
228<!ELEMENT chart:regression-curve EMPTY >
229<!ELEMENT chart:error-indicator EMPTY >
230<!ATTLIST chart:mean-value chart:style-name %styleName; #IMPLIED >
231<!ATTLIST chart:regression-curve chart:style-name %styleName; #IMPLIED >
232<!ATTLIST chart:error-indicator chart:style-name %styleName; #IMPLIED >
233
234<!ATTLIST style:properties
235		  chart:mean-value %boolean; #IMPLIED
236		  chart:error-category (none|variance|standard-deviation|percentage|error-margin|constant) "none"
237		  chart:error-percentage %float; #IMPLIED
238		  chart:error-margin %float; #IMPLIED
239		  chart:error-lower-limit %float; #IMPLIED
240		  chart:error-upper-limit %float; #IMPLIED
241		  chart:error-upper-indicator %boolean; #IMPLIED
242		  chart:error-lower-indicator %boolean; #IMPLIED
243		  chart:regression-type (none|linear|logarithmic|exponential|power) "none" >
244
245<!-- data label properties -->
246
247<!ATTLIST style:properties
248		  chart:data-label-number (none|value|percentage) "none"
249		  chart:data-label-text %boolean; "false"
250		  chart:data-label-symbol %boolean; "false" >
251
252<!-- general text properties -->
253
254<!ATTLIST style:properties
255		  text:rotation-angle %integer; "0" >
256
257<!-- symbol properties -->
258
259<!ATTLIST style:properties
260		  chart:symbol-width %nonNegativeLength; #IMPLIED
261		  chart:symbol-height %nonNegativeLength; #IMPLIED
262		  chart:symbol-image-name %string; #IMPLIED >
263