question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with area colors

See original GitHub issue

I’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.

selection_235

When I swap data (data from Query1 to Query2, data from Query2 to Query1) everyghing looks OK

selection_236

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mdtuszcommented, Dec 1, 2015

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 set fill: '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 set fillcolor 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.

0reactions
alexcjohnsoncommented, Dec 4, 2015

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found