Documentation ¶
Index ¶
Constants ¶
View Source
const ( ModChart = "chart" ModPage = "page" // EchartsInstancePrefix the default prefix for each echarts instance EchartsInstancePrefix = "goecharts_" // EchartsInstancePlaceholder a placeholder for types.FuncStr inject echarts instance EchartsInstancePlaceholder = "%MY_ECHARTS%" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseRender ¶
type BaseRender struct{}
BaseRender the default implementation of Renderer, make it easier to extend Renderer for individual render function
func (*BaseRender) RenderContent ¶
func (r *BaseRender) RenderContent() []byte
func (*BaseRender) RenderSnippet ¶
func (r *BaseRender) RenderSnippet() ChartSnippet
type ChartSnippet ¶
type Renderer ¶
type Renderer interface { Render(w io.Writer) error RenderContent() []byte RenderSnippet() ChartSnippet }
Renderer Any kinds of charts have their render implementation and you can define your own render logic easily.
func NewChartRender ¶
func NewChartRender(c interface{}, before ...func()) Renderer
NewChartRender returns a render implementation for Chart.
func NewPageRender ¶
func NewPageRender(c interface{}, before ...func()) Renderer
NewPageRender returns a render implementation for Page.
Click to show internal directories.
Click to hide internal directories.