Package limn.components.chart


package limn.components.chart
Charts: BarChart, LineChart and DonutChart, over a shared Chart that carries the data, the palette, the legend, the tooltip, the click callback and the animation.

Every chart is a plain widget: it measures, lays out and paints like any other, takes its ink from the active theme, and needs nothing configured to be readable. Feed it labels and a ChartSeries and it picks colors, rounds the scale, draws the legend and animates the values in.


 BarChart chart = new BarChart();
 chart.setLabels("Mon", "Tue", "Wed");
 chart.addSeries(ChartSeries.of("Signups", 12, 19, 3));
 chart.onPointClick(point -> status.setText(point.label()));
 
  • Class
    Description
    Bars, grouped or stacked, vertical or horizontal.
    The half of a chart that has axes: a category axis with one slot per label and a value axis with a scale over the numbers.
    What every chart in this package has in common: the data (labels and series), the colors, the title, the legend, the hover tooltip, the click callback and the animation.
    One row of the legend: a swatch, a name, and whether its data is currently drawn.
    Where the legend sits relative to the plot.
    How much a hover reports.
    One axis of a CartesianChart: the value axis that carries the numbers, or the category axis that carries the labels.
    Ready-made number formats for axis ticks and tooltip values: what a chart puts on screen when the application does not supply its own Chart.setValueFormat(DoubleFunction).
    The colors a chart hands to its series (or, in a donut, to its slices) when the application names none.
    One datum a chart can point at: what was hovered, what was clicked, what a tooltip row is about.
    One named run of values: a bar series, a line, or (in a DonutChart) the ring itself.
    A ring of slices, or a pie, with DonutChart.setInnerRadius(float) at 0.
    Lines, with optional filled areas and markers.