"fill: false" option on dataset causes legend to also not fill
See original GitHub issueWhen specifying the fill: false
option for items in a dataset, the legend for that data set is also not filled, even if backgroundColor
is specified. This is unexpected behavior according to documentation, as the documentation simply says the background of the chart itself will not be filled. As a result, a white hole appears in the legend (if border is also specified).
This issue appears in version 2.9.1 installed via npm. I am running it via an angular project. A week ago, when I first installed the project to work on it, this issue did not exist. However, it appeared today when I ran npm update
. This leads me to believe that the issue was introduced in versions 2.91 or 2.9.0, or another commit within the past week or so.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
chart.js - ChartJS do not render any legend if the label is falsy
Now I want to stop ChartJS from rendering the legend which is then shown as "null" or "undefined". Later I am setting a...
Read more >Controlling legend appearance in ggplot2 with override.aes
The plots itself shows the fill colors and shapes, but you can some issues in the legends. The fill colors don't show up...
Read more >plotOptions.area.fillColor | highcharts API Reference
This option works if animation is fired on individual points, not on a ... In styled mode, the fill color can be set...
Read more >Dataset - Concepts - Handbook - Apache ECharts
Dataset. dataset is a component dedicated to manage data. Although you can set the data in series.data for every series, we recommend you...
Read more >Visualization: Area Chart - Google Developers
It is important to note that the interpolateNulls option does not work with stacked area charts. ... The google.charts.load package name is "corechart"....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s difficult to rationalize design. My team ran an A-B survey – with an admittedly small and unscreened sample base of 30 – against the two images in #6673. When asked to choose between the two images, 22 preferred solid, 2 preferred hollow, 5 were undecided, and 1 thought they were exactly the same. Our findings were as follows:
To summarize, our conclusion was that the option to select fill-style was desirable.
I guess I’m in the minority then as I prefer controlling whether the legend icon is filled or not. Here’s an example why - if you have people with color blindness - you use more variance on the line dash - so if you have 3 grey lines that have a variance in dashing - the icons in the legend are now filled and are hard to distinguish.
With older version of chartJS, I didn’t need to specify the legend icon backgroundColor - it defaulted to a nice medium grey. With 2.9.3, the background color is ignored in the legend icon. Changing the fill to true yields the right fill color in the legend icon, at the expense of filling under the line.
I’m reverting to 2.8 until this is fixed. We need a way to color both attributes without a single attribute variable.