novus / nvd3

A reusable charting library written in d3.js
http://nvd3.org/
Other
7.22k stars 2.15k forks source link

Stacked area chart stroke #1723

Open diegovigano opened 8 years ago

diegovigano commented 8 years ago

Hi,

I'm trying to achieve the following: drawing a stacked area chart with grey fill color, while the stroke being the original color assigned to the serie (using {color:#...})

screen shot 2016-07-08 at 12 37 16

The gray fill color is achieved using CSS (overriding thus the inline style).

This works for fill color, but every stacked stripe covers the one below (at the bottom border) so that the color of the stroke is always wrong. Using the inspector I've been able to detect that if I reverse the order of the nodes this works (because I'm changing their z-index).

Infact, If I translate (using translateY) every stripe of the chart you can see that the color is assigned correctly, but the nodes order inside DOM makes an upper stripe covering the lower: at the border bottom this causes the right color being hidden.

screen shot 2016-07-08 at 12 43 29

The order should be decided by the array of series provided as input, shouldn'it ?

thanks

monodeep12 commented 6 years ago

@diegovigano Were you able to find a solution?