morrisjs / morris.js

Pretty time-series line graphs
http://morrisjs.github.com/morris.js/
6.91k stars 1.23k forks source link

Add fillAreaColors option #161

Closed Radagaisus closed 10 years ago

Radagaisus commented 11 years ago

Add an option to change the Area Charts fill color. Currently it's a slightly brighter version of the line color, but people might want to change it. (I did, wanted a brighter color there).

fillForSeries: (i) ->
    fill_color = @options.fillAreaColors[i]
    return fill_color if fill_color

    color = Raphael.rgb2hsl @colorFor(@data[i], i, 'line')
    Raphael.hsl(
      color.h,
      Math.min(255, color.s * 0.75),
      Math.min(255, color.l * 1.25))
andydust commented 11 years ago

+1

diego-aslz commented 8 years ago

👍 I know I'm too late for the party, but couldn't you just add this? It's very useful.