refactor: enhance chart render function
This commit is contained in:
parent
65a1cb11ad
commit
38c4978e44
20 changed files with 665 additions and 462 deletions
|
|
@ -36,6 +36,14 @@ type SeriesData struct {
|
|||
Style Style
|
||||
}
|
||||
|
||||
func NewSeriesListDataFromValues(values [][]float64, chartType ...string) SeriesList {
|
||||
seriesList := make(SeriesList, len(values))
|
||||
for index, value := range values {
|
||||
seriesList[index] = NewSeriesFromValues(value, chartType...)
|
||||
}
|
||||
return seriesList
|
||||
}
|
||||
|
||||
func NewSeriesFromValues(values []float64, chartType ...string) Series {
|
||||
s := Series{
|
||||
Data: NewSeriesDataFromValues(values),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue