diff --git a/LineChart.exe b/LineChart.exe index f16f00d..d8536be 100644 Binary files a/LineChart.exe and b/LineChart.exe differ diff --git a/LineChart.go b/LineChart.go index 4bb56fa..a80545d 100644 --- a/LineChart.go +++ b/LineChart.go @@ -191,18 +191,21 @@ func eChart(w http.ResponseWriter, r *http.Request) { chartSeries := cfg.Section("Chart").Key("Series").String() assetsURL := cfg.Section("Chart").Key("AssetsURL").String() - var xPercent float32 = 75 + var xPercent float32 = 0 if params.Range == "all" { xPercent = 0 } - if params.Range == "half" { - xPercent = 50 + if params.Range == "3days" { + xPercent = 57.14 } - if params.Range == "quarter" { - xPercent = 75 + if params.Range == "2days" { + xPercent = 71.42 } - if params.Range == "octant" { - xPercent = 87.5 + if params.Range == "1day" { + xPercent = 85.71 + } + if params.Range == "12hrs" { + xPercent = 92.85 } if params.Alias != "" { chartSubtitle = params.Alias @@ -257,13 +260,14 @@ func eChart(w http.ResponseWriter, r *http.Request) { Min: "dataMin", Max: "dataMax", AxisLabel: &opts.AxisLabel{ + Show: true, ShowMinLabel: true, ShowMaxLabel: true, Rotate: 45, FontSize: "14", FontWeight: "600", FontFamily: "Calibri", - LineHeight: "200", + LineHeight: "250", }, }, ), @@ -290,11 +294,11 @@ func eChart(w http.ResponseWriter, r *http.Request) { }, }, ), - // charts.WithLegendOpts( - // opts.Legend{ - // Show: true, - // }, - // ), + charts.WithLegendOpts( + opts.Legend{ + Show: false, + }, + ), ) chart.SetXAxis(timeAxis).AddSeries(chartSeries, dots).