refactor: add examples
This commit is contained in:
parent
c289ba7cde
commit
6aad7b6067
10 changed files with 231 additions and 46 deletions
|
|
@ -37,6 +37,7 @@ type Series struct {
|
|||
Data []SeriesData
|
||||
XValues []float64
|
||||
YAxisIndex int
|
||||
Style chart.Style
|
||||
}
|
||||
|
||||
const lineStrokeWidth = 2
|
||||
|
|
@ -75,6 +76,10 @@ func GetSeries(series []Series, tickPosition chart.TickPosition, theme string) [
|
|||
DotColor: getSeriesColor(theme, index),
|
||||
DotWidth: dotWith,
|
||||
}
|
||||
if !item.Style.StrokeColor.IsZero() {
|
||||
style.StrokeColor = item.Style.StrokeColor
|
||||
style.DotColor = item.Style.StrokeColor
|
||||
}
|
||||
pointIndexOffset := 0
|
||||
// 如果居中,需要多增加一个点
|
||||
if tickPosition == chart.TickPositionBetweenTicks {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue