refactor: adjust bar series
This commit is contained in:
parent
f3009b965f
commit
be19cd728a
4 changed files with 56 additions and 17 deletions
14
series.go
14
series.go
|
|
@ -62,12 +62,16 @@ func GetSeries(series []Series, tickPosition chart.TickPosition, theme string) [
|
|||
style := chart.Style{
|
||||
StrokeWidth: lineStrokeWidth,
|
||||
StrokeColor: getSeriesColor(theme, index),
|
||||
DotColor: getSeriesColor(theme, index),
|
||||
DotWidth: dotWith,
|
||||
// TODO 调整为通过dot with color 生成
|
||||
DotColor: getSeriesColor(theme, index),
|
||||
DotWidth: dotWith,
|
||||
}
|
||||
// 如果居中,需要多增加一个点
|
||||
if tickPosition == chart.TickPositionBetweenTicks {
|
||||
item.Data = append([]float64{
|
||||
0.0,
|
||||
}, item.Data...)
|
||||
}
|
||||
item.Data = append([]float64{
|
||||
0.0,
|
||||
}, item.Data...)
|
||||
baseSeries := BaseSeries{
|
||||
Name: item.Name,
|
||||
XValues: item.XValues,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue