Merged
Conversation
# Conflicts: # lib/package.json # yarn.lock
🦋 Changeset detectedLatest commit: 79e6906 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds logarithmic scale support to the charting library, allowing users to specify scale types (linear or logarithmic) for both X and Y axes through axisOptions configuration.
- Introduces
AxisScaletypeandAxisScalestypes to support scale configuration - Extends the
makeScalefunction to handle both linear and logarithmic scales using d3-scale - Updates chart components to pass through and utilize axis scale options
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/src/types.ts | Adds type definitions for axis scales configuration |
| lib/src/cartesian/utils/makeScale.ts | Core implementation of scale selection between linear and logarithmic |
| lib/src/cartesian/utils/transformInputData.ts | Integrates axis scales into data transformation pipeline |
| lib/src/cartesian/components/CartesianAxis.tsx | Adds default axis scale configuration |
| lib/src/cartesian/CartesianChart.tsx | Updates chart component to support new scale types |
| example/hooks/useOptionsReducer.ts | Adds state management for axis scales in example |
| example/app/line-chart.tsx | Demonstrates logarithmic scale usage in example |
| .vscode/settings.json | IDE configuration changes |
Comments suppressed due to low confidence (1)
lib/src/types.ts:19
- The AxisScales type is duplicated in both types.ts and transformInputData.ts. Consider removing the duplicate definition in transformInputData.ts and importing from types.ts to maintain a single source of truth.
xMax: number;
zibs
approved these changes
Jul 21, 2025
Contributor
|
Thanks @MichelBahl |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
allows users to pass in a axisOptions -> axisScales -> linear | log prop to enable the usage of lagarithsm charts
Type of Change
How Has This Been Tested?
Enhance an example -> example/app/line-chart.tsx
Checklist:
yarn run check:codeand all checks pass