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.
 
 

40 lines
939 B

package indicator
type Plot struct {
Name string `json:"name"` // 绘图名称
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
PlotShadow
)
// Series 绘图颜色
const (
ColorRed string = "#f23645"
ColorGreen string = "#089981"
ColorRed2 string = "#f7a9a7"
ColorGreen2 string = "#92d2cc"
ColorYellow string = "#cdcf36"
ColorBlue string = "#556cd6"
ColorPurple string = "#e48dce"
ColorOrange string = "#dd5e0aff"
)