1
0
mirror of https://github.com/mum4k/termdash.git synced 2025-04-25 13:48:50 +08:00

[FEAT] reset for linechart

This commit is contained in:
Charlie 2024-06-29 00:06:31 +08:00
parent 102df20a88
commit 546db666dc

View File

@ -232,6 +232,13 @@ func (lc *LineChart) Series(label string, values []float64, opts ...SeriesOption
return nil
}
func (lc *LineChart) Reset() {
if lc == nil {
return
}
lc.series = make(map[string]*seriesValues)
}
// xDetails returns the details for the X axis given the specified minimum and
// maximum value to display.
func (lc *LineChart) xDetails(cvs *canvas.Canvas, reqYWidth, min, max int) (*axes.XDetails, error) {