Forum Discussion

Ophir_Buchman's avatar
Ophir_Buchman
Data Integration
04-11-2022

Line Chart - Customizing a line to various "Dotted" styles

When creating a line chart, a certain line might require a different style.

For example - A line that shows a threshold should be styled as a dotted line

The following widget & widget script can be used to customize your line chart:

widget.on('processresult', function(widget, result) {
let series = result.result.series;
series[1].dashStyle = 'Dot'
})

 Result:

Before After

Available line styles:

  • Solid
  • ShortDash
  • ShortDot
  • ShortDashDot
  • ShortDashDotDot
  • Dot
  • Dash
  • LongDash
  • DashDot
  • LongDashDot
  • LongDashDotDot'

 

1 Reply

Replies have been turned off for this discussion
  • zach_myt's avatar
    zach_myt
    Data Pipeline

    I found this useful to alter the lineWidth of an individual line as well using.

    widget.on('processresult', function(widget, result) {
    let series = result.result.series;
    series[0].lineWidth = 7 
    })