You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

34 lines
738 B

package indicator
type Plot struct {
State string `json:"state"` // vector, stateName
Type PlotType `json:"series"` // 绘图类型 线/柱
Props PlotProps `json:"props"` // 绘图属性
Exps []PlotExp `json:"exps"` // 绘图条件表达式
}
type PlotExp struct {
Exp string `json:"exp"` // 绘图条件表达式
Props PlotProps `json:"props"` // 条件表达式成立时绘图属性
}
// 指标绘图
type PlotProps map[string]any
// PlotType 序列值绘图类型
type PlotType int32
const (
PlotNone PlotType = iota
PlotLine
PlotHistogram
PlotArea
)
// Series 绘图颜色
const (
ColorRed string = "red"
ColorGreen string = "green"
ColorYellow string = "yellow"
ColorBlue string = "blue"
)