Forum Discussion
Hi harikm007 ,
Thanks for sharing. Would it be possible (with a script) to add an arrow/line so this would look more like a guage?
- harikm00703-15-2022Data Warehouse
Hi HamzaJ ,
It is possible to draw line by finding the coordinates (I applied only basic style to the line):
update the variable 'percent' with percentage at which line to be displayed
widget.on('processresult', function(se, ev){ ev.result.plotOptions.pie.startAngle= -90, ev.result.plotOptions.pie.endAngle= 90, ev.result.plotOptions.pie.center= ['50%', '85%'], ev.result.plotOptions.pie.size= '110%' ev.result.plotOptions.pie.innerSize= '50%' }) widget.on("ready", function(w, args){ var percent = 35 //Percentage value to display line chart = w.chart[0][Object.keys(w.chart[0])[0]].hc var point = chart.series[0].data[0]; var dx = chart.plotBox.x, dy = chart.plotBox.y; var radius = chart.series[0].data[0].shapeArgs.r; var angle = ((100 - percent)*-3.142)/100 x = (radius * .9 * Math.cos(angle)) + point.shapeArgs.x, y = (radius * .9 * Math.sin(angle)) + point.shapeArgs.y; var x2 = (radius * 0.1 * Math.cos(angle)) + point.shapeArgs.x, y2 = (radius * 0.1 * Math.sin(angle)) + point.shapeArgs.y; chart.renderer.path({ 'stroke': '#2c9147', //Color of line 'stroke-width': 3, zIndex: 3, 'd': ['M', x2 + dx, y2 + dy, 'L', x + dx, y + dy] }).add(); });-Hari
- HamzaJ03-18-2022Data Integration
Hi harikm007 ,
I dont know if it is possible or if you can help me out, however my end-user wants it a bit different. This is what I have thanks to you:
However the end-user wants to go more like this:
It needs to look more and more like a gauge, however sisense does not allow different values to make up the gauge. The norm is just a percentage of the total so the original addition I can still use. However adding a number that shows the total amount of time , is that possible?