Documentation ¶
Index ¶
Constants ¶
View Source
const ( HTML = "html" FileProtocol = "file://" EchartsInstanceDom = "div[_echarts_instance_]" CanvasJs = "echarts.getInstanceByDom(document.querySelector('div[_echarts_instance_]'))" + ".getDataURL({type: '%s', pixelRatio: %d, excludeComponents: ['toolbox']})" )
Variables ¶
This section is empty.
Functions ¶
func MakeChartSnapshot ¶
func MakeSnapshot ¶
func MakeSnapshot(config *SnapshotConfig) error
Types ¶
type SnapshotConfig ¶
type SnapshotConfig struct { // Renderer canvas or svg, not used for now Renderer string // RenderContent the content bytes of charts after rendered RenderContent []byte // Path the path to save image Path string // FileName image name FileName string // Suffix image format, png, jpeg Suffix string // Quality the generated image quality, aka pixelRatio Quality int // KeepHtml whether keep the generated html also, default false KeepHtml bool // HtmlPath where to keep the generated html, default same to image path HtmlPath string }
Click to show internal directories.
Click to hide internal directories.