From 3397066c584d8855d889487bf8bc3829843e6d81 Mon Sep 17 00:00:00 2001 From: Philemon Ukane Date: Thu, 6 Jun 2024 06:33:21 +0100 Subject: [PATCH] set chart mode before display on chart view Signed-off-by: Philemon Ukane --- cmd/dcrdata/public/js/controllers/charts_controller.js | 1 + cmd/dcrdata/views/extras.tmpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/dcrdata/public/js/controllers/charts_controller.js b/cmd/dcrdata/public/js/controllers/charts_controller.js index 7a9d65a69..fa9f774ee 100644 --- a/cmd/dcrdata/public/js/controllers/charts_controller.js +++ b/cmd/dcrdata/public/js/controllers/charts_controller.js @@ -393,6 +393,7 @@ export default class extends Controller { } this.settings = TurboQuery.nullTemplate(['chart', 'zoom', 'scale', 'bin', 'axis', 'visibility']) + this.settings.mode = this.data.get('mode') this.query.update(this.settings) this.settings.chart = this.settings.chart || 'ticket-price' this.zoomCallback = this._zoomCallback.bind(this) diff --git a/cmd/dcrdata/views/extras.tmpl b/cmd/dcrdata/views/extras.tmpl index c0f13c0dd..e631fd7c9 100644 --- a/cmd/dcrdata/views/extras.tmpl +++ b/cmd/dcrdata/views/extras.tmpl @@ -189,7 +189,7 @@ data-turbolinks-suppress-warning >