0

I am using Highcharts and I have a histogram with bull curve behind. Everything works well, bell curve generates mean and standard deviation numbers . I would like to know if there is a way of passing the mean and standard deviation numbers that are on top of the curve to an outside function so that I can conduct another statistical operation with them.

Thanks,

  • Include code to allow others to reproduce the problem. For help with this, read [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/minimal-reproducible-example). – Pawel Kam Jul 05 '22 at 21:12

1 Answers1

0

You can get the required values from created chart. For example:

const chart = Highcharts.chart('container', {
    ...
});

const bellCurveSeries = chart.series[0];
const mean = bellCurveSeries.mean;
const xData = bellCurveSeries.xData;
const yData = bellCurveSeries.yData;

console.log(mean, xData, yData);

Live demo: https://jsfiddle.net/BlackLabel/v7prbxmo/

API Reference: https://api.highcharts.com/class-reference/Highcharts.Chart#series

ppotaczek
  • 36,341
  • 2
  • 14
  • 24