OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Chart.js colored regions

  • Thread starter Thread starter Leexz
  • Start date Start date
L

Leexz

Guest
In an early post from 2016, I found a solution to my problem that I haven't been able to solve. I want to fill my area chart between two certain lines. I want my graph to have colored regions between two y-axis values that I set, without the color exceeding the graph/line itself. just like in this post:

"Chart.js shaded regions"

The answer with this attached image is exactly what I need: Graph with certain colored regions

Unfortunately, the solution from the linked stackoverflow problem is outdated and got used in Chart.js 2.x, while I use the newest one. I haven't been able to make this work.

Does anyone got any ideas for me?

Thanks!

I tried a few things, like creating custom datasets and colouring them, but that didn't yield anything worthwhile.

<p>In an early post from 2016, I found a solution to my problem that I haven't been able to solve.
I want to fill my area chart between two certain lines. I want my graph to have colored regions between two y-axis values that I set, without the color exceeding the graph/line itself. just like in this post:</p>
<p><a href="https://stackoverflow.com/questions/34860311/chart-js-shaded-regions">"Chart.js shaded regions"</a></p>
<p>The answer with this attached image is exactly what I need:
<a href="https://i.sstatic.net/Mlkad3pB.png" rel="nofollow noreferrer">Graph with certain colored regions</a></p>
<p>Unfortunately, the solution from the linked stackoverflow problem is outdated and got used in Chart.js 2.x, while I use the newest one. I haven't been able to make this work.</p>
<p>Does anyone got any ideas for me?</p>
<p>Thanks!</p>
<p>I tried a few things, like creating custom datasets and colouring them, but that didn't yield anything worthwhile.</p>
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top