estellela2
Posts: 13
Joined: Fri Dec 02, 2022 1:41 pm

Add a line "Total errors: " which adds up the false positives and negatives

Hello,

I want to add a "Total errors: " line that sums the false positive and negative lines while keeping the graph on this photo:
Capture d’écran 2023-03-17 à 17.03.30.png
Capture d’écran 2023-03-17 à 17.03.30.png (158.58 KiB) Viewed 181 times
Thank you for your help!
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Add a line "Total errors: " which adds up the false positives and negatives

Hi,

Thanks for the question!

You could use chart.addSeries within the chart.events.load event where you have access to the entire chart object and your "False Negatives" and "False Positives" data.

Here's a demo: https://jsfiddle.net/BlackLabel/bv6p10od/

API:
- https://api.highcharts.com/highcharts/chart.events.load
- https://api.highcharts.com/class-refere ... #addSeries

Let me know if that's what you were looking for!

Best regards,
Jakub
Jakub
Highcharts Developer
estellela2
Posts: 13
Joined: Fri Dec 02, 2022 1:41 pm

Re: Add a line "Total errors: " which adds up the false positives and negatives

Hi Jakub,

That's not what I'm looking for in a graphic style.

Here is what I am looking to do, currently I have window 1 and what I am looking for is window 2.
Graphique-email.png
Graphique-email.png (99.18 KiB) Viewed 164 times
Is this possible to do?

Thanks for your help!
jakub.s
Posts: 1164
Joined: Fri Dec 16, 2022 11:45 am

Re: Add a line "Total errors: " which adds up the false positives and negatives

Hi,

Of course, you can put anything in your tooltip with tooltip.formatter.

Here's a demo: https://jsfiddle.net/BlackLabel/8cu02yam/

API: https://api.highcharts.com/highcharts/tooltip.formatter

Let me know if that's what you were looking for.

Best regards,
Jakub
Jakub
Highcharts Developer

Return to “Highcharts Usage”