top of page

Add target/benchmark line to a chart in Sisense

Below script allow us to plot a static target line in a chart.

Supported chart types : Bar chart, Column chart, Line chart, Area chart





widget.on('processresult', function(se, ev){

	ev.result.yAxis[0].plotLines = [{
				color: '#2ec7b5',
				dashStyle: 'LongDash',
				width: 4,
				value: 800,
				zIndex: 5,
				label : {
					text : 'Target'
				}
            }]
})

Possible values of dashStyle are :

'Solid',

'ShortDash',

'ShortDot',

'ShortDashDot',

'ShortDashDotDot',

'Dot',

'Dash',

'LongDash',

'DashDot',

'LongDashDot',

'LongDashDotDot'



479 views2 comments

2 comentarios

Obtuvo 0 de 5 estrellas.
Aún no hay calificaciones

Agrega una calificación
dball
12 nov

Hi there - thanks for this website, it's a fantastic resource. Is it possible to create a dashboard script that will plot the same y-axis line (i.e. with the same value and properties) for all line charts within the dashboard? This would be super helpful for streamlining a few processes for me. Cheers!

Me gusta

Shnakepup
25 sept
Obtuvo 4 de 5 estrellas.

I was able to get this to work on Bar Charts, Column Charts, and Area Charts, but NOT Line Charts. Is there maybe a different script for Line Charts? If not, is there a particular way the Line Chart needs to be configured for the script to work correctly? Alternatively, does this script require a certain version of Sisense to work correctly (we have an older windows version)?

Me gusta
bottom of page