Add histogram series support - #48
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec09318497
ℹ️ 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".
|
|
||
| if (autoFit) { | ||
| chart.fitToData(typeof autoFit === "object" ? autoFit : undefined); | ||
| chart.fitToData(typeof autoFit === "object" ? autoFit : hasHistogram ? { includeZero: true } : undefined); |
There was a problem hiding this comment.
Limit histogram zero-baseline fit to histogram axis
createChart(...) now forces fitToData({ includeZero: true }) whenever any histogram series is present, but includeZero is applied to both Y axes inside Chart.fitToData. In mixed-axis charts (e.g., histogram on left axis plus a right-axis series with values far from zero), the right axis is unnecessarily expanded to include 0, which can severely compress the non-histogram data and distort the default first render. This regression is triggered by default autoFit: true and should be scoped to histogram series/axis only (or left to explicit user opt-in).
Useful? React with 👍 / 👎.
Summary
Validation