How to implement stripped background with ng2-charts?

Viewed 550

How can I implement shaded regions (stripped background) on charts using ng2-charts similar to chartjs library implementation of below? http://stackoverflow.com/questions/34860311/chart-js-shaded-regions

enter image description here

I have tried to shade regions of datasets check below image, but instead i want the background to be drawn as rectangular different regions with different colors. What i am facing right now is two issues

  1. I cannot figure-out where scale attribute with functions like scale.calculateY & scale.draw function within ng2-charts
  2. Even with the hardcoded values if i try to draw the rectangle it seems below two line of codes doesnt actually draw the rectangle background.

    this.chart.ctx.fillStyle = grd; this.chart.ctx.fillRect(20, 20, 150, 100);

enter image description here

0 Answers
Related