highcharts - Highstock area type comparison chart needs to display area fully -
i have comparison chart of "area" type. want 1 of series area , others line this
![intended comparison chart][1] https://docs.google.com/file/d/0b9cp3yk--vzsrdvruffhevhdqzq/edit?usp=sharing
but using highstock i'm getting chart
is there anyway draw area on chart.
thanks in advance.
edit:- have used following code
$(function() { var seriesoptions = [], yaxisoptions = [], seriescounter = 0, names = ['msft', 'aapl', 'goog'], colors = highcharts.getoptions().colors; $.each(names, function(i, name) { $.getjson('http://www.highcharts.com/samples/data/jsonp.php?filename='+ name.tolowercase() +'-c.json&callback=?', function(data) { if(name == 'aapl'){ seriesoptions[i] = { name: name, data: data, type : "area" }; }else{ seriesoptions[i] = { name: name, data: data, type : "line" }; } // we're loading data asynchronously, don't know order arrive. // keep counter , create chart when data loaded. seriescounter++; if (seriescounter == names.length) { createchart(); } }); }); // create chart when data loaded function createchart() { $('#container').highcharts('stockchart', { chart: { }, rangeselector: { selected: 4 }, yaxis: { labels: { formatter: function() { return (this.value > 0 ? '+' : '') + this.value + '%'; } }, plotlines: [{ value: 0, width: 2, color: 'silver' }] }, plotoptions: { series: { compare: 'percent' } }, tooltip: { pointformat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.change}%)<br/>', valuedecimals: 2 }, series: seriesoptions }); }
});
here fiddle
you need modify threshold parameter.
Comments
Post a Comment