Vangi
Vangi

Reputation: 724

Dealing with large numbers on yAxis

I'm trying to use Highstock with numbers that are close to the maximum number (http://www.w3schools.com/jsref/jsref_max_value.asp) but I get error in highstock: Error: Invalid value for attribute d="M 0 -Infinity.

Here is an example:

$('#container').highcharts('StockChart', {

            series : [{
                data : [1.7976931348623157e+20, 
                       1.7976931348623157e+30, 
                       1.7976931348623157e+50, 
                       1.7976931348623157e+100, 
                       1.7976931348623157e+120, 
                       1.7976931348623157e+150, 
                       1.7976931348623157e+170, 
                       1.7976931348623157e+200, 
                       1.7976931348623157e+230, 
                       1.7976931348623157e+260, 
                       1.7976931348623157e+300, 
                       1.7976931348623157e+308]
            }]
        });

Also you can see it at jsfiddle: http://jsfiddle.net/s6gscza2/2/

I guest the Highstock should show the maximum number or I'm missing some settings.

Upvotes: 1

Views: 138

Answers (1)

Sebastian Bochan
Sebastian Bochan

Reputation: 37588

It means that you have too much digits, because javascrpt function toFixed() is limited to 20 digits.

Upvotes: 1

Related Questions