Thans for integrating this functionality, it has a lot of potential for visualising data!
Is there a way to set the radius (or size in general) of a pie chart?
The default one is unfortunately so small to be practically useless
pie showData
title Key elements in Product X
"Calcium" : 42.96
"Potassium" : 50.05
"Magnesium" : 10.01
8 likes
Tris20
(Tristan)
4 september 2023 om 08:40
2
Iâm also having some size/scaling issues. Gaant charts for example are essentially useless
Is there anyway Discourse could provide the option to view mermaid diagrams in a fullscreen way, similar to the Markdown Table Fullscreen ?
6 likes
sam
(Sam Saffron)
5 september 2023 om 01:18
5
This is a fantastic idea, I would love to have it. We donât have this work slotted at the moment.
8 likes
Tris20
(Tristan)
23 april 2024 om 09:12
7
Are we likely to see any movement on this? It just feels such a shame to have something so usefull sit so close to perfection.
We wanted to use a pie chart to show some of the distribution of languages in the company, but this is the real size in the end
1 like
gpetrov
(George Petrov)
15 mei 2024 om 08:52
11
is it possible to have some zoom possibilities to the mermaid display? Larger diagrams can become quate small now.
Maybe allow the mermaid diagrams to be opened in a popup lightbox and have pan and zoom like on https://mermaid.live/
3 likes
This would be a great additional feature!
1 like
sam
(Sam Saffron)
16 mei 2024 om 01:13
13
I would love this feature. It is assigned to the member experience team and will be prioritized by them.
Missing this is certainly heavily impacting how useful complex mermaid diagrams on the forums can be.
As to when? @lindsey will be prioritizing this.
If you need it in a hurry though probably best talk to Jamie
8 likes
Tris20
(Tristan)
16 mei 2024 om 09:06
14
Thank you for looking at this again
1 like
+1 for this much needed feature - any progress?
1 like
We also really need this feature at our company, scaling charts in height is limited and this make mermaid useless in discourse, need to have a way to render them externally or by showing them fullscreen.
1 like
I built something. I thought someone might want to give it a try before I release it.
The goal was to have a low-threshold and robust approach:
analyze if a post contains an SVG element
if so, display a text link âzoomâ next to it
open the SVG in a new browser window where you can zoom, print, etc. as you like
GitHub - rstockm/svg-zoom: Discourse theme component that adds zoom functionality to Mermaid/SVG elements in posts
sam
(Sam Saffron)
11 februari 2025 om 01:48
36
Update, @David is working on a fix here and it looks great, we just need to clean up some APIs and will post about it soon.
main
â fixed-height
opened 05:13PM - 10 Feb 25 UTC
The variable-height strategy used by this theme component is complex, and is not⊠providing a good user experience. This commit removes it, and instead sets all mermaid diagrams to have a fixed aspect-ratio of `16:9` when rendered in posts. For tall diagrams, the content will be scrollable. A fullscreen button in the top right allows popping the diagram into a modal.
(WIP - this doesn't work in composer-preview or chat yet)
4 likes
david
(David Taylor)
11 februari 2025 om 17:58
37
This is now merged. Diagrams will always be rendered with a 16:9
aspect ratio, and thereâs a button to pop them into a fullscreen view:
kanban
Todo
[Create Documentations]
docs[Create Blog about the new diagrams]
[In progress]
id6[Create renderer so that it works in all cases. We also add som extra text here for testing purposes. And some more just for the extra flare.]
id9[Ready for deploy]
id8[Design grammar]@{ assigned: 'knsv' }
id10[Ready for test]
id4[Create parsing tests]@{ ticket: MC-2038, assigned: 'K.Sveidqvist', priority: 'High' }
id66[last item]@{ priority: 'Very Low', assigned: 'knsv' }
id11[Done]
id5[define getData]
id2[Title of diagram is more than 100 chars when user duplicates diagram with 100 char]@{ ticket: MC-2036, priority: 'Very High'}
id3[Update DB function]@{ ticket: MC-2037, assigned: knsv, priority: 'High' }
id12[Can't reproduce]
id3[Weird flickering in Firefox]
4 likes
tvavrda
(Tomas Vavrda)
11 februari 2025 om 20:39
38
OMG. I am sorry, but the reaction is not enough. THANK YOU!!!
One small thing â if I zoom out a bit using the browser (Alt+ - ) the texts do not fit. If I am at 100 %, itâs all perfect.
2 likes
tvavrda
(Tomas Vavrda)
11 februari 2025 om 20:46
39
Also just noticed that Mermaid charts do not switch light/dark theme without refreshing the browser when using the new dark theme switcher setting.
2 likes
Tris20
(Tristan)
18 februari 2025 om 14:27
40
Massive thank you from my side for putting through an update for this
Now we can use Gaant charts and Pie charts along with Discourseâs revision history
Thank you, but I would prefer to open the chards in a new, dedicated window - so wie can Print, export to PDF etc.
See my approach:
david
(David Taylor)
gesloten
25 februari 2025 om 18:10
42
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.