title: Difference between highcharts and highstock during real time trace and xAxis with max value
body: <p>I got a problem with highstock.
  I'm trying to add real time data to my chart.
  But I noticed different behaviour from highchart and highstock when max xAxis is set.</p>
  
  <p>For example, if the xAxis max is 100 and I add the value 20:
  - in the highcharts one, the value is added in the first half of the chart
  - in the highstock one, the value is added at the end, at the margin of the chart</p>
  
  <p>Look this two running examples:</p>
  
  <p>highcharts: <a href="http://jsfiddle.net/Jy83b/" rel="nofollow">http://jsfiddle.net/Jy83b/</a></p>
  
  <p>highstock: <a href="http://jsfiddle.net/mE6XM/" rel="nofollow">http://jsfiddle.net/mE6XM/</a></p>
  
  <p>I need the highcharts behaviour in the highstock chart..
  How can I solve it?</p>
  
  <p>Thank you!</p>
  
  <p>highcharts code</p>
  
  <pre><code>  var pippo = (new Date()).getTime() + 60000;
    $(function () {
        $(document).ready(function() {
            Highcharts.setOptions({
                global: {
                    useUTC: false
                }
            });
  
            var chart;
            $('#container').highcharts({
                chart: {
                    type: 'spline',
                    animation: Highcharts.svg, // don't animate in old IE
                    marginRight: 10,
                    events: {
                        load: function() {
  
                            // set up the updating of the chart each second
                            var series = this.series[0];
                            setInterval(function() {
                                var x = (new Date()).getTime(), // current time
                                    y = Math.random();
                                series.addPoint([x, y], true, false);
                            }, 1000);
                        }
                    }
                },
                title: {
                    text: 'Live random data'
                },
                xAxis: {
                    type: 'datetime',
                    tickPixelInterval: 150,
                    max: pippo
                },
                yAxis: {
                    title: {
                        text: 'Value'
                    },
                    plotLines: [{
                        value: 0,
                        width: 1,
                        color: '#808080'
                    }]
                },
                tooltip: {
                    formatter: function() {
                            return '&lt;b&gt;'+ this.series.name +'&lt;/b&gt;&lt;br/&gt;'+
                            Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) +'&lt;br/&gt;'+
                            Highcharts.numberFormat(this.y, 2);
                    }
                },
                legend: {
                    enabled: false
                },
                exporting: {
                    enabled: false
                },
                series: [{
                    name: 'Random data',
                    data: (function() {
                        // generate an array of random data
                        var data = [],
                            time = (new Date()).getTime(),
                            i;
  
                        for (i = -19; i &lt;= 0; i++) {
                            data.push({
                                x: time + i * 1000,
                                y: Math.random()
                            });
                        }
                        return data;
                    })()
                }]
            });
        });
  
    });
  </code></pre>
  
  <p>highstock code</p>
  
  <pre><code>  var pippo = (new Date()).getTime() + 60000;
    $(function () {
        $(document).ready(function() {
            Highcharts.setOptions({
                global: {
                    useUTC: false
                }
            });
  
            var chart;
            $('#container').highcharts('StockChart',{
                chart: {
                    type: 'spline',
                    animation: Highcharts.svg, // don't animate in old IE
                    marginRight: 10,
                    events: {
                        load: function() {
  
                            // set up the updating of the chart each second
                            var series = this.series[0];
                            setInterval(function() {
                                var x = (new Date()).getTime(), // current time
                                    y = Math.random();
                                series.addPoint([x, y], true, false);
                            }, 1000);
                        }
                    }
                },
                title: {
                    text: 'Live random data'
                },
          exporting: {
              enabled: false
          },
          rangeSelector: {
                enabled: false
          },
          navigator : {
              enabled : false
          },
            scrollbar : {
              enabled : false
          },
          legend : {
              enabled : false
          },
                xAxis: {
                    type: 'datetime',
                    tickPixelInterval: 150,
                    max: pippo
                },
                yAxis: {
                    title: {
                        text: 'Value'
                    },
                    plotLines: [{
                        value: 0,
                        width: 1,
                        color: '#808080'
                    }]
                },
                tooltip: {
                    formatter: function() {
                            return '&lt;b&gt;'+ this.series.name +'&lt;/b&gt;&lt;br/&gt;'+
                            Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) +'&lt;br/&gt;'+
                            Highcharts.numberFormat(this.y, 2);
                    }
                },
                legend: {
                    enabled: false
                },
                exporting: {
                    enabled: false
                },
                series: [{
                    name: 'Random data',
                    data: (function() {
                        // generate an array of random data
                        var data = [],
                            time = (new Date()).getTime(),
                            i;
  
                        for (i = -19; i &lt;= 0; i++) {
                            data.push({
                                x: time + i * 1000,
                                y: Math.random()
                            });
                        }
                        return data;
                    })()
                }]
            });
        });
  
    });
  </code></pre>
  
  <p><em><strong>Solved it!</em></strong></p>
  
  <p><em><strong>Added ordinal: false to xAxis</em></strong></p>