Search code examples
dygraphs

How can I create area under in line in Dygraph


I have seen the "Stacked" charts in Dygraph gallery, and I would like to create something similar but WITHOUT the stacking. i.e. just fill the are below the line to the y-axis zero line with a chosen colour.

Is this possible?

What options would I need to provide?


Solution

  • Yes, in your options array, you can set it to fillGraph as below

    {
        legend: 'always',   
        title: 'Graph Name',   
        ylabel: 'Incoming MBps',   
        xlabel: 'Date Time',   
        fillGraph: true,   
        stackedGraph: false
    }
    

    Here is the rest of the reference:

    http://dygraphs.com/options.html#fillGraph