javascript - Highcharts X-axis labels on the side -


i'm using highcharts, , used able labels on side.. it's not working now, missing something? the red arrow want labels in following example

http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/bar-basic/

enter image description here

this code i'm using, add series in dynamic way.

 credits: {                 enabled: false             },             chart: {                 type: 'bar'             },             xaxis: {                 categories: ['jan', 'feb'],                 labels: {                     enabled: true,                 }             },             yaxis: {                 min: 0,                 max: 100,                 title: {                     text: 'score',                     align: 'high'                 }             },             plotoptions: {                 bar: {                     datalabels: {                         enabled: true                     }                 }             }         });          // add series         var detailchart = $('#chart-detail').highcharts();         var categories = new array;          // set chart title         detailchart.settitle({text: results[0].category});          $.each(results, function(i, data){             categories.push(data.name);             detailchart.addseries({                 name: data.name,                 data: [data.score]             });         });          detailchart.xaxis[0].setcategories(["1", "2"]);         $('#chart-detail').highcharts().reflow(); 

results array looks ( through ajax )

enter image description here

any appreciated! thank you

only need use 4 series, each of them single data point.

series: [{         name: 'year 1800',         data: [107]     }, {         name: 'year 1900',         data: [138]     }, {         name: 'year 2008',         data: [973]     },{         name: 'year 20098',         data: [973]     }] 

example: http://jsfiddle.net/y9wzggc4/


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -