feat(traces): add Splom + Parcats trace types#5
Closed
jqnatividad wants to merge 1 commit into
Closed
Conversation
Add typed scatter-plot-matrix (splom) and parallel-categories (parcats)
traces following the established trace-struct recipe.
- Splom<V>: SplomDimension/SplomAxis/SplomDiagonal sub-structs,
showupperhalf/showlowerhalf controls, reuses common Marker.
- Parcats<V>: ParcatsDimension/ParcatsLine sub-structs, counts weighting,
and ParcatsLineShape/ParcatsArrangement/ParcatsHoverOn/ParcatsSortPaths
enums. arrangement includes the runtime-supported "fixed" value.
- Register PlotType::{Splom, Parcats} (serialize to "splom"/"parcats"),
re-export modules + traces from traces/mod.rs and lib.rs.
- All attributes verified against bundled plotly.js 3.7.0 schema.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
|
Superseded by the standalone upstream PR plotly#424 (based directly on |
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.
Summary
Adds two typed traces to the fork, following the established trace-struct recipe (mirroring
sankey.rsandhistogram2d.rs). Stacked on plotly#423 — base isfeature/trace-type-additions; retarget tomainonce that merges.Splom<V>(scatter-plot matrix) —SplomDimension/SplomAxis/SplomDiagonalsub-structs,showupperhalf/showlowerhalfcontrols, reuses the commonMarker. Plotly.js auto-generates the N×N axis grid, so no explicitxaxis/yaxisassignment.Parcats<V>(parallel categories) —ParcatsDimension/ParcatsLinesub-structs,countsper-path weighting, domain-based (like Sankey). Enums:ParcatsLineShape,ParcatsArrangement,ParcatsHoverOn,ParcatsSortPaths.Details
PlotType::{Splom, Parcats}serialize to"splom"/"parcats"via the existingrename_all = "lowercase"(no explicit rename needed, same asSankey).traces/mod.rsandlib.rs;CHANGELOG.mdupdated under[Unreleased] → Added.hovertemplateis genuinely trace-level, andarrangementalso accepts"fixed"(included for schema completeness).Note for reviewers
SplomAxis::typereuses the sharedAxisTypeenum, which is slightly wider than splom's allowed set (linear/log/date/category) — it also carries-/multicategory. This follows the "reuse common types" convention; Plotly.js coerces invalid values. Happy to swap in a narrower splom-specific enum if preferred.Testing
cargo test -p plotly --features all— 371 unit + 36 doctests pass (includesto_json()round-trip + doc examples for both traces)cargo clippy --features all -- -D warnings -A deprecated— cleancargo doc— no new warnings🤖 Generated with Claude Code