$(document).ready(function() { chart1 = new Highcharts.Chart({ chart: { renderTo: 'QueryResultsChart', type: 'bar' }, title: { text: 'Production History' }, xAxis: { title: { text: 'Production Day' }, type: 'datetime' }, yAxis: { title: { text: 'Gross Production' } }, series: [{ name: 'Data', data: [] }] }); chart1.series[0].setData(". json_encode($aChartData) ."); });
The data is there an correct, it's just showing my xAxis on the yAxis for some reason...
A vertical bar graph is the most common type of bar chart and it is also referred to as a column graph. It represents the numerical value of research variables using vertical bars whose lengths are proportional to the quantities that they represent.
In a bar graph, bars can be drawn horizontally or vertically.
Vertical bar charts are called column
's in Highchart.
Change this:
type: 'column' //was 'bar' previously`
See example here: http://jsfiddle.net/aznBb/
To expand on Moin Zaman's answer, I played with his jsfiddle http://jsfiddle.net/aznBb/ and found this.
This is horizontal.
chart: { type: 'bar', inverted: false // default }
This is also horizontal.
chart: { type: 'bar', inverted: true }
This is vertical.
chart: { type: 'column', inverted: false // default }
This is horizontal and apparently identical to the bar charts.
chart: { type: 'column', inverted: true }
Very odd. I can only guess that type: 'bar'
aliases type: 'column'
and forces inverted: true
no matter what it's actually set at. It'd be nice if it just toggled the inverted
boolean.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With