xyhp915 / logseq-fenced-code-plus

A Logseq plugin for missing types of fenced code 🚀
MIT License
108 stars 17 forks source link

feat: ✨ Supports echarts #19

Closed haydenull closed 1 year ago

haydenull commented 1 year ago

Support for displaying charts using echarts.

Example:

```echarts
{"tooltip":{"trigger":"item"},"legend":{"top":"5%","left":"center"},"series":[{"name":"Access From","type":"pie","radius":["40%","70%"],"avoidLabelOverlap":false,"itemStyle":{"borderRadius":10,"borderColor":"#fff","borderWidth":2},"label":{"show":false,"position":"center"},"emphasis":{"label":{"show":true,"fontSize":40,"fontWeight":"bold"}},"labelLine":{"show":false},"data":[{"value":1048,"name":"Search Engine"},{"value":735,"name":"Direct"},{"value":580,"name":"Email"},{"value":484,"name":"Union Ads"},{"value":300,"name":"Video Ads"}]}]}


<img width="921" alt="image" src="https://user-images.githubusercontent.com/17695989/209633275-7ebc63f5-b81f-4ec0-986b-cd2bd66c0ebb.png">
sinjab commented 1 year ago

I enabled the plugin then copied/pasted your echarts example into a logseq block but no chart appeared, just normal code block.