From 3e5e58512425a6aee84bb3d1bc3c27eb1c306ae8 Mon Sep 17 00:00:00 2001 From: Joseph Villavicencio Date: Wed, 23 Oct 2019 15:05:50 -0700 Subject: [PATCH 1/2] Add hovertemplate attr to trace Added a hovertemplate attribute to the first trace so the number shown is equal to the base instead of 0 on hover. 'y' could be used in place of 'base' in the hovertemplate if user wants the number shown to be positive. Seems the user would want either 'y' or 'base' instead of 0 more often than not. --- _posts/plotly_js/basic/bar/2018-02-27-bar-base.html | 1 + 1 file changed, 1 insertion(+) diff --git a/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html b/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html index 23a498d17463..57ef5e6432a0 100644 --- a/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html +++ b/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html @@ -14,6 +14,7 @@ x: ['2016','2017','2018'], y: [500,600,700], base: [-500,-600,-700], + hovertemplate: '%{base}' marker: { color: 'red' }, From d0700253577f87b930d5458d0caed9395c1f516c Mon Sep 17 00:00:00 2001 From: Joseph Villavicencio Date: Wed, 23 Oct 2019 17:59:00 -0700 Subject: [PATCH 2/2] Update 2018-02-27-bar-base.html --- _posts/plotly_js/basic/bar/2018-02-27-bar-base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html b/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html index 57ef5e6432a0..3fccabd15af1 100644 --- a/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html +++ b/_posts/plotly_js/basic/bar/2018-02-27-bar-base.html @@ -14,7 +14,7 @@ x: ['2016','2017','2018'], y: [500,600,700], base: [-500,-600,-700], - hovertemplate: '%{base}' + hovertemplate: '%{base}' marker: { color: 'red' },