From c14ab6a4b27ebe6285703590fdaedcecb43c7da8 Mon Sep 17 00:00:00 2001 From: Will Charczuk Date: Mon, 18 Jul 2016 11:53:29 -0700 Subject: [PATCH] tweaks to fix annotation series drawing. --- chart.go | 3 ++- examples/axes/main.go | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/chart.go b/chart.go index 3956923..1eb4bdf 100644 --- a/chart.go +++ b/chart.go @@ -118,10 +118,11 @@ func (c Chart) Render(rp RendererProvider, w io.Writer) error { } c.drawCanvas(r, canvasBox) + c.drawAxes(r, canvasBox, xr, yr, yra, xt, yt, yta) for index, series := range c.Series { c.drawSeries(r, canvasBox, xr, yr, yra, series, index) } - c.drawAxes(r, canvasBox, xr, yr, yra, xt, yt, yta) + c.drawTitle(r) for _, a := range c.Elements { diff --git a/examples/axes/main.go b/examples/axes/main.go index dc8d6be..325a632 100644 --- a/examples/axes/main.go +++ b/examples/axes/main.go @@ -26,6 +26,11 @@ func drawChart(res http.ResponseWriter, req *http.Request) { }, Series: []chart.Series{ chart.ContinuousSeries{ + Style: chart.Style{ + Show: true, + StrokeColor: chart.GetDefaultSeriesStrokeColor(0).WithAlpha(64), + FillColor: chart.GetDefaultSeriesStrokeColor(0).WithAlpha(64), + }, XValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, YValues: []float64{1.0, 2.0, 3.0, 4.0, 5.0}, },