feat: support hide symbol of line chart

This commit is contained in:
vicanso 2022-07-27 20:32:31 +08:00
parent e095223705
commit 817fceff73
4 changed files with 12 additions and 4 deletions

View file

@ -60,6 +60,8 @@ type LineChartOption struct {
Title TitleOption
// The legend option
Legend LegendOption
// The flag for show symbol of line, set this to *false will hide symbol
SymbolShow *bool
// background is filled
backgroundIsFilled bool
}
@ -123,7 +125,9 @@ func (l *lineChart) render(result *defaultRenderResult, seriesList SeriesList) (
}
drawingStyle.StrokeWidth = 1
seriesPainter.SetDrawingStyle(drawingStyle)
seriesPainter.Dots(points)
if !isFalse(opt.SymbolShow) {
seriesPainter.Dots(points)
}
markPointPainter.Add(markPointRenderOption{
FillColor: seriesColor,
Font: opt.Font,