Rickshaw.js gradient color on area chart?

314 views Asked by At

I am trying to create an area chart with gradient, like shown in the image. I don't see where can I specify the gradient. I have created a CSS class and tried to add it to the chart series

var graph_lc2 = new Rickshaw.Graph({
  element: document.getElementById("linechart2"),
  height: 100,
  renderer: 'area',
  stroke: true,
  preserve: true,
  series: [{
    className: 'my-gradient',
    data: seriesData[1],
    name: 'Demo'
  }]
});

Area chart with gradient fill

Any ideas?

0

There are 0 answers