For any support or more customized script, contact us -  binextlevel@gmail.com

Convert widget to 3D

By default, most of the Sisense widget are 2D. We can convert them to 3D using below script


Steps:


  1. Create bar/column/pie chart

  2. Add below script to widget. (Change alpha, beta, depth based on you requirement - it will change different angles of 3d chart)

  3. Save script and refresh the widget

Script for Column chart:


widget.on('processresult', function(se, ev){
	ev.result.chart.options3d = {
            enabled: true,
            alpha: 15,
            beta: 15,
            depth: 250,
            viewDistance: 25
        }
		
	ev.result.plotOptions.column.depth = 35
	ev.result.plotOptions.column.borderWidth = 0	
})


Script for Bar chart:


widget.on('processresult', function(se, ev){
	ev.result.chart.options3d = {
            enabled: true,
            alpha: 15,
            beta: 15,
            depth: 250,
            viewDistance: 25
        }
	
	ev.result.plotOptions.bar.depth = 35
	ev.result.plotOptions.bar.borderWidth = 0	
})

Script for Pie chart:


widget.on('processresult', function(se, ev){
	ev.result.chart.options3d = {
            enabled: true,
            alpha: 45,
            beta: 0
        }
	ev.result.plotOptions.pie.depth = 50	
})

12 views0 comments

Recent Posts

See All