Christiaan Maks
Christiaan Maks

Reputation: 3788

Highcharts polar steps

I'm trying to make a Highcharts polar chart, see this fiddle: http://jsfiddle.net/mgwf23me/

yAxis: {
  min: 0,
  max: 11,
  labels: {
    enabled: false
  }
},

The problem is that the yAxis max seems to go by steps of 5. With max on 11, the rendered max step is 15.

How do I change this behaviour to be steps of 1?

Upvotes: 1

Views: 168

Answers (1)

Halvor Holsten Strand
Halvor Holsten Strand

Reputation: 20536

This is due to endOnTick being true. From the max API description:

If the endOnTick option is true, the max value might be rounded up.

Set this to false, and the axis should have the correct height.

You may also want to adjust the ticks to make the lines show up appropriately. This can be done in a number of ways, using tickPositions, tickPositioner, tickInterval...

My simple suggestion is to do it like this (JSFiddle):

yAxis: {
    min: 0,
    max: 11,
    endOnTick: false, // For axis height
    tickPositions: [0,11], // For grid lines
    labels: {
        enabled: false
    }
}

Upvotes: 1

Related Questions