history plot does not show "last written"

Issue #201 resolved
dd1 created an issue

The old history plots show this for each variable: latest value, “last data 13 Oct 1935”, “no data ever” and (I think) “variable not found in history” (or “does not exist in history”). The new plot only displays the last value or “no data”. K.O.

Comments (6)

  1. dd1 reporter

    history plot code in mhttpd.cxx does an extra call to read the last_written values - but js history code cannot do it easily. I need to add last_written to the history data RPC calls. K.O.

  2. Stefan Ritt

    I added the last written date to the labels in case no data is visible in the window. At the moment we have no means to directly “jump” to that data, but I’m not sure if we really need that. Could be maybe just a click on the label showing the date.

  3. dd1 reporter

    confirming it works. now that I see the correct dates, I got the “<<“ and “<<<“ buttons to work. There were a few problems:

    • “<<“ should not look at last_written of run transitions (for “<<<“ it does not matter)
    • draw() did not plot anything if the first variable had no data (in my case all the data was in the second variable)
    • receiveData() was doing the wrong branch if time array was empty (t0=time[0] is undefined!)

    There are still a couple of glitches, but basically it works. I will try to fix the glitches later.

    K.O.

  4. dd1 reporter

    both “<<“ and “<<<“ now work the same as in the old history plots. all bugs are fixed.

    There was only one problem: receiveData() made the decision on what to do with the data by looking at the first variable, in two places:

    • this.data[0].time.length - in my case it was always zero, all the data was in data[1]. the decision based on data[0] always sent the code down the “add new” branch instead of the “add left” branch. “add new” erases existing data, and my data mysteriously vanished from the history graph.
    • let t0=array[i] looks at the very first time value in the array, but it could belong to the first variable (if nData[0] is not zero) or the second variable (if nData[0] === 0), etc. against sending us down the wrong path.

    K.O.

  5. Log in to comment