Class Annotation
java.lang.Object
com.codename1.ui.chart.Annotation
A reference line, shaded band or label laid over a cartesian chart: a target, a threshold, a weekend, a release date.
Chart chart = new Chart();
double start = 2, end = 4;
chart.addAnnotation(Annotation.valueLine(100, "Target"));
chart.addAnnotation(Annotation.xBand(start, end, "Outage").setColor(0xEF5350));

-
Method Summary
Modifier and TypeMethodDescriptionsetBehindSeries(boolean behind) Draws behind the series instead of over them; bands default to behind.setColor(int rgb) Sets the colour; the theme's axis colour by default.setDashed(boolean dashed) Draws a line solid instead of dashed.setIncludeInRange(boolean include) Whether a value line or band widens the value axis so it is always visible.setSecondaryAxis(boolean secondary) Measures a value line or band against the chart's secondary y axis, for a threshold that belongs to a series drawn on that axis.static AnnotationA shaded band between two values.static AnnotationA line across the plot at a value.static AnnotationA shaded band between two x positions.static AnnotationA line across the plot at an x position (a date, a category index).
-
Method Details
-
valueLine
A line across the plot at a value. -
valueBand
A shaded band between two values. -
xLine
A line across the plot at an x position (a date, a category index). -
xBand
A shaded band between two x positions. -
setColor
Sets the colour; the theme's axis colour by default. -
setDashed
Draws a line solid instead of dashed. -
setBehindSeries
Draws behind the series instead of over them; bands default to behind. -
setIncludeInRange
Whether a value line or band widens the value axis so it is always visible. -
setSecondaryAxis
Measures a value line or band against the chart's secondary y axis, for a threshold that belongs to a series drawn on that axis.
-