Replies: 2 comments
-
I just discovered mermaid in our gitlab installation. I'm so impressed! SOOOO Useful! The above points are the only thing preventing me from being able to inline some charts in a markdown document!. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Legend is the one that is lacking the most I find when using multiple line or bars |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TL;DR: ideas on how to implement multiple bars, a legend, and points of interest
I've run into a couple of limitations using xyChart and I've come up with some suggestions here.
Multiple bars
A very common use case is showing bars over or next to each other. Here follows 2 examples:
Currently, xyChart does take in 2 bar arguments, but doesn't display them in a way that's useful. Recreating the first chart in mermaid yields the following:
The bars overlap, hiding the smaller value. It would be great for direct comparisons if either:
The example of the 2nd bar can be done in the current implementation, but without a legend becomes hard to use. Which leads me to...
Legend
There's currently no support for a legends, which makes reading the chart hard. When using multiple lines and/or bars it makes a chart barely useable.
In this example of a line xyChart there is no way of knowing which line is what.
Plotted points
Another, more niche, use case of a line chart is to add points to project growth for example. This example shows the real data with lines and the projected usages with points plotted on the chart.
Suggested solution
A solution would be to add IDs to the
bar
andline
element. This could be:Naming the element like pie charts or like gantt charts
Adding the ID as a parameter like sequence diagrams, allows for using the keyword "as"
Wrapping the element with an ID like flowcharts
This would help with differentiating between bars and lines, which could also be used for a legend like that already implemented in the pie chart
As for the plotted points, this could be a useful new element of xyChart which could look like this (including the ID idea mention above):
I also saw I'm not the only one, #5207 also mentioned the legend for multiple lines.
Beta Was this translation helpful? Give feedback.
All reactions