echarts icon indicating copy to clipboard operation
echarts copied to clipboard

option for making ternary phase diagrams

Open dolphin666888 opened this issue 2 years ago • 6 comments

What problem does this feature solve?

Ternary phase diagrams are standard for many scientific and engineering applications. However, this option is not available for Echarts. This feature is not available for other javascript plotting libraries either. So if this can be included in Echarts. It would make Echarts unique in this aspect.

What does the proposed API look like?

provide a new chart type

dolphin666888 avatar May 02 '23 01:05 dolphin666888

D3 has custom modules for ternary plots. This one is simple enough to be built in ECharts. Elements are only lines and scatter - a good DIY project. But these charts could also become very complex. It appears that each industry has its own criteria, making a universal chart impractical.

helgasoft avatar May 03 '23 04:05 helgasoft

D3 has custom modules for ternary plots. This one is simple enough to be built in ECharts. Elements are only lines and scatter - a good DIY project. But these charts could also become very complex. It appears that each industry has its own criteria, making a universal chart impractical.

Thank you for the comment. I think that your suggestion is sufficient for me. Ternary plots are similar to XY plots. What I need is triangular coordinates with options for line types, point types, legends, axis labels and so on.

dolphin666888 avatar May 03 '23 06:05 dolphin666888

The tough part is probably the 3 axes with labels. Too bad singleAxis cannot be rotated. In D3 they do the triangle with path, but it could be done also with polyline. Good example of custom series with text labels.

helgasoft avatar May 03 '23 07:05 helgasoft

Sorry for making wrong comments. there are no axis labels for ternary plots, since all labels are located at the vertices. It would be great if the functionality offered by D3 is included in Echarts.

dolphin666888 avatar May 03 '23 09:05 dolphin666888

It is doable in 3D - proof of concept (POC)

image

helgasoft avatar May 17 '23 17:05 helgasoft

I also wish there was a ternary rendering feature. The only reason I still use Plotly.js is because they have ternary rendering functionality! https://plotly.com/javascript/ternary-plots/

But I really like the style of Echart, the animations and the hover tooltips, so it bothers me because I don't want to use two libraries, Plotly for ternary plot and Echart for the rest. (Maybe one day I will have to do that ......).

In scientific visualization, e.g. for ceramic/glass/metal compositions, ternary diagrams are very important to show the distribution or formation.

Lexachoc avatar Jan 31 '24 18:01 Lexachoc