Grid lines in charts help make the data easier to read by providing a clear reference. Sometimes, you may want to change the grid lines to match your dashboard's colors, make them stand out more, or switch the style (like using solid or dashed lines).
Sisense doesn’t have an option to customize grid lines directly, but don’t worry—you can do it easily with a simple script.
In the screenshot below, the color of the X-axis grid lines has been changed to red, while the Y-axis grid lines are now green. Here’s how you can do it.
Steps:
Create a bar/column/line/area chart and enable grid lines from design panel of widget
Add below script to widget. Update color, dash style and width as per your requirement
widget.on('processresult', function(w, args){
// X-axis grid lines customization
args.result.xAxis.gridLineColor = 'red'
args.result.xAxis.gridLineDashStyle = 'ShortDash' //Possible values'Solid', 'ShortDash','ShortDot','ShortDashDot','ShortDashDotDot','Dot','Dash','LongDash','DashDot','LongDashDot','LongDashDotDot'
args.result.xAxis.gridLineWidth = '1'
// Y-axis grid lines customization
args.result.yAxis[0].gridLineColor = 'green'
args.result.yAxis[0].gridLineDashStyle = 'ShortDash'
args.result.yAxis[0].gridLineWidth = '2'
})
Save the script and refresh the widget
Comments