refactor: adjust bar series

This commit is contained in:
vicanso 2021-12-14 23:26:34 +08:00
parent f3009b965f
commit be19cd728a
4 changed files with 56 additions and 17 deletions

View file

@ -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,