logo image

iguanaChart : SOA

[ : iguanaChart home : ]

Overview

This section demonstrates how the iguanaChart service can be used as part of a Service Oriented Architecture. In summary, a server side application needs to:

  1. construct a properly structured XML message
  2. send that message to the host URL for the iguanaChart service
  3. embed the content in the web page that will display the chart

The chart data representation

iguanaChart charters render charts based on a structured message that includes the data set to be charted and some parameters related to the size and chart type. Here is the structure of that message represented as XML (the only currently supported message structure):
<chart>
    <cfg>
        <title>title</title>
        <type>title</type>
        <w>title</w>
        <h>title</h>
        <link>title</link>
    </cfg>
    <catg>
        <name>title</name>
        <val>a:b:c:d</val>
    </catg>
    <dss>
        <name>title</name>
        <valLbl>title</valLbl>
        <ds>
            <name>title</name>
            <val>#:#:#:#</val>
        </ds>
    </dss>
</chart>

This table explains the elements in the XML message above:
Tag Description
chart The chart element is the root node for all the information contained in the message that will be sent to the iguanaChart rendering service.
cfg The cfg (configuration) node contains physical information about the chart to be displayed, including its title, size and chart type.
cfg : title This element contains the title that will be displayed above the chart.
cfg : type This element identifies the type of chart to be rendered. Currently supported values are:
  • bar (should technically be "column", to do...
  • pie
  • line
  • groupBar (should be changed to groupColumn)
  • stackBar (should be changed to stackColumn)
cfg : w The width in pixels of the chart object to be generated.
cfg : h The height in pixels of the chart object to be generated. Currently a 4:3 aspect ratio is enforced. If width and height are passed, the width will be used to scale the chart.
cfg : link The base url (without chart data parameters) that will be called when chart elements are clicked.
catg Container element for tags related to the category of the data sets. The category determines the pie slices and the values on an x-axis.
catg : name The name of the category data set.
catg : val A colon (:) separated list of values that make up the category set.
dss (Data Sets) The container element for all data set elements.
dss : name The name of the collection of data sets.
dss : valLbl The label to be used for the value of the data sets. The y-axis label for line and bar charts.
dss : ds (Data Set) The container element for one set of value points (one data set).
dss : ds : name The name of the data set.
dss : ds : vale A colon (:) separated list of values that make up the data set.

Examples

Example 1: A simple war file that illustrates the SOA approach with iguanaChart.

Example 2: A web page that posts to the iguanaChart service and pops up a chart.


[ : iguanaChart home : ]
Feedback   iguanaChart blog