<?xml version="1.0" encoding="UTF-8"?>

<!-- The chart factory class MUST extend it.businesslogic.ireport.chart.IReportAbstractChartFactory class, see iReport -->
<!ELEMENT iReportCharts (iReportChart+)>
<!ATTLIST iReportCharts
	name NMTOKEN #REQUIRED
	chartFactory NMTOKEN #REQUIRED
	width CDATA #REQUIRED
	height CDATA #REQUIRED
>

<!-- At least one chart and the charts renderer order is the same of xml document. -->
<!ELEMENT iReportChart (title?, legend?, grid?, dataSource?)>
<!ATTLIST iReportChart
	id ID #REQUIRED
	type CDATA #REQUIRED
	orientation (horizontal | vertical) "vertical"
	background CDATA "-1"
>
<!-- The default title color is black, see getRGB() from java.awt.Color -->
<!ELEMENT title (chartTitle?, axisTitle*)>
<!ELEMENT chartTitle (font?)>
<!ATTLIST chartTitle
	text CDATA #REQUIRED
	color CDATA "-16777216"
>
<!ELEMENT axisTitle (font?)>
<!ATTLIST axisTitle
	axis (x | y | z) #REQUIRED
	text CDATA #REQUIRED
	color CDATA "-16777216"
>

<!-- Font -->
<!ELEMENT font EMPTY>
<!ATTLIST font
	name CDATA #REQUIRED
	size CDATA #REQUIRED
	style CDATA #REQUIRED
>

<!-- Legend -->
<!ELEMENT legend EMPTY>
<!ATTLIST legend
	visible (true | false) "false"
	position (north | south | east | west | northeast | northwest | southeast | southwest) "south"
>
<!-- Grid -->
<!ELEMENT grid (axisGrid+)>
<!ELEMENT axisGrid EMPTY>
<!ATTLIST axisGrid
	axis (x | y | z) #REQUIRED
	visible (true | false) "false"
>

<!-- The data source to fill chart, this class MUST implement dori.jasper.engine.JRDataSource interface, see JasperReports. If absent the chart factory provides one for chart demonstration. -->
<!ELEMENT dataSource (field+)>
<!ATTLIST dataSource
	name CDATA #REQUIRED
	dataSeries (rows | columns) "rows"
>
<!-- The color of a field is optional, the chart factory select automatically. The image parameter is a image file name. The symbol is chart type specific, maybe something like factory constant: circle, star, triangle, rectangle, etc -->
<!ELEMENT field EMPTY>
<!ATTLIST field
	name CDATA #REQUIRED
	label CDATA #IMPLIED
	color CDATA #IMPLIED
	image CDATA #IMPLIED
	symbol CDATA #IMPLIED
>

