javascript - Is there any way to draw a pie chart using highstock latest version? -


i'm using highstock build stock charts.

my code looks this:-

var dataobj =  {     chart: {         type: 'pie',         renderto : 'container'     },     title: {         text: 'highstock testing',         align: 'left',         verticalalign: 'middle',         x: 27,         y: 0,         usehtml: true      },     rangeselector: {         enabled: false     },     plotoptions: {         pie: {             center: ['28%', '20%'],             datalabels:{"enabled":false},             enablemousetracking:false,             startangle: 180         }     },     subtitle: {         text:'<div style="color: #707070; font-family: proximanovaltsemibold; font-size: 15px;  white-space: nowrap; margin-top: -10px;margin-left: 12px;">testing</div>',         align: 'left',         usehtml:true,         verticalalign:'bottom',         y: 0     },     credits: {         enabled:false,         href: ''     },     navigator:{         enabled:false     },     navigation: {         buttonoptions: {             enabled: false         }     },     series: [{         name: 'usage',         data: [{"y":0,"color":"#80c3f0","visible":true},{"y":100,"color":"#d7d7d7","visible":true}],     size: '170%',     innersize: '185%'     }] };new highcharts.stockchart(dataobj);  

the above code working fine in version 2.0.3. not working in latest version of highstocks(2.1.8).

can explain me how achive in latest version of highstocks?

its working latest version of highstock (i.e. highstock js v2.1.8 (2015-08-20). see working fiddle here. missed wrap code inside jquery's document ready or $ . wrap code in

  $(function (){}); 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

node.js - Express and Redis - If session exists for this user, don't allow access -

excel - I can't get the attachement of the email PHP -