top of page

Customize Grid Lines in Sisense Charts

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:

  1. Create a bar/column/line/area chart and enable grid lines from design panel of widget

  2. 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'
})
  1. Save the script and refresh the widget


26 views0 comments
BI Next Level white logo

BI Next Level is your trusted resource for BI customization, data solutions, and expert insights. Explore practical tips, scripts, and tutorials for tools like Sisense, Python, and SQL. Let’s transform your data into impactful insights together.

Quick Links
Connect with us
Copyright © 2024. All Rights Reserved. Designed, Developed & Maintained  by Intertoons
bottom of page