ZoomCharts Documentation

Version: 1.21.1 (2024-11-08)

TimeChart.settings.chartTypes.line.style

This section is defined by the type TimeChartSettingsSeriesLinesStyle.

Default style for line type series.

Properties

degenerateLineColumnWidthScale: number
Default value: 1.0

How much to scale the width of a column generated by the "column" degenerateLinePolicy

degenerateLinePolicy: "point" | "zero" | "column"
Default value: "point"

What to do if a line only has a single point.

Valid values:
  • point - Draw the point. May not be visible in some configurations.
  • zero - Draws a line between the degenerate point and the zero line
  • column - Draws a column at the degenerate point
depth: number
Default value: 0
fillColor: string
Default value: null

Fill color.

fillGradient: GradientDefinition
Default value: null

Fill gradient. Allows building a gradient fill, bound to values. Contains array of value-color pairs. For example: [[-20, 'rgba(0,0,255,0.4)'],[30,'rgba(255,0,0,0.7)']]. If specified fillGradientMode: "horizontal" or "vertical", then value denotes fraction of the column width and must be in interval from 0 to 1 For example: [[0,"black"],[0.5,"red"],[1, "orange"]].

fillGradientMode: "vertical" | "horizontal"
Default value: null
Introduced in version 1.18.9.

Fill gradient orientation for manual fill gradient mode. In use with fillGradient property. "null" for default fillGradient mode, "vertical" for vertical gradient, "horizontal" for horizonal rendering"

fillPattern: string
Default value: null
Introduced in version 1.16.0.

Specifies the URL to the image that will be used as the repeated fill pattern for the series.

When fillPattern is specified, fillGradient is ignored. If fillColor is specified together with fillPattern, it will be used as the background color for the pattern.

Introduced in version 1.13.1.

Style settings for the legend item that is rendered for the series.

Properties
Introduced in version 1.13.2.
View section details

Configures the marker that is shown in the legend. Note that the default (shape: null) means that instead of the plain marker, an icon representing the series visual style will be used.

textColor: string
Default value: null
Introduced in version 1.13.1.

The color used for the label of the legend item. Note that for disabled series advanced.disabledSeries.textColor takes precedence.

lineColor: string
Default value: null
lineDash: Array<number>

Array of line dash pattern to have a dashed line. The array contains length of dash followed by length of space in pixels. A sequence of multiple dash-space values is supported. In case you want to set a solid line, pass empty array: []

lineDashOffset: number
Default value: 0

Start offset of line dash, in pixels

lineGradient: GradientDefinition
Default value: null

Line gradient. Allows building a gradient line, bound to values. Contains array of value-color pairs. For example: [[-20, 'rgba(0,0,255,0.4)'],[30,'rgba(255,0,0,0.7)']]. If specified lineGradientMode: "horizontal" or "vertical", then value denotes fraction of the column width and must be in interval from 0 to 1 For example: [[0,"black"],[0.5,"red"],[1, "orange"]].

lineGradientMode: "vertical" | "horizontal"
Default value: null

Line gradient orientation for manual line gradient mode. In use with lineGradient property. "null" for default lineGradient mode, "vertical" for vertical gradient, "horizontal" for horizonal rendering"

lineWidth: number
Default value: 1

Width of the line.

View section details

Marker highlight data points on line. They can be in different sizes, shapes and colors.

markerStyleFunction: (timestamps: Array<number>, verticalPositions: Array<number>) => Array<LinearChartSettingsSeriesStyleMarker>
Default value: null
Introduced in version 1.13.2.

Enables customizing the marker for each particular data point. The function receives an array of all horizontal indices that are being painted and an array of vertical positions for each marker. Both arrays have the same length.

The output has to be an array of the same length where each entry represents a marker that will be drawn for that value. If the array contains a null value that specific marker is not drawn.

Note that this method is not used when the marker is drawn for the legend entry.

This method will be invoked on each frame so it is important that it is optimized for performance.

Parameters
timestamps: Array<number>

The UTC timestamps of each unit that can display a marker.

verticalPositions: Array<number>
Return value
shadowBlur: number
Default value: 5

Shadow blur radius.

shadowColor: string
Default value: null

Shadow color of column. If undefined, no shadow will be applied. Leave empty to use default shadow or set your own shadow color.

shadowOffsetX: number
Default value: 1

Shadow direction, x component.

shadowOffsetY: number
Default value: -1

Shadow direction, y component.

smoothing: boolean
Default value: false

Whether to draw smoothed line.

steps: boolean
Default value: false

Whether to draw the line using horizontal segments instead of oblique.

tooltipColor: string
Default value: null

The series color in the tooltip. 'null' automatically determines based on existing color settings

tooltipGradient: GradientDefinition
Default value: null

A gradient range for tooltip color. Allows building a gradient fill, bound to values. In the case of tooltip, the tooltip will still be rendered with a solid color, but this allows easily specifying different colors depending on the tooltip value. Contains array of value-color pairs. For example: [[-20, 'rgba(0,0,255,0.4)'],[30,'rgba(255,0,0,0.7)']]. If specified fillGradientMode: "horizontal" or "vertical", then value denotes fraction of the column width and must be in interval from 0 to 1 For example: [[0,"black"],[0.5,"red"],[1, "orange"]].

tooltipShadowBlur: string
Default value: "1.5px"

What color the tooltip shadow is, as a CSS size string

tooltipShadowColor: string
Default value: "rgba(0.0,0.0,0.0,1.0)"

What color the tooltip shadow is, as a CSS color

tooltipShadowLightnessMaxThreshold: number
Default value: 0.0

The maximum level of tooltip color lightness where a shadow will be drawn, between 0 and 1. Shadow will still be drawn if it is within the other threshold.

tooltipShadowLightnessMinThreshold: number
Default value: 1.0

The minimum level of tooltip color lightness for a shadow to be drawn, between 0 and 1. Shadow will still be drawn if it is within the other threshold.

tooltipShadowSize: string
Default value: "0.5px"

How big the tooltip shadow is, as a CSS size string

X