feat: support label for series, #1
This commit is contained in:
parent
a577d30eb8
commit
eb421892fe
8 changed files with 148 additions and 7 deletions
|
|
@ -35,6 +35,11 @@ var (
|
|||
_ chart.LastValuesProvider = (*BaseSeries)(nil)
|
||||
)
|
||||
|
||||
type SeriesLabel struct {
|
||||
Show bool
|
||||
Offset chart.Box
|
||||
}
|
||||
|
||||
// BaseSeries represents a line on a chart.
|
||||
type BaseSeries struct {
|
||||
Name string
|
||||
|
|
@ -48,6 +53,8 @@ type BaseSeries struct {
|
|||
|
||||
XValues []float64
|
||||
YValues []float64
|
||||
|
||||
Label SeriesLabel
|
||||
}
|
||||
|
||||
// GetName returns the name of the time series.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue