5

I want to give 5 px shadow in right side of the bar. Is it possible?

I want to give 5 px shadow in right side o

ali
  • 557
  • 2
  • 13

1 Answers1

4

You should use the Renderer which allows to add custom paths in chart. Knowing that, catch the load event and iterate on each series point, adding line in right side.

chart: {
  type: 'column',
  events: {
    load: function() {
      var chart = this,
        series = chart.series,
        each = Highcharts.each,
        r = chart.renderer,
        borderWidth  = 2,
        x,y;

      each(series, function(s, i) {
        each(s.data, function(p, j) {
                        x = p.plotX + chart.plotLeft + (p.pointWidth / 2);
                        y = p.plotY + chart.plotTop + borderWidth;

          r.path(['M', x, y, 'L', x, y + p.shapeArgs.height])
          .attr({
            zIndex: 10,
            'stroke-width': borderWidth,
            'stroke': 'gray'
          })
          .add()
        });
      });
    }
  }
},

Example: - http://jsfiddle.net/2reombm7/

Sebastian Bochan
  • 37,348
  • 3
  • 49
  • 75
  • Awesome one. Thank you so much. Can you please mark this question up as a useful, someone marked it down :( – ali May 17 '16 at 06:54