From 08f9c177ba8d803a8576e9b86a474e333ac7fe5d Mon Sep 17 00:00:00 2001 From: dustoair <107600816+dustoair@users.noreply.github.com> Date: Sat, 17 Sep 2022 19:21:33 +0800 Subject: [PATCH] add more symbol --- goCharts/draw.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/goCharts/draw.go b/goCharts/draw.go index 8776993..2d6071f 100644 --- a/goCharts/draw.go +++ b/goCharts/draw.go @@ -26,10 +26,14 @@ func getRand(len int) []float64 { } func Draw() { - timeUpdate, symbolPrice := api.GetSerivers("ETHUSDT") - log.Println(timeUpdate, symbolPrice) + timeUpdate, symbolPriceETH := api.GetSerivers("ETHUSDT") + timeUpdate, symbolPriceBTC := api.GetSerivers("BTCUSDT") + timeUpdate, symbolPriceBNB := api.GetSerivers("BNBUSDT") + log.Println(timeUpdate, symbolPriceETH) values := [][]float64{ - symbolPrice, + symbolPriceBTC, + symbolPriceETH, + symbolPriceBNB, //getRand(30), //getRand(30), //getRand(30), @@ -44,9 +48,9 @@ func Draw() { charts.XAxisDataOptionFunc(timeUpdate), //charts.XAxisDataOptionFunc(getLastDays(30)), charts.LegendLabelsOptionFunc([]string{ + "BTC", "ETH", - //"ETH", - //"BNB", + "BNB", //"TRX", }, "150"), func(opt *charts.ChartOption) {