Skip to main content
ArrayBasedSeriesOptions
Array based chart series - each category is represented by a single record, which has either a field containing an array of values, or both a field containing minimum values and a field containing maximum values.
NameTypeDescription
color?stringColor to use for the series. This is optional and if not provided the chart will use a color from its installed ColorGenerator.
id?stringThe id of the series.
idField?stringOptional field which contains the ID for the series. If not provided, an id will be auto generated.
label?stringLabel for the series. Optional.
labelField?stringOptional field which contains the label for the series itself. Defaults to "label".
labelGenerator?ArraySeriesLabelGeneratorOptional function to use to generate labels for each step in the array series. This offers the most customisation of all - each time a data point in the series is drawn, this function is invoked, and the return value is used as the label on the category axis.
labels?Array<string>Labels to use for the series. Optional. If omitted the label for each data point is computed from startPoint + step. Providing labels in the series is useful when your data is not strictly numeric increasing, or you want to customise its display.
marker?stringOptional template to use for markers. This should be a string in VisuallyJs's internal template format, with namespaced SVG elements.
markerSize?numberSize (in pixels) to use for data points. Defaults to 10 pixels. For circular markers this equates to the diameter; for square/cross this is width/height
markerType?"square" | "circle" | "cross"Type of marker to draw. Defaults to "circle".
maxValuesField?stringThe field containing the array of maximum values. This is required if you want to draw an Area chart - and you also need to provide the minValuesField. Defaults to "maxValues".
minValuesField?stringThe field containing the array of minimum values. This is required if you want to draw an Area chart - and you also need to provide the maxValuesField. Defaults to "minValues".
rangeStartField?stringCurrently unused.
resolveMarker?MarkerResolutionFunctionOptional function to resolve a marker SVG string for each data point.
startPoint?numberStart value for the series. Defaults to 0.
step?numberStep between values in the series. Defaults to 1.
type?stringDefines the series type.
valuesField?stringThe field containing the array of values. Defaults to "values".