Listing 5. Preview of Dojo's Charting API ////////////////////////////////////////////////////// // This function demonstrates the general form of // putting Dojo's charting API built on top of // gfx to use. Pass in a node, customize the chart, // and let Dojo take care of the rest ////////////////////////////////////////////////////// new dojox.charting.Chart2D(node)) .setTheme(dojox.charting.themes.PlotKit.blue) .addPlot("default", { type: "Default", lines: true, markers: true, tension: 2 }) .addAxis("x", { min: 0, max: 6, majorTick: { stroke: "black", length: 3 }, minorTick: { stroke: "gray", length: 3 } }) .addAxis("y", { vertical: true, min: 0, max: 10, majorTick: { stroke: "black", length: 3 }, minorTick: { stroke: "gray", length: 3 } }) .addSeries("Series A", [ { x: 0.5, y: 5 }, { x: 1.5, y: 1.5 }, { x: 2, y: 9 }, { x: 5, y: 0.3 } ]) .addSeries("Series B", [ { x: 0.3, y: 8 }, { x: 4, y: 6 }, { x: 5.5, y: 2 } ]) .render() ;