title: Dynamically draw marker on last point in highcharts
body: <p>I want to draw a marker on the last point. Data source is dynamic.
  Have a look at following code</p>
  
  <pre><code>$(function() {
  
      $("#btn").click(function() {
          var l = chart.series[0].points.length;
          var p = chart.series[0].points[l - 1];
          p.marker = {
              symbol: 'square',
              fillColor: "#A0F",
              lineColor: "A0F0",
              radius: 5
          };
          a = 1;
          chart.series[0].points[l - 1] = p;
          chart.redraw(false);
  
      });
  
  
  
      var ix = 13;
      var a = 0;
  
      var chart = new Highcharts.Chart({
          chart: {
              renderTo: 'container',
              events: {
                  load: function() {
                      var series = this.series[0];
                      setInterval(function() {
                          ix++;
                          var vv = 500 + Math.round(Math.random() * 40);
                          chart.series[0].data[0].remove();
                          var v;
                          if (a == 1) v = {
                              y: vv,
                              x: ix,
                              marker: {
                                  symbol: 'square',
                                  fillColor: "#A0F",
                                  lineColor: "A0F0",
                                  radius: 5
                              }
                          }
                          else v = {
                              y: vv,
                              x: ix
                          }
  
                          a = 0;
  
                          series.addPoint(v);
                      }, 1500);
                  }
              }
          },
          plotOptions: {
              series: {}
          },
  
          series: [{
              data: [500, 510, 540, 537, 510, 540, 537, 500, 510, 540, 537, 510, 540, 537]}]
      });
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/9zNUP/" rel="nofollow">http://jsfiddle.net/9zNUP/</a></p>
  
  <p>On button click event I am trying to draw marker on last point which is already added to chart.</p>
  
  <p>Is there a way to do that??</p>