SeptemberHX / joplin-plugin-enhancement

joplin plugin to enhance my daily usage
GNU General Public License v3.0
164 stars 13 forks source link

Add support for XY Chart (Mermaid) #60

Closed Pyroseza closed 1 month ago

Pyroseza commented 9 months ago

Add support for XY Chart (Mermaid)

See https://mermaid.js.org/syntax/xyChart.html

Available since 10.6.0

Example from docs

xychart-beta
    title "Sales Revenue"
    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]

image

Current error as seen in Joplin image

SeptemberHX commented 8 months ago

In theory, updating the mermaid library version of this plugin to the latest should support all current mermaid syntax. However, I have tried to upgrade the mermaid version directly and encountered some compilation issues. My current level of TypeScript may not be able to solve this problem, so I need help from others.