Documentation ¶
Index ¶
- type AxisLabel
- type EcAxisPointer
- type EcGrid
- type EcLegend
- type EcOption
- func (ep *EcOption) OnAddOneSeries(name string, data interface{})
- func (ep *EcOption) OnAddOneSeriesInt(name string, data []int)
- func (ep *EcOption) OnSetAxis(data []string, axisLabel AxisLabel, isy bool)
- func (ep *EcOption) OnSetLegend(data []string)
- func (ep *EcOption) SetEcToolTip(ecToolTip EcToolTip)
- type EcSeries
- type EcTitle
- type EcToolTip
- type EcxAxis
- type Feature
- type Toolbox
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EcAxisPointer ¶
type EcAxisPointer struct { /* 'line' 直线指示器 'shadow' 阴影指示器 'none' 无指示器 'cross' 十字准星指示器 */ Type string `json:"type,omitempty"` }
坐标轴指示器配置项。
type EcGrid ¶
type EcGrid struct { Left string `json:"left,omitempty"` //组件离容器左侧的距离。 Right string `json:"right,omitempty"` Bottom string `json:"bottom,omitempty"` ContainLabel bool `json:"containLabel,omitempty"` //grid 区域是否包含坐标轴的刻度标签 }
直角坐标系内绘图网格
type EcLegend ¶
type EcLegend struct { Show bool `json:"show,omitempty"` Data []string `json:"data,omitempty"` //图例的数据数组 }
图例组件。
type EcOption ¶
type EcOption struct { Color []string `json:"color,omitempty"` //调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。 //标题组件,包含主标题和副标题。 Title EcTitle `json:"title,omitempty"` Tooltip EcToolTip `json:"tooltip,omitempty"` Grid EcGrid `json:"grid,omitempty"` XAxis EcxAxis `json:"xAxis,omitempty"` //直角坐标系 grid 中的 x 轴 YAxis EcxAxis `json:"yAxis,omitempty"` //直角坐标系 grid 中的 y 轴 Legend EcLegend `json:"legend,omitempty"` //图例组件。 Series []EcSeries `json:"series,omitempty"` //数据内容 Toolbox Toolbox `json:"toolbox,omitempty"` // // contains filtered or unexported fields }
echarts option 根数据
func OnGetBaseInfo ¶
获取线图基础数据
t_str line:线 bar:柱 pie:饼 scatter:散点(气泡) effectScatter:带有涟漪特效动画的散点 radar:雷达 tree:树 treemap:面积 sunburst:旭日图 boxplot:箱形图 candlestick:K线图 sankey:桑基图 heatmap:热力图 map:地图 parallel: 平行坐标系的系列 lines:线图 graph:关系图 funnel:漏斗图 gauge:仪表盘 pictorialBar:象形柱图 themeRiver:主题河流 custom:自定义系列
func (*EcOption) OnAddOneSeries ¶
添加一个数据
func (*EcOption) OnAddOneSeriesInt ¶
添加一个数据
func (*EcOption) SetEcToolTip ¶
type EcSeries ¶
type EcSeries struct { Name string `json:"name,omitempty"` //系列名称 Type string `json:"type,omitempty"` //line:线 bar:柱状图 Data interface{} `json:"data,omitempty"` //系列中的数据内容数组 }
系列列表。每个系列通过 type 决定自己的图表类型
type EcTitle ¶
type EcTitle struct { Text string `json:"text,omitempty"` //主标题文本,支持使用 \n 换行。 SubText string `json:"subtext,omitempty"` //副标题文本,支持使用 \n 换行。 }
标题组件,包含主标题和副标题。
type EcToolTip ¶
type EcToolTip struct { Show bool `json:"show,omitempty"` /* 触发类型。 'item' 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。 'axis' 坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。 'none' 什么都不触发。 */ Trigger string `json:"trigger,omitempty"` //坐标轴指示器配置项。 AxisPointer EcAxisPointer `json:"axisPointer,omitempty"` }
提示框组件。
Click to show internal directories.
Click to hide internal directories.