Highchart merge won't enable labels in xAxis -


i have problem highcharts - trying take existing chart, merge new one, alter few properties , show it.

the problem i'm getting can't seem enable xaxis labels in copied chart. if turn them on in original chart exist in copied one, there seems no way of altering enabled state. jsfiddle below:

http://jsfiddle.net/liamfl/a7xvfyg6/

the code follows:

var chart_portfoliodetailsdistribution; var popupchart;  $(document).ready(function () {     chart_portfoliodetailsdistribution = new highcharts.chart({         chart:{animation:false,renderto:'smallchart3'}         ,title:{text:'distribution'}         ,tooltip:{headerformat:'',pointformat:'<b>{point.name}</b>: {point.y}'}         ,legend:{enabled:false}         ,credits:{enabled:false}         ,plotoptions:{series:{animation:false,borderwidth:0,datalabels:{format:'<b>{point.y}</b>'}         ,grouppadding:0,pointpadding:0}     }     ,yaxis:{         title:{text:null}     }     ,xaxis:{         labels:{enabled:false,rotation:-90}         ,title:{text:null}         ,type:'category'     }     ,series:[{         data:[['<-10%',0],['<-5%',3],['<-2.5%',3],['<-1%',2],['<0%',10],['>0%',3],['>1%',0],['>2.5%',0],['>5%',0],['>10%',0]],         name:'portfolio',         type:'column'}]     });      popupchart = new highcharts.chart(highcharts.merge(chart_portfoliodetailsdistribution.options, {             chart: { renderto: 'smallchart4' },             xaxis: { labels: { enabled: true }},             legend: { enabled: true },             plotoptions: { series: { datalabels: { enabled: true } }}         })); }); 

any ideas? i'm stumped (which me natural state...)

xaxis returned .options array of objects. so, when merge need merge array.

http://jsfiddle.net/a7xvfyg6/1/

highcharts.chart(highcharts.merge(chart_portfoliodetailsdistribution.options, {         chart: { renderto: 'smallchart4' },         xaxis: [{ labels: { enabled: true }}],         legend: { enabled: true },         plotoptions: { series: { datalabels: { enabled: true } }}     })); 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -