Joe
Joe

Reputation: 4234

Area chart with two data points. Full width

I got problems with an area chart to full the entire width when I have two datapoints. Here's a js-fiddle. http://jsfiddle.net/user1572526/dG2s5/1/

It has something to do with the min and max value on the xAxis.

xAxis: {
    categories: ['2013', '2030'],
    min: 0.5,
    max: 1.5
},

I'm reading the docs but I cant figure out how to use theese when they are applied on the xAxis since I don't have any number values here. http://api.highcharts.com/highcharts#xAxis.min

Any ideas?

Upvotes: 0

Views: 60

Answers (1)

Strikers
Strikers

Reputation: 4776

That is not related to min/max

Its related point placement with respect to tick

in plotOptions > area you have pointPlacement.

pointPlacement: null //default
pointPlacement: 'on' // on the tick
pointPlacement: 'between' //between the ticks

Updated your fiddle at http://jsfiddle.net/dG2s5/2/

I hope this is what you are looking for.

Upvotes: 1

Related Questions