Text Block Control Charts Design-Time Considerations
XML template files for each chart type are included. Those templates are:
bar_basic.xml
combo_basic.xml
line_basic.xml
pie_basic.xml
pie_ontime.xml
stacked_bar_basic.xml
stacked_bar_ontime.xml
You define the template you want to use in an XML file. You then insert the XML file into a text block control, and runtime uses that file to create the graph. This is an example XML file:
<?xml version="1.0" encoding="utf-16"?> <Graph graphName="bar_basic"> ⇒ <O1Title text="Week Ending" visible="true"/> ⇒ <Y1Title text="Production Cost Variance (USD)" visible="true"/> <LocalRelationalData> <Row columnKey="1-Sept 05" rowKey="Actual Variance" dataValue="1504" /> <Row columnKey="8-Sept 05" rowKey="Actual Variance" dataValue="980" /> <Row columnKey="15-Sept 05" rowKey="Actual Variance" dataValue="-675" /> <Row columnKey="22-Sept 05" rowKey="Actual Variance" dataValue="784" /> <Row columnKey="20-Sept 05" rowKey="Actual Variance" dataValue="0" /> </LocalRelationalData> </Graph>
The graphName
attribute defines the type of chart you are displaying in your
application.
To create the XML file, can write a business function that performs any calculations and then writes the XML to an array variable. You can also use write hard-coded strings within ER. In both of these cases, the encoding of the resulting XML file is UTF-16.
If, however, you write C code business functions and use a tool outside of the JD Edwards EnterpriseOne system to create the XML file, it is likely that the encoding will not be UTF-16. This creates problems when the chart is displayed in the browser. It is recommended that you do not create XML files using any tool or operating that does not use UTF-16 encoding. If you do, you must be sure to set the encoding in the XML file to be the same as your application.