Usage
Signature:
interface ChartSeriesElement
Typescript Import Format
//To typecheck the element APIs, import as below.
import { ChartSeriesElement } from "ojs/ojchart";
//For the transpiled javascript to load the element's module, import as below
import "ojs/ojchart";
For additional information visit:
Attributes
-
area-color :string
-
The area color of the series. Only applies if series type is area or lineWithArea.
-
area-svg-class-name :string
-
The CSS style class to apply if series type is area or lineWithArea. The style class and inline style will override any other styling specified through the properties. For tooltips and hover interactivity, it's recommended to also pass a representative color to the color attribute.
-
area-svg-style :Partial<CSSStyleDeclaration>=
-
The inline style to apply if series type is area or lineWithArea. The style class and inline style will override any other styling specified through the properties. For tooltips and hover interactivity, it's recommended to also pass a representative color to the color attribute. Only SVG CSS style properties are supported.
-
assigned-to-y2 :"on"|"off"
-
Defines whether the series is associated with the y2 axis. Only applies to Cartesian bar, line, area, and combo charts.
- Default Value:
"off"
Supported Values:
Value Description offThe series is not associated with the y2 axis. onThe series is associated with the y2 axis. -
border-color :string
-
The border color of the series.
-
border-width :number
-
The border width of the series.
-
box-plot :ojChart.BoxPlotStyle=
-
An object containing the style properties of the box plot series.
-
categories :Array.<string>
-
An optional array of category strings corresponding to this series. This allows highlighting and filtering of a series through interactions with legend sections. If not defined, the series id is used.
-
color :string
-
The color of the series. The chart legend item will inherit this color value.
-
display-in-legend :"on"|"off"|"auto"
-
Defines whether the series should be shown in the legend. When set to 'auto', the series will not be displayed in the legend if it has null data or if it is a stock, funnel, or pyramid series.
- Default Value:
"auto"
Supported Values:
Value Description autoThe series will not be displayed in the legend if it has null data or if it is a stock, funnel, or pyramid series. offSeries will not be shown in the legend. onSeries will be shown in the legend. -
drilling :"on"|"off"|"inherit"
-
Whether drilling is enabled on the series item. Drillable objects will show a pointer cursor on hover and fire an
ojDrillevent on click (double click if selection is enabled). To enable drilling for all series items at once, use the drilling attribute in the top level.- Default Value:
"inherit"
Supported Values:
Value Description inheritThe series drilling behavior is inherited from the chart. offThe series will not be drillable. onThe series will be drillable. -
line-style :oj.ojChart.LineStyle
-
The line style of the data line. Only applies to line, lineWithArea, scatter, and bubble series.
-
line-type :"curved"|"stepped"|"centeredStepped"|"segmented"|"centeredSegmented"|"none"|"straight"|"auto"
-
The line type of the data line or area. Only applies to line, area, scatter, and bubble series. centeredStepped and centeredSegmented are not supported for polar, scatter, and bubble charts.
Supported Values:
Value Description autoDefault value depending on series type. centeredSegmentedData points will be connected with a centered segmented line. centeredSteppedData points will be connected with a centered stepped line. curvedData points will be connected with a curved line. noneData points will not be connected. segmentedData points will be connected with a segmented line. steppedData points will be connected with a stepped line. straightData points will be connected with a straight line. -
line-width :number
-
The width of the data line. Only applies to line, lineWithArea, scatter, and bubble series.
-
marker-color :string
-
The color of the data markers, if different from the series color.
-
marker-displayed :"on"|"off"|"auto"
-
Defines whether the data marker is displayed. Only applies to line, area, scatter, and bubble series. If auto, the markers will be displayed whenever the data points are not connected by a line.
Supported Values:
Value Description autoData markers will be displayed whenever the data points are not connected by a line. offData markers belonging to the series will not be displayed. onData markers belonging to the series will be displayed. -
marker-shape :"circle"|"diamond"|"human"|"plus"|"square"|"star"|"triangleDown"|"triangleUp"|"auto"|string
-
The shape of the data markers. In addition to the built-in shapes, it may also take SVG path commands to specify a custom shape. The chart will style the custom shapes the same way as built-in shapes, supporting properties like color and borderColor and applying hover and selection effects. Only 'auto' is supported for range series.
Supported Values:
Value Argument Description auto<optional>
Data marker shape will be based on chart type. circle<optional>
Data markers will be circular in shape. diamond<optional>
Data markers will be diamond in shape. human<optional>
Data markers will be human in shape. plus<optional>
Data markers will be plus in shape. square<optional>
Data markers will be square in shape. star<optional>
Data markers will be star in shape. triangleDown<optional>
Data markers will be of a triangular shape facing down. triangleUp<optional>
Data markers will be of a triangular shape facing up. -
marker-size :number
-
The size of the data markers.
-
marker-svg-class-name :string
-
The CSS style class to apply to the data markers. The style class and inline style will override any other styling specified through the properties. For tooltips and hover interactivity, it's recommended to also pass a representative color to the marker color attribute.
-
marker-svg-style :Partial<CSSStyleDeclaration>=
-
The inline style to apply to the data markers. The style class and inline style will override any other styling specified through the properties. For tooltips and hover interactivity, it's recommended to also pass a representative color to the marker color attribute. Only SVG CSS style properties are supported.
-
name :string
-
The name of the series, displayed in the legend and tooltips.
-
pattern :"smallChecker"|"smallCrosshatch"|"smallDiagonalLeft"|"smallDiagonalRight"|"smallDiamond"|"smallTriangle"|"largeChecker"|"largeCrosshatch"|"largeDiagonalLeft"|"largeDiagonalRight"|"largeDiamond"|"largeTriangle"|"auto"
-
The pattern used to fill the series. A solid fill is used by default, unless the seriesEffect is 'pattern'.
- Default Value:
"auto"
Supported Values:
Value Description autoNo pattern is applied to data item fill. largeCheckerLarge checker pattern is applied to the data item. largeCrosshatchLarge cross hatch pattern is applied to the data item. largeDiagonalLeftLarge diagonal left pattern is applied to the data item. largeDiagonalRightLarge diagonal right pattern is applied to the data item. largeDiamondLarge diamond pattern is applied to the data item. largeTriangleLarge triangle pattern is applied to the data item. smallCheckerSmall checker pattern is applied to the data item. smallCrosshatchSmall cross hatch pattern is applied to the data item. smallDiagonalLeftSmall diagonal left pattern is applied to the data item. smallDiagonalRightSmall diagonal right pattern is applied to the data item. smallDiamondSmall diamond pattern is applied to the data item. smallTriangleSmall triangle pattern is applied to the data item. -
pie-slice-explode :number
-
A number from 0 to 1 indicating the amount to explode the pie slice. Only applies to pie charts.
- Default Value:
0
-
short-desc :string
-
The description of this series. This is used for accessibility and for customizing the tooltip text on the corresponding legend item for the series.
-
source :string
-
The URI of the custom image. If specified, it takes precedence over shape.
-
source-hover :string
-
The optional URI for the hover state. If not specified, the source image will be used.
-
source-hover-selected :string
-
The optional URI for the hover selected state. If not specified, the source image will be used.
-
source-selected :string
-
The optional URI for the selected state. If not specified, the source image will be used.
-
stack-category :string
-
In stacked charts, groups series together for stacking. All series without a stackCategory will be assigned to the same stack.
-
svg-class-name :string
-
The CSS style class to apply to the series. For series of type lineWithArea, this style will only be applied to the line if areaSvgClassName is also specified. The style class and inline style will override any other styling specified through the properties. For tooltips and hover interactivity, it's recommended to also pass a representative color to the color attribute.
-
svg-style :Partial<CSSStyleDeclaration>=
-
The inline style to apply to the series. For series of type lineWithArea, this style will only be applied to the line if areaSvgStyle is also specified. The style class and inline style will override any other styling specified through the properties. For tooltips and hover interactivity, it's recommended to also pass a representative color to the color attribute. Only SVG CSS style properties are supported.
-
type :"line"|"area"|"lineWithArea"|"bar"|"candlestick"|"boxPlot"|"auto"
-
The type of data objects to display for this series. Only applies to combo and stock charts.
- Default Value:
"auto"
Supported Values:
Value Description areaSeries will be represented by an area. Use lineWithArea to prevent values from being obscured. autoSeries type will be inherited from chart type. barSeries will be represented by a bar. boxPlotSeries will be represented by box plot markers. This is only supported for stock charts. candlestickSeries will be represented by candlestick markers. This is only supported for stock charts. lineSeries will be represented by a line. lineWithAreaSeries will be presented by a line and area.