novus / nvd3

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

linePlusBarChart legend behavior incorrectly when there is more than one line series #463

Closed gongxiancao closed 9 years ago

gongxiancao commented 10 years ago

To reproduce the issue, just go to http://nvd3.org/livecode/index.html, and click line plus bar chart. In Data(JSON) tab, append new key "Price1" with the same values as "Price" key. Then in the chart, click/disable legend for "Price (right axis)", now both "Price" and "Price1" line disappear.

DavidSouther commented 10 years ago

Interesting - confirmed, when creating a second line chart, the legend control of the first line chart toggle both lines, while the legend for the second line chart toggles that chart alone. Need to investigate if this happens in normal circumstances (probably) or is purely a live code artifact (less likely). @gongxiancao can you elaborate on that distinction?

gongxiancao commented 10 years ago

I encountered this issue happens in normal circumstance as well.

DavidSouther commented 10 years ago

@gongxiancao thank you for confirming that! We'll aim to fix this behavior in or shortly after the Layer refactor, #442 .

madasuk commented 9 years ago

Similar Kind of issues occurs if we try to second bar and third bar charts too.