Highcharts polar steps

Christiaan Maks

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?

Halvor Holsten Strand

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
    }
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related