leeoniya / leeoniya/uPlot

Strategies for showing a few unaligned / sparse data points among mostly aligned data

Open
#978 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
463
PR merge metrics
No merged PRs in 30d

Description

With reference to https://twitter.com/leeoniya/status/1816517816461459478, I'd be curious to learn any advice you may have around handling a situation where you have many series of mostly aligned data, along with a few unaligned + very sparse (single-point) series. In the old Prometheus UI (which I'm now rewriting with uPlot), we mostly show aligned time series, but we also allow optionally displaying sparse trace exemplar points in the same chart. These exemplar points are treated as regular series in the current Flot implementation, except that they have a custom point rendering. But they are still hoverable / focusable and show a tooltip like the regular series, and clicking on them opens a panel below the graph that shows more info about that exemplar:

image

My current workaround with uPlot's aligned data model would be to align them to the series timestamps and then fill everything up with null values. Except that each point you see above belongs to a different series with different labels etc., so it could be potentially a lot of series that contain mostly null values. Basically the scenario in which you should normally not use uPlot :) It would probably still work though, just not great. But if you have any even better recommendations for this situation, I'm all ears!

And thanks for uPlot btw., despite my difficulties implementing certain things around it, I'm having a lot of fun with it as well and love the small footprint and speed!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by reviewing uPlot's aligned data model and the current Flot handling of sparse exemplar series described in the issue; done would be a decided, documented recommendation for representing and interacting with those points.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.