0

I'm trying to add a vertical line to at a set point of a horizontal bar chart. Examples I've found do not seem to apply to charts.js 2. Even if I create a new chart type and use the horizontalBar draw method with no modifications, the chart won't draw.

Chart.controllers.horizontalBarWithLine = Chart.controllers.horizontalBar.extend({
    draw: function () {
        Chart.controllers.horizontalBar.prototype.draw.apply(this, arguments);
    }
});

Can anyone explain how to extend this chart?

Here's my current attemp: https://jsfiddle.net/dwelch/6f1gfog2/

user3113357
  • 128
  • 8

1 Answers1

0

Please see my answer to this question. I think this is what you are looking for:

How do I draw a vertical line on a horizontal bar chart with ChartJS?

Community
  • 1
  • 1
Joel Richman
  • 1,894
  • 12
  • 13