refactor: add index to series
This commit is contained in:
parent
5ccc497ad3
commit
445a781b04
2 changed files with 12 additions and 8 deletions
|
|
@ -51,7 +51,11 @@ func lineChartRender(opt ChartOption, result *basicRenderResult) (*Draw, error)
|
|||
Y: y,
|
||||
X: xRange.getWidth(float64(j)),
|
||||
})
|
||||
seriesColor := theme.GetSeriesColor(i + result.seriesOffset)
|
||||
index := series.index
|
||||
if index == 0 {
|
||||
index = i
|
||||
}
|
||||
seriesColor := theme.GetSeriesColor(index)
|
||||
dotFillColor := drawing.ColorWhite
|
||||
if theme.IsDark() {
|
||||
dotFillColor = seriesColor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue