Skip to content

[FEATURE]: Add scatterternarygl trace for ternary plot #7058

Description

@Lexachoc

Hello,

Currently the Ternary Plot only supports scatterternary trace, I am developing an open source glass web database where ternary visualizations are very usefull. However, I can sense that there's a performace lag when I have more points to render.

This amount of data is fine and can be zoomed and panned without lag (around 300 points):
image

But with this, a bit lag while hovering and zooming (around 3000 points):
image

And below is of course very laggy (around 30000 points):
image

I found one comment #1385 (comment) from an old issue asking the same thing. It seems that it is not so easy to implement. Despite this, I would like to open this new issue to continue the discussion.

Activity

  1. changed the title [-][Feature request] Support scattergl trace for ternary plot[/-] [+]add scattergl trace for ternary plot[/+] on Aug 9, 2024
  2. Lexachoc commented on Sep 7, 2026

    @Lexachoc
    ContributorAuthor

    To the Plotly team,

    Here is a prototype of scatterternarygl, a new webgl trace type for ternary plots.

    I may open a draft PR when I have some time. I would open it as a draft since this introduces a new trace type, and I think some discussion with the Plotly team would be helpful before moving forward.

    Below is a demo with 1 million points. I used marker styles similar to those in the WebGL vs SVG in JavaScript example:

    PixPin_2026-09-07_19-33-30.mp4

    Hover interactions remain very smooth.

  3. changed the title [-]add scattergl trace for ternary plot[/-] [+][FEATURE]: Add scattergl trace for ternary plot[/+] on Sep 8, 2026
  4. changed the title [-][FEATURE]: Add scattergl trace for ternary plot[/-] [+][FEATURE]: Add `scatterternarygl` trace for ternary plot[/+] on Sep 21, 2026
  5. Lexachoc commented on Sep 23, 2026

    @Lexachoc
    ContributorAuthor

    There is no hoveron attribute for scattergl. Since scatterternarygl reuses much of the scattergl implementation, it will not support hoveron either. I have no intention of supporting it specifically in the scatterternarygl PR, as this should be addressed upstream.

    This means that we can render a Basic Filled Ternary Plot with scatterternarygl, but there will be no hover effects on the filled area.

    This was reported a long time ago and is still an open issue: #2887

    Hopefully, support for the hoveron attribute in scattergl can be prioritized, since this limitation affects three WebGL-based traces (scattergl, scatterpolargl, scatterternarygl) and makes their behavior inconsistent with the corresponding SVG traces (scatter, scatterpolar, scatterternary).

  6. Lexachoc commented on Sep 24, 2026

    @Lexachoc
    ContributorAuthor

    While implementing this PR, I found several bugs in scattergl, which scatterternarygl builds on.

    The issues I found are:

    Among these, the fill issue described in #7383 is the most severe and visually noticeable, as it affects all filled-area plots in scatterternarygl.

    For #8075, I plan to address it directly in scatterternarygl, since that logic is not reused from scattergl and therefore needs to be implemented separately.

    The other issues also affect scatterternarygl, because the relevant functionality is reused directly from scattergl.

  7. camdecoster commented on Sep 28, 2026

    @camdecoster
    Contributor

    At this point, what bugs are blocking your work on scatterternarygl?

  8. Lexachoc commented on Sep 28, 2026

    @Lexachoc
    ContributorAuthor

    At this point, what bugs are blocking your work on scatterternarygl?

    No, so far I've only found some bugs listed above during my implementation. They don't affect the core functionality, and those bugs are all inherited from scattergl (scatterternary heavily reuses code from scatter, while scatterternarygl follows the similar way by reusing code from scattergl)

    I've already submitted a PR #8083 and waiting for some initial feedback.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions