cYn
cYn

Reputation: 3381

Highcharts center on x and y axis offset

First, for reference I'm trying to mimic this chart:

enter image description here

Currently my chart looks like this: http://jsfiddle.net/eA4Df/

What's the option to center the (1, 1) coordinates of the chart but still display all of the bubble data?

Current highcharts options are:

    chart: {
        type: 'bubble',
        zoomType: 'xy'
    },
    legend: {
        enabled: false
    },
    credits: {
        enabled: false
    },
    title: {
        text: 'Highcharts Bubbles'
    },
    xAxis: {
        plotLines: [{
            color: '#000000',
            width: 2,
            value: 1
        }]
    },
    yAxis: {
        plotLines: [{
            color: '#000000',
            width: 2,
            value: 1
        }]
    }

Upvotes: 0

Views: 1088

Answers (2)

Sebastian Bochan
Sebastian Bochan

Reputation: 37588

Instaed of plotLines, you can move your axis by offset parameter or use plugin

Upvotes: 0

lpg
lpg

Reputation: 4937

You can try to set min and max values for the axis:

xAxis: {
    plotLines: [{
        color: '#000000',
        width: 2,
        value: 1
    }],
    max: 2,
    min: 0
},
yAxis: {
    plotLines: [{
        color: '#000000',
        width: 2,
        value: 1
    }],
     max: 2,
    min: 0
},

Example SQL FIDDLE HERE

Upvotes: 2

Related Questions