Chart Class Reference

Chart.init() Chart.setTitle(title Chart.addColumn(type, label) Chart.setColors(colors) Chart.addRow(value1, value2, ...) Chart.show(style)

This class displays line, bar and pie chart. All methods in this class are static. Typically you call a number if Chart.init() and define the columns by calling Chart.addColumn() 2 times. Then call Chart.addRow() to for data row to add. Fianlly call Chart.show() to display the Chart.

Download Pie Chart Sample

Chart.init()

Inits the Chart. To be call at the beginning of the page

Chart.setTitle(title)

Set the Chart title

Chart.addColumn(type, label)

Defines a colum.

Chart.setColors(colors)

Define a custom set of colors for the chart data set

Chart.setColors(Color.ORANGE + ";" + Color.BLUE);
Chart.setColors("#ED6D49;#AC725E");
         

Chart.addRow(value1, value2, ...)

Adds a row of data to the Chart. The number of types of parameters must match the number of columns defined previously by Chart.addColumn()

Chart.addRowClick(onclick)

Set the function call to execute when the user taps or click on this data row in the chart.

Chart are clickable only on the web interface currently.

Chart.show(style)

Displays the chart. The style (string) parameter ondicates the chart style.