Skip to content

Displaying calculated value in hovertext #383

Answered by dbuezas
paradox460 asked this question in Q&A
Discussion options

You must be logged in to vote

If you have 1-off issues, it may be that the other is missing a datapoint for early feb. To confirm, use hours_to_show: 4d.
If that is the case, the only solution I see is to index backwards (so from the end instead of from the start).

You can do this by

reverse_i = -statistics.length-1-i;
const mpg = vars.mpg.ys.at(reverse_i);

But you'll also get in trouble if some sensor is missing data at the end, although that may be fixable by adding a resample filter.

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@paradox460
Comment options

@dbuezas
Comment options

Answer selected by paradox460
@paradox460
Comment options

@paradox460
Comment options

@dbuezas
Comment options

@paradox460
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants