javascript - Highcharts columns have no width (seemingly arbitrarily) -
i'm working column chart using highcharts. chart needs handle arbitrary number of columns.
here's example of 1 such chart need handle:
$('#timeschart2').highcharts({ chart: { type: 'column' }, title: { text: 'response times' }, xaxis: { type: 'datetime', datetimelabelformats: { // don't display dummy year month: '%e. %b', year: '%b' } }, yaxis: { title: { text: 'minutes' } }, series: [{ name: 'average response time', data: [[date.utc(2013, 6, 30), 878.42], [date.utc(2013, 6, 31), 579.68], [date.utc(2013, 7, 1), 400.42], [date.utc(2013, 7, 2), 622.95], [date.utc(2013, 7, 5), 1260.97], [date.utc(2013, 7, 3), 0], [date.utc(2013, 7, 4), 0], [date.utc(2013, 7, 6), 517.945] ], datagrouping: { enabled: false }, pointpadding: .05 }], });
the problem columns have extremely small width on set of data. in datasets (see first graph in jsfiddle link), columns have normal width , fine.
one possible workaround set pointwidth fixed value, on large graphs columns overlap. i've tried experimenting pointpadding , grouping well, no avail.
anyone know what's happening here?
that's odd. but, you're first data series in reverse date order. if fix that, chart right.
series: [{ name: 'average response time', data: [[date.utc(2013, 7, 2), 354.5], [date.utc(2013, 7, 3), 1981.875], [date.utc(2013, 7, 4), 434.5], [date.utc(2013, 7, 5), 678.1], [date.utc(2013, 7, 6), 87.465] ], datagrouping: { enabled: false }, pointpadding: .05 }],
(note changed dates, didn't change data)
Comments
Post a Comment