mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
71.14k stars 6.41k forks source link

log scale for `xychart-beta` #5438

Open migueltorrescosta opened 6 months ago

migueltorrescosta commented 6 months ago

Proposal

Have a string field scale that

This would allow us to version control a graph description with true ( non-logged ) values, while plotting the logged values.

Example

xychart-beta
    title "Sales Revenue"
    scale log
    x-axis [jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec]
    y-axis "Revenue (in $)" 4000 --> 11000
    bar [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]
    line [5000, 6000, 7500, 8200, 9500, 10500, 11000, 10200, 9200, 8500, 7000, 6000]

Screenshots

No response

nirname commented 3 months ago

That's a good idea. Don't you think that it is also possible to configure scale separately for X and Y axis? What is your suggestions on syntax in this case?