Skip to content

scattergl fillcolor incorrect with multiple polygons in same trace when with fill: toself #2291

@cpsievert

Description

@cpsievert

https://codepen.io/cpsievert/pen/ZvNqjQ

Note that fillcolor renders correctly when type: scatter.

Activity

jackparmer

jackparmer commented on Jan 24, 2018

@jackparmer
Contributor

cc @Kully - this is going to be an issue with the Python county choropleth as well. Probably watch this issue and hold off on the WebGL approach until this is fixed:

image

Kully

Kully commented on Jan 24, 2018

@Kully
Contributor

I actually found that toself fill didn't work with just one polygon (ie list of coordinates defining a contained polygon)

But I only checked in the Python API

jackparmer

jackparmer commented on Jan 26, 2018

@jackparmer
Contributor

Here is what I get for a full US county map for SVG vs WebGL using toself:

image

alexcjohnson

alexcjohnson commented on Mar 8, 2018

@alexcjohnson
Collaborator

related: #2450

Kully

Kully commented on May 28, 2018

@Kully
Contributor

Another example of the USA choropleth from here: https://plot.ly/python/county-choropleth/#the-entire-usa This is switching scatter -> scattergl in the figurefactory.

screen shot 2018-05-28 at 12 07 32 pm

jackparmer

jackparmer commented on May 28, 2018

@jackparmer
Contributor

⬆️ Doesn't look like the recent scattergl fill changes fixed things for this particular use case

etpinard

etpinard commented on May 28, 2018

@etpinard
Contributor

Doesn't look like the recent scattergl fill changes fixed things for this particular use case

There haven't been any scattergl fill changes since the regl push back January.

jackparmer

jackparmer commented on May 28, 2018

@jackparmer
Contributor

Oh, I thought @dy had done some work on regl-line2d fills after January. I guess I'm misremembering.

etpinard

etpinard commented on May 28, 2018

@etpinard
Contributor

He's done some work. But none of which is ready to get merged at this stage.

dy

dy commented on May 28, 2018

@dy
Contributor

It is coming, after regl-text. Pls stay tuned)

alexcjohnson

alexcjohnson commented on Jul 26, 2018

@alexcjohnson
Collaborator

A nice pared-down reproduction from @llnns in #2845:


Using scattergl with toself fill option results in a "ghost"/wrong/extra fill among the first points of each object. A minimal example creating three rectangles:

https://codepen.io/anon/pen/NBvbbv

Results in:

newplot

Also, using the same data with scatter type has the expected output:

newplot 1

11 remaining items

jackparmer

jackparmer commented on Sep 10, 2020

@jackparmer
Contributor

This issue has been tagged with NEEDS SPON$OR

A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.

Sponsorship range: $15k-$20k

What Sponsorship includes:

  • Completion of this feature to the Sponsor's satisfaction, in a manner coherent with the rest of the Plotly.js library and API
  • Tests for this feature
  • Long-term support (continued support of this feature in the latest version of Plotly.js)
  • Documentation at plotly.com/javascript
  • Possibility of integrating this feature with Plotly Graphing Libraries (Python, R, F#, Julia, MATLAB, etc)
  • Possibility of integrating this feature with Dash
  • Feature announcement on community.plotly.com with shout out to Sponsor (or can remain anonymous)
  • Gratification of advancing the world's most downloaded, interactive scientific graphing libraries (>50M downloads across supported languages)

Please include the link to this issue when contacting us to discuss.

rlele5

rlele5 commented on Sep 12, 2020

@rlele5

Thanks for the update :). Now another feature request for @github, if you're listening - we should have Gofundmes attached to issues! I'd gladly commit a few hundred to this issue if it could be done in a safe and organized way

avsdev-cw

avsdev-cw commented on Nov 9, 2020

@avsdev-cw

I would also like to see this fixed, so +1 for that.

However that I feel that sponsership range is pretty excessive considering a bunch of people have already dug out what the root cause appears to be...

ruijin

ruijin commented on Dec 18, 2020

@ruijin
Contributor

Created two PR to plotlyjs and regl

#5355
gl-vis/regl-line2d#49

I am happy to help with any further testing, as long as this got fixed.

rlele5

rlele5 commented on Dec 31, 2020

@rlele5

@ruijin , thanks for making the pull requests! I'm excited to try them out!

rlele5

rlele5 commented on Jan 14, 2021

@rlele5

Hi @ruijin , I tried manually updating the /Library/Frameworks/Python.framework/Versions/3.7/share/jupyter/lab/staging/node_modules/plotly.js/src/traces/scattergl and /Library/Frameworks/Python.framework/Versions/3.7/share/jupyter/lab/staging/node_modules/regl-line2d/index.js code and then I restarted my jupyter notebook to see if it worked. However, I still saw the same issue. I'm pretty sure the issue is on my end, but do you know how I can get my plotly.py library to "uptake" the changes that I manually made to plotly.js? I've tried deleting plotly.py's __pycache__ and restarting/rerunning to no avail.

added this to the NEXT milestone on Jan 14, 2021
archmoj

archmoj commented on Jan 14, 2021

@archmoj
Contributor

Fixed via #5355.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @dy@cpsievert@ruijin@jackparmer@alexcjohnson

      Issue actions

        scattergl fillcolor incorrect with multiple polygons in same trace when with `fill: toself` · Issue #2291 · plotly/plotly.js