Highcharts numbers formatting K, M and B

I want to show either K , M or B for the number. Also, Iwant to have a comma separator for thousands. Please help.

This is not working for millions and billions but working for K.

{#if (gt point.y 999999999)}{(divide point.y 1000000000):,.1f}B {else if((gt point.y 999999)and(lt point.y 1000000000)) } {(divide point.y 1000000):,.1f}M {else} {(divide point.y 1000):,.1f}K {/if}

Hi @adevaraj,
The tooltip and value labeling in highcharts can still be a bit limited with some of the formatting options that exist in QuickSight’s version. I don’t believe you’re able to setup dynamic value options (see this previous post that explored a similar scenario). I believe the best work around would be to design calculated fields that handle the calculations and assign the formatting of ‘k’, ‘m’, or ‘b’.

In regards to the comma separators; through all of my testing, I haven’t been able to get them included correctly; I believe this may still be a limitation.

Some feature upgrades/additions to the highchart tool tips would be very useful so I can mark this as a feature request as well.

@Brett Thanks for your response. I had the k,m and b logic working earlier with if else statements. I lost that code and unable to recreate. I had used highcharts template when I built the function earlier.

Thanks for the update on comma.

Thanks,

Amita