Skip to content Skip to sidebar Skip to footer

Same Scale On X Y Axis In Highchart

I am trying to plot a trajectory using Javascript and highcharts, similarly to this minimal example: $(function () { $('#container').highcharts({ chart: { type: 'li

Solution 1:

You can control width and height for x/yAxis setting width/height options: http://jsfiddle.net/LLExL/3622/

    xAxis: {
        height: 200, 
        width: 200,
        title: {
            text: 'X'
        },
        min: 0,
        max: 6
    },

    yAxis: {
        height: 200,            
        width: 200,
        title: {
            text: 'Y'
        },
        min: 0,
        max: 6
    },

I also added min and max to make sure both axes have the same scale.


Solution 2:

You can use tickInterval with min and max on X and Y Axis : http://jsfiddle.net/LLExL/3620/

xAxis: {
    tickInterval: 2,
    min: 0,
    max: 6,
    ...
}

Post a Comment for "Same Scale On X Y Axis In Highchart"