test: add test for funnel chart
This commit is contained in:
parent
29c9281d7c
commit
ad70a48944
7 changed files with 276 additions and 10 deletions
|
|
@ -34,6 +34,16 @@ type funnelChart struct {
|
|||
opt *FunnelChartOption
|
||||
}
|
||||
|
||||
func NewFunnelSeriesList(values []float64) SeriesList {
|
||||
seriesList := make(SeriesList, len(values))
|
||||
for index, value := range values {
|
||||
seriesList[index] = NewSeriesFromValues([]float64{
|
||||
value,
|
||||
}, ChartTypeFunnel)
|
||||
}
|
||||
return seriesList
|
||||
}
|
||||
|
||||
func NewFunnelChart(p *Painter, opt FunnelChartOption) *funnelChart {
|
||||
if opt.Theme == nil {
|
||||
opt.Theme = defaultTheme
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue