org.ten60.util.image.xchart
XChart
Index > Books > Declarative Development Guide > Reference Library > Accessor Listing > org.ten60.util.image.xchart

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


Module

Definition

Active URI Base

active:org.ten60.util.image.xchart

Format

<instr>
  <type>org.ten60.util.util.xchart</type>
  <operand>chart.xml</operand>
  <target>this:response</target>
</instr>

Syntax

ArgumentRulesDescription
typeMandatory org.ten60.util.image.xchart
operandMandatory an XML chart document
targetMandatory the target resource

The org.ten60.util.image.xchart accessor uses the jCharts engine to create PNG format charts from an XML chart document.

XML Chart

The org.ten60.util.xchart accessor requires an XML chart document.

<chart>
  <properties>
    <type>area</type>
    <title>NetKernel Work</title>
    <width>400</width>
    <height>250</height>
    <xAxisTitle>Time</xAxisTitle>
    <yAxisTitle>Cost Units</yAxisTitle>
    <xAxisLabels>
      <label>08:08:50</label>
      <label>08:08:55</label>
      <label>08:09:00</label> ...
    </xAxisLabels>
  </properties>
  <data>
    <dataset color="0000FF" name="Work">
      <point y="100" />
      <point y="120" />
      <point y="150" /> ...
    </dataset>
  </data>
</chart>

<properties> contains general properties of the chart.

  • <type> may be area, area-stacked, bar, bar-stacked, bar-clustered
  • <title> Displayed chart title
  • <width> PNG width
  • <height> PNG height
  • <yAxisTitle> y-axis title
  • <xAxisTitle> x-axis title
  • <xAxisLabels> Label for each x-axis item. There must be 1 label for each data point in a dataset
<data> contains one or more datasets - all datasets will be added to the chart
<dataset> a dataset color and name are specified as attributes
  • <point> a y-axis data value specified as attibute 'y'. There must be one point for each x-axis label.

© 2003-2005, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.