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: 1, excludeComponents: ['toolbox']})" SvgJs = "echarts.getInstanceByDom(document.querySelector('div[_echarts_instance_]')).renderToSVGString()" )
Variables ¶
This section is empty.
Functions ¶
func MakeChartSnapshotJpg ¶
func MakeChartSnapshotPng ¶
func MakeChartSnapshotSvg ¶
Types ¶
type SnapshotConfig ¶
type SnapshotConfig struct { // RenderContent the content bytes of charts after rendered RenderContent []byte // KeepHtml whether keep the generated html also, default false KeepHtml bool // Timeout the timeout config Timeout time.Duration ExtName string }
func NewSnapshotConfig ¶
func NewSnapshotConfig(content []byte, opts ...SnapshotConfigOption) *SnapshotConfig
type SnapshotConfigOption ¶
type SnapshotConfigOption func(config *SnapshotConfig)
Click to show internal directories.
Click to hide internal directories.