In HighStock, linking secondary yAxis to master yAxis can cause secondary values to be cropped outside the chart -
simplifying story, consider 2 series link yaxes. in other words on second yaxis there property linkedto: 0
so first yaxis master, hence sets extremes both series.
however second series has high values high plotted in visible area , cropped.
to make matters worse, when yaxes linked each other, legend doesn't play ball: clicking on master series name in legend hide both series. clicking on secondary series name hide none.
check out this jsfiddle - values on right cropped, legend functionality broken.
what missing? how can both series scale , visible? how legend work expected? (click on series name should toggle it)
thanks!
edit: turns out, if remove yaxis.id
(jsfiddle here) chart , legend work expected. linking series yaxis based on position in array (i think?) instead of id (string) sounds less ideal.
ideas?
why trying assigning second series axis copy
of proper one? advice set both series master yaxis, , second yaxis use info on right side of chart.
otherwise don't understand purpose of linking second axis same extremes master yaxis, , expecting scale yaxis according series have attached yaxis.
something think better approach, see: http://jsfiddle.net/zypcm/15/
series: [{ name: 'master', data: self.masterdata, yaxis: 'master' }, { name: 'secondary', data: self.secondarydata, //yaxis: 'secondary' }], yaxis: [{ id: 'master' }, { id: 'secondary', opposite: true, linkedto: 0 }]
Comments
Post a Comment