Release v0.4.0 - #63
Conversation
Remove alternate chart constructors and the React wrapper, apply nonlinear axis transforms throughout rendering and interaction, consolidate browser tooling, and prepare v0.4.0.
# Conflicts: # README.md # docs/api-reference.md # src/ui/Chart.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b12b30f6ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const sample = series.nearestSampleByX(dataX, viewport); | ||
| if (!sample) continue; | ||
| const distancePx = Math.abs(sample.x - dataX) * xScale; | ||
| const distancePx = Math.abs(controller.scaleValue(sample.x, "x") - controller.scaleValue(dataX, "x")) * xScale; |
There was a problem hiding this comment.
Compare nearest-x candidates in scaled space
For log/symlog/custom X axes, this only measures the sample already chosen by series.nearestSampleByX, but that helper chooses by raw data distance. For example, with a log-X chart containing samples at 1 and 20, hovering at x=10 selects 1 because raw dx is 9 < 10, even though 20 is much closer on screen after the log transform; with a finite maxDistancePx this can also return no hover item while a visible point is within range. Please compare the lower-bound neighbors using controller.scaleValue(...) before selecting the nearest-X sample.
Useful? React with 👍 / 👎.
Summary
new Chart(...)createChart(...)API,CreateChart*types, andblazeplot/reactwrapper entrymainBreaking changes
See
changelogs/v0.4.0.md.createChart(...)withnew Chart(...), add the series, initialize the viewport, and callstart().BlazeChartwithChartconstruction/disposal in the framework lifecycle.Validation
bun run cibun run pages:buildbun pm pack --dry-runbun run release:benchmarksRelease benchmark command recorded in the changelog:
Risk areas
Merging this PR to
maintriggers the release workflow, which publishes npm0.4.0, creates tagv0.4.0, and creates the GitHub Release.