long delay in display of history graphs
Issue #262
resolved
When loading any history plot, there is a long delay after loading all the data and showing showing the history graphs. The delay is “many seconds”. The best I can tell, the fix in the following diff: call timeToXInit() after assigning values to this.x1 and this.x2. In the first call to draw() after loading the data I see timeToX() return NaN, all the x[] and y[] arrays are empty and nothing is plotted. K.O.
diff --git a/resources/mhistory.js b/resources/mhistory.js
index 095b499..ed5ecad 100644
--- a/resources/mhistory.js
+++ b/resources/mhistory.js
@@ -1710,9 +1710,6 @@ MhistoryGraph.prototype.draw = function () {
if (this.yMax === undefined || Number.isNaN(this.yMax))
return;
- this.timeToXInit(); // initialize scale factor t -> x
- this.valueToYInit(); // initialize scale factor v -> y
-
let axisLabelWidth = this.drawVAxis(ctx, 50, this.height - 25, this.height - 35,
-4, -7, -10, -12, 0, this.yMin, this.yMax, this.logAxis, false);
@@ -1721,6 +1718,9 @@ MhistoryGraph.prototype.draw = function () {
this.x2 = this.width - 30;
this.y2 = 26;
+ this.timeToXInit(); // initialize scale factor t -> x
+ this.valueToYInit(); // initialize scale factor v -> y
+
// title
Comments (2)
-
-
reporter - changed status to resolved
confirmed fixed. K.O.
- Log in to comment
Yepp that’s correct. I applied your patch and committed it.