How can I help you?
SeriesLabelSettings
16 Mar 20261 minute to read
Configures options for displaying series names as inline labels in the chart. *
Code Example
const chart = new Chart({
series: [{
type: ‘Line’,
name: ‘Revenue’,
dataSource: data,
xName: ‘x’,
yName: ‘y’,
labelSettings: {
visible: true,
text: ‘Total Revenue’,
background: ‘#E8F5E9’,
border: { width: 1, color: ‘#2E7D32’ },
opacity: 0.9,
font: { size: ‘12px’, fontWeight: ‘600’, color: ‘#2E7D32’ },
showOverlapText: false
}
}]
})
Properties
background string
Specifies the background color of the inline series label.
Defaults to ‘transparent’
border BorderModel
Specifies the border properties for the inline label.
Includes color and width.
Defaults to { color: ‘’, width: 0 }
font FontModel
Specifies the font properties for the series name label.
This includes customization options such as font size, color, style, weight, and family.
opacity number
Sets the opacity of the series label.
Defaults to 1
showOverlapText boolean
Determines whether to show the label text even when it overlaps with other labels.
Defaults to false
text string
Defines the custom text to display as the series label.
If not specified, the series name will be used.
Defaults to null
visible boolean
Enables or disables the rendering of series names as inline labels.
Defaults to false