leeoniya / leeoniya/uPlot

axis.splits callbacks currently assume that scales are settled

Open
#790 0 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

this is relevant for future scale ranging and axis ticks rework, which would involve scale ranges depending on axis splits config, creating yet another chicken/egg situation that could be difficult to resolve

e.g.
https://github.com/grafana/grafana/blob/8379a29b53b27b6f88f0ad71abb1d8fc25a88165/public/app/plugins/panel/histogram/Histogram.tsx#L65

in this above case, the range can be determined from the data and we're just using the scale to figure out when to skip splits, but this can be done later in axis.filter or axis.ticks.filter and axis.grid.filter

https://github.com/leeoniya/uPlot/blob/1d380f664acbc41f03aa65f91c39efeda9902e1c/dist/uPlot.d.ts#L935

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 axis.splits callback definition around line 935 of dist/uPlot.d.ts and the Grafana Histogram.tsx example at line 65. Trace when scales, axis splits, filters, ticks, and grids are evaluated, then define the intended ordering for future scale-range and axis-tick rework. Done should resolve the documented chicken-and-egg behavior with an agreed callback contract and coverage for the affected lifecycle.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.