You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Add scatterternarygl trace for ternary plot #7058
Currently the Ternary Plot only supports scatterternarytrace, 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):
But with this, a bit lag while hovering and zooming (around 3000 points):
And below is of course very laggy (around 30000 points):
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.
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:
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).
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.
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.
Activity
[-][Feature request] Support scattergl trace for ternary plot[/-][+]add scattergl trace for ternary plot[/+]Lexachoc commentedon Sep 7, 2026
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.
[-]add scattergl trace for ternary plot[/-][+][FEATURE]: Add scattergl trace for ternary plot[/+][-][FEATURE]: Add scattergl trace for ternary plot[/-][+][FEATURE]: Add `scatterternarygl` trace for ternary plot[/+]Lexachoc commentedon Sep 23, 2026
There is no
hoveronattribute forscattergl. Sincescatterternaryglreuses much of thescatterglimplementation, it will not supporthoveroneither. 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
hoveronattribute inscatterglcan 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).Lexachoc commentedon Sep 24, 2026
While implementing this PR, I found several bugs in
scattergl, whichscatterternaryglbuilds on.The issues I found are:
scatterglrendersline.color,fillcolor,error_x.color,error_y.color, andtextfont.colorincorrectly with modern CSS color spaces #8116scattergltext is hidden behind selected markers #8081scatterglincorrectly handles numeric and numeric-string marker variants #8070axis.layer/axis.zerolinelayer:'above traces'do not render abovescattergltraces #8075scatterandscatterglshow different hover labels for overlapping data points #8077Among 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 fromscattergland therefore needs to be implemented separately.The other issues also affect
scatterternarygl, because the relevant functionality is reused directly fromscattergl.camdecoster commentedon Sep 28, 2026
At this point, what bugs are blocking your work on
scatterternarygl?Lexachoc commentedon Sep 28, 2026
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(scatterternaryheavily reuses code fromscatter, whilescatterternaryglfollows the similar way by reusing code fromscattergl)I've already submitted a PR #8083 and waiting for some initial feedback.