Forum Discussion
Sijo1995
12-08-2022Cloud Apps
Hi jeffreyl ,
Please try this script
widget.on('domready', function(se, ev){
$("widget[widgetid=''] cartesianchart .highcharts-root .highcharts-stack-labels text tspan").each(function(i, obj)//widgetid number pls add
{
var Valuetext=$(this).text().split(',').join('');
if($.isNumeric(Valuetext)){
value = parseFloat(Valuetext)/1000000.0;
var decValue = value.toFixed(2);
var newValue=decValue+'KW';
$(this).text(newValue);
}
})
})
Thanks
Sijo
- jeffreyl12-10-2022Cloud Apps
Sijo,
Thank you for the code. It does change the abbrev to kW which is Great. On the chart I am trying to modify it causes the numbers to change as an example from 4325 to 00.100. Not sure why but I can see that your code is making the change I am looking for. Thank you. Next week I will create a new basic chart and test. It's possible the other options/code I have in this widget is causing the issue. Thank You!!