codershikhar
Posts: 1
Joined: Sat Sep 16, 2023 1:55 pm

Highchart Angular Abs Function Not Working

I am trying to replicate the following Javascript graph in Angular.
https://www.highcharts.com/demo/highcha ... tive-stack

To make this work I need abs function to work in format for labels.

How to make it work?
jakub.j
Posts: 1084
Joined: Tue Jan 24, 2023 11:14 am

Re: Highchart Angular Abs Function Not Working

Welcome to our forum and thanks for contacting us with your question!

Instead of tooltip.format, you can use tooltip.formatter and use js Math.abs method inside along with toFixed(). It gives the same result.

Demo: https://stackblitz.com/edit/highcharts- ... mponent.ts

Let me know if you have any further questions!
Best regards
Jakub
Jakub
Highcharts Developer

Return to “Highcharts Usage”