Same xy scale in highchart

I am trying to plot a path using Javascript and highcharts, similar to this minimal example:

$(function () { 

  $('#container').highcharts({
    chart: {
        type: 'line'
    },

    title: {
        text: 'PLOT'
    },

    xAxis: {
        title: {
            text: 'X'
        },
    },

    yAxis: {
        title: {
            text: 'Y'
        },
    },

    series: [{
        name: 'Trajectory',
        data: [[1,2],[5,0],[0,0],[3,4]]
    }]
  });
});

( http://jsfiddle.net/LLExL/3614/ )

Since the unit of values ​​for x and y is equal to meters, I would like to scale the same as the axis, otherwise my path will be very distorted (if you are familiar with Matlab, I want to achieve the same result as in the "axis equal" option for the standard function "matlab" the plot: )

Do you have any ideas on how I can achieve the same result in tall charts? Thank!

+4
source share
2 answers

x/yAxis width/height: 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
    },

min max, .

+3

tickInterval min max X Y: http://jsfiddle.net/LLExL/3620/

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

All Articles