Filling area between two lines - Chart.js v2

后端 未结 3 1298
不知归路
不知归路 2021-01-04 09:50

I am trying to fill the area between two lines in a line chart using Chart.js. Like this:

There is already an answer here, that explains how to extend chartjs to do

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-04 10:25

    Make sure you import the 2.6.0 version:

    
    

    Then follow the rules as described here: http://www.chartjs.org/docs/latest/charts/area.html

    Below is an example, and how it looks:

    
    
        
            
            My two lines with colour between them
            
       
        
            
            
        
    
    

提交回复
热议问题