Researching charts and diagrams for an upcoming project – I came across this in the OpenNTF catalog. If you need a simple chart mechanism try this. I think this is the easiest approach I have seen to getting the fast results that developers crave when testing proof of concepts or demos.
The author Julian Buss describes it as
A ready-to-use custom control for making charting with Dojo fast and easy.
Usage: drag the control onto your XPage and set the “dataSeries” property so that it gets a JavaScript Array with numbers, that’s it.
You can control the following chart properties:
- labels for X and Y axis
- font and font-color for labels
- min/max for X and Y axis
- show only natural numbers on the axis yes/no
- color of the axis lines
- theme of the cart
- chart type (lines, bars, pie…)
- height and width
- tooltips yes/no
You can put this control multiple times on one XPage so that you have multiple charts on the same page.
As mentioned OpenNTF is THE place to start when looking at xpages development and code snippets and controls – so you gotta go there !!