leeoniya / leeoniya/uPlot

implement disp.y in pathBuilders

Open
#634 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

currently stacked [1] and shifted [2] demos have to pre-stack the raw data, which means u.data no longer contains raw values and hooks/plugins cannot read this back for display and we also have to jump through a few hoops to get the live legend to display what we want.

uPlot's current way to tweak individual datapoints for rendering is by using a user-provided disp option to the pathbuilder of choice. this then handles adapting the raw values to ones needed for actual drawing. however, currently only the bars pathbuilder supports disp*, and it only supports adjusting x0 and size, but not y, which can be used to avoid pre-processing raw data before setData() calls.

* also the scatter demo's pathbuilder

[1] https://leeoniya.github.io/uPlot/demos/stacked-series.html
[2] https://leeoniya.github.io/uPlot/demos/y-shifted-series.html

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

Start by reading the existing pathbuilders that support the user-provided disp option, especially the bars pathbuilder and the scatter demo's pathbuilder. Compare the stacked-series and y-shifted-series demos to understand the required y transformation. Done means disp.y can adapt values for rendering while u.data remains raw, and both demos can avoid pre-stacking or pre-shifting their data.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.