From ca9819a775e93e424d166853bb21e5323c51518e Mon Sep 17 00:00:00 2001 From: -cr <105788188+DE-cr@users.noreply.github.com> Date: Wed, 4 Sep 2024 07:18:52 +0200 Subject: [PATCH] /DG: added rescale and subchart on zooming subchart side effect: when zoomed in, de-/selecting curves doesn't zoom out --- BSB_LAN/html_strings.h | 6 +++++- BSB_LAN/scripts/BSB-LAN_datalog-viewer.html | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/BSB_LAN/html_strings.h b/BSB_LAN/html_strings.h index 6d912f2e..55fe422a 100644 --- a/BSB_LAN/html_strings.h +++ b/BSB_LAN/html_strings.h @@ -146,7 +146,11 @@ const char graph_html[] = "}," NEWLINE "point:{show:false}," NEWLINE "axis:{x:{type:'timeseries',tick:{count:3,format:e}}}," NEWLINE - "zoom:{enabled:true}," NEWLINE + "zoom:{" NEWLINE + "enabled:true," NEWLINE + "rescale:true," NEWLINE + "onzoomstart:function(){c.subchart.show()}" NEWLINE + "}," NEWLINE "size:{height:window.innerHeight-20}," NEWLINE "onresize:function(){c.resize({height:window.innerHeight-20})}" NEWLINE "})" NEWLINE diff --git a/BSB_LAN/scripts/BSB-LAN_datalog-viewer.html b/BSB_LAN/scripts/BSB-LAN_datalog-viewer.html index 7aab87ff..4fb5a679 100644 --- a/BSB_LAN/scripts/BSB-LAN_datalog-viewer.html +++ b/BSB_LAN/scripts/BSB-LAN_datalog-viewer.html @@ -94,7 +94,11 @@ }, point:{show:false}, axis:{x:{type:'timeseries',tick:{count:3,format:f}}}, - zoom:{enabled:true}, + zoom:{ + enabled:true, + rescale:true, + onzoomstart:function(){c.subchart.show()} + }, size:{height:window.innerHeight-40}, onresize:function(){c.resize({height:window.innerHeight-40})} });