From 825e65d93078aee8ae99916ff916daf7a425a56d Mon Sep 17 00:00:00 2001 From: vicanso Date: Thu, 15 Sep 2022 20:15:05 +0800 Subject: [PATCH] refactor: use MaxInt32 instead of MaxInt --- line_chart.go | 2 +- painter.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/line_chart.go b/line_chart.go index 839aa6f..cdec280 100644 --- a/line_chart.go +++ b/line_chart.go @@ -118,7 +118,7 @@ func (l *lineChart) render(result *defaultRenderResult, seriesList SeriesList) ( for i, item := range series.Data { h := yRange.getRestHeight(item.Value) if item.Value == nullValue { - h = math.MaxInt + h = int(math.MaxInt32) } p := Point{ X: xValues[i], diff --git a/painter.go b/painter.go index f172cb3..b7122b7 100644 --- a/painter.go +++ b/painter.go @@ -442,7 +442,7 @@ func (p *Painter) LineStroke(points []Point) *Painter { for index, point := range points { x := point.X y := point.Y - if y == math.MaxInt { + if y == int(math.MaxInt32) { p.Stroke() shouldMoveTo = true continue