Skip to content

lublak/typst-echarm-package

Repository files navigation

Echarm

A typst plugin to run echarts in typst with the use of CtxJS.

Examples

Source Code Source Code Source Code
Source Code Source Code Source Code

For more examples see:

https://echarts.apache.org/examples/en/index.html

For the complete documentation for the configuration of echarts, see:

https://echarts.apache.org/en/option.html

Usage

#import "@preview/echarm:0.3.1"

// options are echart options
#echarm.render(width: 100%, height: 100%, options: (:))

Inject a javascript callback

To use a echart callback, you can use the eval-later function:

#import "@preview/echarm:0.3.1"

// options are echart options
#echarm.render(width: 100%, height: 100%, options: (
  series: (
    labelLayout: echarm.eval-later("your javascript callback code")
  )
))

Infos

The version is not the same as the echart version, so that I can update independently. Animations are not supported here!

You can find more information about CtxJS here:

https://typst.app/universe/package/ctxjs/

Versions

Version Echart-Version
0.1.0 5.5.1
0.1.1 5.5.11
0.2.0 5.6.0
0.2.1 5.6.02
0.3.0 6.0.0
0.3.1 6.0.03

1 new eval-later feature
2 compatibility with typst 0.13 using ctxjs 0.3.0 3 added a tool to encode an image into an image data url using ctxjs 0.3.2

About

Run echarts in typst with the use of CtxJS

Resources

License

Stars

Watchers

Forks

Packages

No packages published