cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Column Custom Number Abbreviation (kW instead of K)

jeffreyl
8 - Cloud Apps
8 - Cloud Apps

I have a column chart where I need the number abbreviation to be kW instead of K and have been unable to find a solution.

Thank you

2 REPLIES 2

Sijo1995
9 - Travel Pro
9 - Travel Pro

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

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!!