Interface CategoryMulti
access this type via: stats.chart.CategoryMulti (provides, requires or uses)
--- extends:ChartCore
--- semantic variants: barcodeH, barcode, box, bar, stackedBar, barH, stackedBarH, boxH
API to create a multi-category graph, where one axis is used to show evenly-spaced categories, such as a bar chart or histogram. Use one of the semantic variants of this interface to select a particular type of graph.
Constants
byte L_ABSOLUTE
byte L_INSIDE
byte L_OUTSIDE
Functions
CategoryMulti()
void addSeries(char name[], optional storeColor color)
void addSample(char series[], char cat[], dec values[], optional bool redraw)
void setSeriesColor(char series[], storeColor c)
void setSeriesName(char series[], char name[])
void showErrorBars(bool on)
void clampErrorBars(dec low, dec high)
void showLegend(bool on)
void setLegendPosition(byte type, optional int x, int y)
void setCatDisplayWidth(dec percent)
void setCatDisplayPadding(int pixels)
Constants
L_ABSOLUTE
L_INSIDE
L_OUTSIDE
CategoryMulti()
void addSeries(char name[], optional storeColor color)
Adds a new series. Each category will display the values of every series.
name The unique name used for this series.
void addSample(char series[], char cat[], dec values[], optional bool redraw)
Adds a new sample (or set of samples) to a series, for a specific category.
series The unique name used for this series.
cat The category in which this series data will appear.
values The values for this series data for this category.
void setSeriesColor(char series[], storeColor c)
Sets a color used to display this series.
series The unique name used for this series.
c The color for this series.
void setSeriesName(char series[], char name[])
Sets a display name for this series, which will appear on a legend.
series The unique name used for this series.
name The display name for this series.
void showErrorBars(bool on)
Display error bars on the graph (if the specific implementation supports it).
on True to show error bars, false otherwise.
void clampErrorBars(dec low, dec high)
This function can be used to clamp error bars at specific values. This can be useful for display purposes if a value could not be outside a certain range.
low Lowest value allowed.
high Highest value allowed.
void showLegend(bool on)
Display a legend on the graph, using the display names for series.
on True to show legend, false otherwise.
void setLegendPosition(byte type, optional int x, int y)
Configure where the legend is rendered on the graph.
type The positioning type, expressed as one of the L_ constants.
x An optional position modifier in x screen coordinates.
y An optional position modifier in y screen coordinates.
void setCatDisplayWidth(dec percent)
Set the width of category display rendering as a percentage of the category space available (for example, the relative width of bars on a bar chart).
percent A number between 0.0 and 100.0.
void setCatDisplayPadding(int pixels)
Set a level of padding between the edge of the category space available and the category rendering.
pixels Number of pixels to pad each side of a category.