user2137186
user2137186

Reputation: 837

add point to new series of some specific category

I am trying to add a new series and then add point in specific category of chart (say December and august) , but I am unable to see point on graphs

HTML Code

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

here is the filddle

Upvotes: 0

Views: 75

Answers (1)

Sebastian Bochan
Sebastian Bochan

Reputation: 37578

You can use addSeries with defined point based on x/y coordinates.

  setTimeout(function () {
        var lastPoint = chart.xAxis[0].categories.length-1;
        chart.addSeries({
            name: 'hello' + '',
            data: [[lastPoint,50]]
        });
    }, 1);

http://jsfiddle.net/EKPZz/7/

Upvotes: 3

Related Questions