Skip to content

Commit e593cdb

Browse files
jqnatividadclaude
authored andcommitted
feat: add Splom + Parcats trace types
Add typed scatter-plot-matrix (splom) and parallel-categories (parcats) traces following the established trace-struct recipe. - 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> Signed-off-by: Andrei Gherghescu <8067229+andrei-ng@users.noreply.github.com>
1 parent b8afc54 commit e593cdb

6 files changed

Lines changed: 585 additions & 6 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
1414
- [[#414](https://github.com/plotly/plotly.rs/issues/414)] Add `DensityMap` (MapLibre `map` subplot) trace type — density heatmaps with full color-scale and hover support
1515
- [[#417](https://github.com/plotly/plotly.rs/issues/417)] Add `ScatterMap` (MapLibre `map` subplot) trace type — the modern counterpart to `ScatterMapbox`
1616
- [[#418](https://github.com/plotly/plotly.rs/issues/418)] Add native point clustering to `ScatterMap` via a `Cluster` option
17-
- [[#421](https://github.com/plotly/plotly.rs/pull/421)] Backfill trace attributes on trace types to bring them to parity with plotly.js 3.7
17+
- [[#421](https://github.com/plotly/plotly.rs/pull/421)] Backfill trace attributes for trace types to bring them to parity with plotly.js 3.7
1818
- [[#422](https://github.com/plotly/plotly.rs/issues/422)] Add `Indicator`, `Histogram2d`, `Icicle` trace types
19+
- [[#425](https://github.com/plotly/plotly.rs/issues/425)] Add `Splom` and `Parcats` trace types (scatter-plot matrix and parallel categories)
1920

2021
### Changed
2122

‎plotly/src/common/mod.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ pub enum PlotType {
231231
Indicator,
232232
Mesh3D,
233233
Ohlc,
234+
Parcats,
234235
Sankey,
236+
Splom,
235237
Surface,
236238
DensityMapbox,
237239
DensityMap,

‎plotly/src/lib.rs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ pub use plot::{Plot, Trace, Traces};
6161
// Also provide easy access to modules which contain additional trace-specific types
6262
pub use traces::{
6363
box_plot, choropleth, choropleth_map, contour, density_map, heat_map, histogram, histogram2d,
64-
icicle, image, indicator, mesh3d, sankey, scatter, scatter3d, scatter_map, scatter_mapbox,
65-
sunburst, surface, treemap, violin,
64+
icicle, image, indicator, mesh3d, parcats, sankey, scatter, scatter3d, scatter_map,
65+
scatter_mapbox, splom, sunburst, surface, treemap, violin,
6666
};
6767
// Bring the different trace types into the top-level scope
6868
pub use traces::{
6969
Bar, BoxPlot, Candlestick, Choropleth, ChoroplethMap, Contour, DensityMap, DensityMapbox,
70-
HeatMap, Histogram, Histogram2d, Icicle, Image, Indicator, Mesh3D, Ohlc, Pie, Sankey, Scatter,
71-
Scatter3D, ScatterGeo, ScatterMap, ScatterMapbox, ScatterPolar, Sunburst, Surface, Table,
72-
Treemap, Violin,
70+
HeatMap, Histogram, Histogram2d, Icicle, Image, Indicator, Mesh3D, Ohlc, Parcats, Pie, Sankey,
71+
Scatter, Scatter3D, ScatterGeo, ScatterMap, ScatterMapbox, ScatterPolar, Splom, Sunburst,
72+
Surface, Table, Treemap, Violin,
7373
};
7474

7575
pub trait Restyle: serde::Serialize {}

‎plotly/src/traces/mod.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ pub mod image;
1616
pub mod indicator;
1717
pub mod mesh3d;
1818
mod ohlc;
19+
pub mod parcats;
1920
pub mod pie;
2021
pub mod sankey;
2122
pub mod scatter;
@@ -24,6 +25,7 @@ pub mod scatter_geo;
2425
pub mod scatter_map;
2526
pub mod scatter_mapbox;
2627
mod scatter_polar;
28+
pub mod splom;
2729
pub mod sunburst;
2830
pub mod surface;
2931
pub mod table;
@@ -45,6 +47,7 @@ pub use icicle::Icicle;
4547
pub use indicator::Indicator;
4648
pub use mesh3d::Mesh3D;
4749
pub use ohlc::Ohlc;
50+
pub use parcats::Parcats;
4851
pub use pie::Pie;
4952
pub use sankey::Sankey;
5053
pub use scatter::Scatter;
@@ -53,6 +56,7 @@ pub use scatter_geo::ScatterGeo;
5356
pub use scatter_map::ScatterMap;
5457
pub use scatter_mapbox::ScatterMapbox;
5558
pub use scatter_polar::ScatterPolar;
59+
pub use splom::Splom;
5660
pub use sunburst::Sunburst;
5761
pub use surface::Surface;
5862
pub use table::Table;

0 commit comments

Comments
 (0)