event

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener struct {
	EventName string
	Query     types.FuncStr
	Handler   types.FuncStr
}

Listener is the abstract of events listening in echarts see https://echarts.apache.org/handbook/en/concepts/event which allow to listen special mouse and components event example:

bar := charts.NewBar()
JFunc := ` (params) => alert(params.name) `
bar.SetGlobalOptions(
charts.WithEventListeners(
       event.Listener{
         EventName: "click",
         Handler:   opts.FuncOpts(JFunc),
       },
       event.Listener{
         EventName: "mouseup",
         Query:     "'series'",
         Handler:   opts.FuncOpts(JFunc),
       },
       event.Listener{
         EventName: "mouseover",
         Query:     "{ seriesName: 'go-echarts' }",
         Handler:   opts.FuncOpts(JFunc),
       },

), )

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL