Problem with area colors
See original GitHub issueI’m using Plotly 1.1.0. I have two data series both with
type: 'scatter', fill : 'tonexty'
I don’t specify fillcolor
and this is what I see.
When I swap data (data from Query1 to Query2, data from Query2 to Query1) everyghing looks OK
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
A Complete Guide to Area Charts | Tutorial by Chartio
The fact that most colors will not be associated with a single group can cause some difficulty in interpretation.
Read more >Excel area chart with positive / negative colors - YouTube
Ever wanted to make an area chart with up down colors, something like this? Then this tip is for you. You can use...
Read more >How to Create a Shaded Deviation Line Chart in Excel
Learn step-by-step how to create the simple (with only one color ) version and the more advanced version (with different colors for positive ......
Read more >How to show positive / negative colors in area charts? [Quick tip]
Watch video tutorial: Area chart with positive / negative colors. If you are not sure about the whole gradient color trick, check out...
Read more >Problem with change color of area in template - Revit Products
Last time when I was working in Revit '18 I wanted to change a color of room area in a view template -...
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
Yes, the default behaviour for
'tonexty'
seems to be to fill to the x-axis for the first dataset (although I’m new so I could be mistaken!). It you would like that fill to be “empty”, you can setfill: 'none'
, and only the curve will be drawn.'tozeroy'
will always fill between the curve and the x-axis. It becomes a challenge of presentation because the “bottom” dataset will become obscured if any “layers” on top have values greater (or less than, in the case of negative values). The reason for having the overlaid fills is so as to preserve visibility of all the data. If you would like to get rid of the overlaid colours, you can setfillcolor
using a string containing a hex code, or a rgb/rgba string such as'rgba(241,111,203,1)'
. By setting a full opacity of 1 however, any dataset value less than a successive dataset value (at an equivalent x-value) will be hidden.@mdtusz spot on -
'tonexty'
behaves identically to'tozeroy'
for the first trace. This is driven by the use case of filled area charts, where you always want to fill the first trace to zero and all the others to the adjacent trace - set set all the traces to the same fill mode'tonexty'
and this is what you get.