Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork21
feat: allow disabling of axis labels using text={false} or text={null}#95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
netlifybot commentedMay 29, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
✅ Deploy Preview forsvelteplot ready!
To edit notification comments on pull requests, go to yourNetlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Pull Request Overview
This PR adds a newtext prop toAxisX andAxisY to allow disabling tick labels, updates internal helpers to respect this flag, and provides examples and tests illustrating the feature.
- Introduce
textprop inAxisX,AxisY, and their base helpers. - Wrap label rendering in
BaseAxisX.svelteandBaseAxisY.sveltewithif (text)guards. - Add a Svelte example (
major-minor.svelte) and a unit test forAxisX.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/marks/helpers/BaseAxisX.svelte | Addedtext prop and conditional label rendering (plus leftover debug). |
| src/lib/marks/helpers/BaseAxisY.svelte | Addedtext prop and wrapped label loops inif (text). |
| src/lib/marks/AxisX.svelte | Exposedtext prop to the base helper. |
| src/lib/marks/AxisY.svelte | Exposedtext prop to the base helper. |
| src/tests/axisX.test.ts | New test verifying labels are omitted whentext isnull. |
| src/routes/examples/axis/major-minor.svelte | Example showing major and minor ticks with labels disabled. |
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-95# or install the specific versionnpm install svelteplot@0.2.9-pr-95.0 |
📦 Preview package for this PR is published! Version: Install it with: npm install svelteplot@pr-95# or install the specific versionnpm install svelteplot@0.2.9-pr-95.1 |
e46635d intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
resolves#77
This pull request introduces a new
textproperty to theAxisXandAxisYcomponents, enabling users to toggle tick labels on or off. The changes improve flexibility in axis customization and include updates to related helper components, examples, and tests.Examples and Documentation:
textproperty to create minor tick lines without labels.Testing Improvements:
textproperty inAxisX, ensuring tick labels are omitted whentextis set tonull.