Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

package com.codename1.ui.chart

Modern, interactive and animated charts.

Chart is the component; series (com.codename1.ui.chart.series) hold data and paint themselves, axes (com.codename1.ui.chart.axis) map values to the plot. Labels are laid out so they never overlap, and pan, zoom, tooltips and legend toggles work with touch, mouse, trackpad and keyboard.

Form form = new Form("Revenue", new BorderLayout());
Chart chart = new Chart().setTitle("Revenue")
        .setXAxis(new CategoryAxis(Axis.BOTTOM, "Q1", "Q2", "Q3", "Q4"));
chart.addSeries(new BarSeries("Sales").setData(null, new double[]{120, 180, 150, 210}));
form.add(BorderLayout.CENTER, chart);

Every change to the data animates, and several series can share a chart. Chart.syncWith links charts so a price pane and its volume pane pan and zoom together. Sparkline is a small trend for list rows. For readers who cannot see the picture, a chart describes itself to screen readers and Chart.toTable returns the same data as a table.

This package replaces the deprecated com.codename1.charts.

Types

class AnnotationA reference line, shaded band or label laid over a cartesian chart: a target, a threshold, a weekend, a release date.
class ChartAn interactive, animated chart.
class ChartContextEverything a series needs to paint one frame: graphics, the plot rectangle, the axes and how far the current animation has progressed.
class ChartPointA data point the user tapped, hovered or selected.
class ChartThemeColours a chart is painted with.
class ColorScaleMaps numbers to colours for heatmaps: a sequence of colour stops interpolated linearly.
interface LegendListenerNotified when the user taps a legend entry, whether or not the tap toggled the series (see Chart#setLegendToggles(boolean)).
interface RangeListenerReceives the range the user selects by dragging across a chart with brushing on.
interface SelectionListenerNotified when the user selects a data point by tapping or clicking it.
class SeriesOne data series.
class SparklineA word sized chart for list rows, table cells and dashboards: a line, area or bar trend with no axes, legend or interaction, cheap enough to have hundreds on screen.
interface TooltipRendererCustomizes the text of the tooltip.
class TreeNodeA node of hierarchical data for treemaps and sunbursts.
interface ValueFormatterTurns a data value into the text an axis, tooltip or data label shows.