Skip to content

Fix/use unknown color #104

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
May 31, 2025
Merged

Fix/use unknown color #104

merged 23 commits into from
May 31, 2025

Conversation

gka
Copy link
Contributor

@gka gka commented May 30, 2025

resolves #100

  • Updated the handling of color scales to use a new unknown color value (#cccccc99) for invalid data, ensuring better visual distinction in plots. (src/lib/core/Plot.svelte, [1] [2]
  • Adjusted the logic for validating color scale values in Mark.svelte to improve handling of invalid data points. (src/lib/Mark.svelte, src/lib/Mark.svelteL261-R271)
  • Changed the default class name for Dot marks from "dots" to "dot" for better consistency. (src/lib/marks/Dot.svelte, src/lib/marks/Dot.svelteL87-R86)

Examples and Documentation:

Testing Infrastructure Updates:

New Tests:

  • Introduced a dedicated test for Dot marks, validating rendering, scaling, and color mapping based on data. (src/tests/dot.test.svelte, [1]; src/tests/dot.test.ts, [2]

Utility Functions:

  • Added reusable utility functions (getRectDims, getPathDims, getTranslate) for extracting dimensions and transformations from SVG elements, improving test reliability and modularity. (src/tests/utils.ts, src/tests/utils.tsR1-R40)
  • Refactored existing BarX tests to replace inline dimension calculation functions with the new utility functions. (src/tests/barX.test.ts, [1] [2]

Code Quality Improvements:

ESLint Configuration:

  • Added a new rule to disallow console.log while permitting console.error. (eslint.config.js, eslint.config.jsR6-R16)
  • Introduced the svelte/no-inspect rule to warn against using the inspect directive in Svelte files. (eslint.config.js, eslint.config.jsR6-R16)

Refactoring:

Copy link

netlify bot commented May 30, 2025

Deploy Preview for svelteplot ready!

Name Link
🔨 Latest commit 205cd38
🔍 Latest deploy log https://app.netlify.com/projects/svelteplot/deploys/683b93bed99da500087844be
😎 Deploy Preview https://deploy-preview-104--svelteplot.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

📦 Preview package for this PR is published!

Version: 0.2.9-pr-104.0

Install it with:

npm install svelteplot@pr-104
# or install the specific version
npm install svelteplot@0.2.9-pr-104.0

Copy link

📦 Preview package for this PR is published!

Version: 0.2.9-pr-104.1

Install it with:

npm install svelteplot@pr-104
# or install the specific version
npm install svelteplot@0.2.9-pr-104.1

Copy link

📦 Preview package for this PR is published!

Version: 0.2.9-pr-104.2

Install it with:

npm install svelteplot@pr-104
# or install the specific version
npm install svelteplot@0.2.9-pr-104.2

Copy link

📦 Preview package for this PR is published!

Version: 0.2.9-pr-104.3

Install it with:

npm install svelteplot@pr-104
# or install the specific version
npm install svelteplot@0.2.9-pr-104.3

@gka gka merged commit 8e106d5 into main May 31, 2025
7 of 8 checks passed
@gka gka deleted the fix/use-unknown-color branch May 31, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Grouping by x, y, and stroke doesn't work
1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy