Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- [[#412](https://github.com/plotly/plotly.rs/pull/412)] Add `Violin` trace type with box, mean line, KDE span, and split/grouped support
- [[#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
- [[#417](https://github.com/plotly/plotly.rs/issues/417)] Add `ScatterMap` (MapLibre `map` subplot) trace type — the modern counterpart to `ScatterMapbox`
- Add `Funnel` trace type (bar-like, cartesian) with `Connector` and `FunnelHoverInfo` options, plus the layout-level `funnelmode`/`funnelgap`/`funnelgroupgap` attributes and a `FunnelMode` enum
- Add `Waterfall` trace type (bar-like, cartesian) with a typed `Measure` enum (`absolute`/`relative`/`total`), per-class `increasing`/`decreasing`/`totals` styling via `MeasureStyle`, a `Connector` with `ConnectorMode`, and a `WaterfallHoverInfo` enum. The layout-level `waterfallmode`/`waterfallgap`/`waterfallgroupgap` attributes and the `WaterfallMode` enum already existed
- [[#418](https://github.com/plotly/plotly.rs/issues/418)] Add native point clustering to `ScatterMap` via a `Cluster` option
- [[#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
- [[#422](https://github.com/plotly/plotly.rs/issues/422)] Add `Indicator`, `Histogram2d`, `Icicle` trace types
- [[#425](https://github.com/plotly/plotly.rs/issues/425)] Add `Splom` and `Parcats` trace types (scatter-plot matrix and parallel categories)
- [[#432](https://github.com/plotly/plotly.rs/issues/432)] Add `Funnel` and `Waterfall` trace types

### Changed

Expand All @@ -31,6 +34,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
- [[#387](https://github.com/plotly/plotly.rs/pull/387)] Fix HeatMap hovertext/text dimensions
- [[#385](https://github.com/plotly/plotly.rs/pull/385)] Add `{x,y}gap` parameter to heatmaps
- [[#381](https://github.com/plotly/plotly.rs/pull/381)] Make `Plot::default()` behave like `Plot::new()`
- [[#432](https://github.com/plotly/plotly.rs/issues/432)] Fixed mdBook table of contents ordering


## [0.14.0] - 2026-01-10

Expand Down
11 changes: 9 additions & 2 deletions docs/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
- [Scatter Plots](./recipes/basic_charts/scatter_plots.md)
- [Line Charts](./recipes/basic_charts/line_charts.md)
- [Bar Charts](./recipes/basic_charts/bar_charts.md)
- [Table Charts](./recipes/basic_charts/table_charts.md)
- [Pie Charts](./recipes/basic_charts/pie_charts.md)
- [Sankey Diagrams](./recipes/basic_charts/sankey_diagrams.md)
- [Parallel Categories](./recipes/basic_charts/parcats_charts.md)
- [Treemap Charts](./recipes/basic_charts/treemap_charts.md)
- [Sunburst Charts](./recipes/basic_charts/sunburst_charts.md)
- [Icicle Charts](./recipes/basic_charts/icicle_charts.md)
- [Sankey Diagrams](./recipes/basic_charts/sankey_diagrams.md)
- [Parallel Categories](./recipes/basic_charts/parcats_charts.md)
- [Indicator Charts](./recipes/basic_charts/indicator_charts.md)
- [Statistical Charts](./recipes/statistical_charts.md)
- [Error Bars](./recipes/statistical_charts/error_bars.md)
Expand All @@ -35,10 +36,16 @@
- [Time Series and Date Axes](./recipes/financial_charts/time_series_and_date_axes.md)
- [Candlestick Charts](./recipes/financial_charts/candlestick_charts.md)
- [OHLC Charts](./recipes/financial_charts/ohlc_charts.md)
- [Waterfall Charts](./recipes/financial_charts/waterfall_charts.md)
- [Funnel Charts](./recipes/financial_charts/funnel_charts.md)
- [Rangebreaks](./recipes/financial_charts/rangebreaks.md)
- [3D Charts](./recipes/3dcharts.md)
- [Scatter 3D](./recipes/3dcharts/3dcharts.md)
- [Surface Plots](./recipes/3dcharts/surface_plots.md)
- [Mesh3D](./recipes/3dcharts/mesh3d_plots.md)
- [Maps](./recipes/maps.md)
- [Scatter Maps](./recipes/maps/scatter_maps.md)
- [Density Maps](./recipes/maps/density_maps.md)
- [Choropleth Maps](./recipes/maps/choropleth_maps.md)
- [Subplots](./recipes/subplots.md)
- [Subplots](./recipes/subplots/subplots.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/book/src/recipes/3dcharts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ The complete source code for the following examples can also be found [here](htt
Kind | Link
:---|:----:
Scatter3D |[![Scatter 3D Charts](./img/basic_scatter3d.png)](./3dcharts/3dcharts.md)
Surface Plots | [![Surface Plots](./img/surface_plot.png)](./3dcharts/surface_plots.md)
Mesh3D | [![Mesh3D](./img/mesh3d.png)](./3dcharts/mesh3d_plots.md)
21 changes: 21 additions & 0 deletions docs/book/src/recipes/3dcharts/mesh3d_plots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Mesh3D Plots

A `Mesh3D` trace draws a triangulated 3D mesh from vertex coordinates and triangle
indices. An optional `intensity` array per vertex drives the color scale.

The following imports have been used to produce the plots below:

```rust,no_run
use plotly::common::ColorScalePalette;
use plotly::{Mesh3D, Plot};
```

The `to_inline_html` method is used to produce the html plot displayed in this page.

## Basic Mesh3D Plot

```rust,no_run
{{#include ../../../../../examples/3d_charts/src/main.rs:mesh_3d_plot}}
```

{{#include ../../../../../examples/3d_charts/output/inline_mesh_3d_plot.html}}
21 changes: 21 additions & 0 deletions docs/book/src/recipes/3dcharts/surface_plots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Surface Plots

A `Surface` trace renders a 3D surface from a matrix of z-values. Optional `x` and
`y` vectors define the grid coordinates; when omitted, indices are used.

The following imports have been used to produce the plots below:

```rust,no_run
use ndarray::Array;
use plotly::{Plot, Surface};
```

The `to_inline_html` method is used to produce the html plot displayed in this page.

## Basic Surface Plot

```rust,no_run
{{#include ../../../../../examples/3d_charts/src/main.rs:surface_plot}}
```

{{#include ../../../../../examples/3d_charts/output/inline_surface_plot.html}}
9 changes: 5 additions & 4 deletions docs/book/src/recipes/basic_charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ The source code for the following examples can also be found [here](https://gith

Kind | Link
:---|:----:
Scatter Plots |[![Scatter Plots](./img/line_and_scatter_plot.png)](./basic_charts/scatter_plots.md)
Scatter Plots | [![Scatter Plots](./img/line_and_scatter_plot.png)](./basic_charts/scatter_plots.md)
Line Charts | [![Line Charts](./img/line_shape_options_for_interpolation.png)](./basic_charts/line_charts.md)
Bar Charts | [![Bar Charts](./img/bar_chart_with_error_bars.png)](./basic_charts/scatter_plots.md)
Bar Charts | [![Bar Charts](./img/bar_chart_with_error_bars.png)](./basic_charts/bar_charts.md)
Table Charts | [![Table Charts](./img/table.png)](./basic_charts/table_charts.md)
Pie Charts | [![Pie Charts](./img/pie_charts.png)](./basic_charts/pie_charts.md)
Sankey Diagrams | [![Sankey Diagrams](./img/basic_sankey.png)](./basic_charts/sankey_diagrams.md)
Parallel Categories | [![Parallel Categories](./img/parallelcat.png)](./basic_charts/parcats_charts.md)
Treemap Charts | [![Treemap Charts](./img/treemap.png)](./basic_charts/treemap_charts.md)
Sunburst Charts | [![Sunburst Charts](./img/sunburst.png)](./basic_charts/sunburst_charts.md)
Icicle Charts | [![Icicle Charts](./img/icicle.png)](./basic_charts/icicle_charts.md)
Sankey Diagrams | [![Sankey Diagrams](./img/basic_sankey.png)](./basic_charts/sankey_diagrams.md)
Parallel Categories | [![Parallel Categories](./img/parallelcat.png)](./basic_charts/parcats_charts.md)
Indicator Charts | [![Indicator Charts](./img/indicator.png)](./basic_charts/indicator_charts.md)
14 changes: 14 additions & 0 deletions docs/book/src/recipes/basic_charts/bar_charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,17 @@ The `to_inline_html` method is used to produce the html plot displayed in this p
```

{{#include ../../../../../examples/basic_charts/output/inline_stacked_bar_chart.html}}

## Category Order Bar Chart
```rust,no_run
{{#include ../../../../../examples/basic_charts/src/main.rs:category_order_bar_chart}}
```

{{#include ../../../../../examples/basic_charts/output/inline_category_order_bar_chart.html}}

## Bar Chart with Pattern Fills
```rust,no_run
{{#include ../../../../../examples/basic_charts/src/main.rs:bar_chart_with_pattern_fills}}
```

{{#include ../../../../../examples/basic_charts/output/inline_bar_chart_with_pattern_fills.html}}
2 changes: 1 addition & 1 deletion docs/book/src/recipes/basic_charts/sankey_diagrams.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p
{{#include ../../../../../examples/basic_charts/output/inline_basic_sankey_diagram.html}}


## Skankey diagram with defined node position
## Sankey diagram with defined node position
```rust,no_run
{{#include ../../../../../examples/basic_charts/src/main.rs:custom_node_sankey_diagram}}
```
Expand Down
7 changes: 7 additions & 0 deletions docs/book/src/recipes/basic_charts/scatter_plots.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,10 @@ The `to_inline_html` method is used to produce the html plot displayed in this p
```

{{#include ../../../../../examples/basic_charts/output/inline_large_data_sets.html}}

## Categories Scatter Chart
```rust,no_run
{{#include ../../../../../examples/basic_charts/src/main.rs:categories_scatter_chart}}
```

{{#include ../../../../../examples/basic_charts/output/inline_categories_scatter_chart.html}}
23 changes: 23 additions & 0 deletions docs/book/src/recipes/basic_charts/table_charts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Table Charts

A `Table` trace renders structured data as an HTML table inside the plot. Unlike cartesian traces,
it does not use x/y axes — you supply a styled `Header` and `Cells` block.

The following imports have been used to produce the plots below:

```rust,no_run
use plotly::color::NamedColor;
use plotly::traces::table::{
Align as TableAlign, Cells, Fill as TableFill, Font as TableFont, Header, Line as TableLine,
};
use plotly::{Plot, Table};
```

The `to_inline_html` method is used to produce the html plot displayed in this page.

## Basic Table
```rust,no_run
{{#include ../../../../../examples/basic_charts/src/main.rs:table_chart}}
```

{{#include ../../../../../examples/basic_charts/output/inline_table_chart.html}}
4 changes: 3 additions & 1 deletion docs/book/src/recipes/financial_charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ The source code for the following examples can also be found [here](https://gith

Kind | Link
:---|:----:
Time Series and Date Axes |[![Time Series and Date Axes](./img/time_series_and_date_axes.png)](./financial_charts/time_series_and_date_axes.md)
Time Series and Date Axes | [![Time Series and Date Axes](./img/time_series_and_date_axes.png)](./financial_charts/time_series_and_date_axes.md)
Candlestick Charts | [![Candlestick Charts](./img/candlestick_chart.png)](./financial_charts/candlestick_charts.md)
OHLC Charts | [![OHLC Charts](./img/ohlc_chart.png)](./financial_charts/ohlc_charts.md)
Waterfall Charts | [![Waterfall Charts](./img/waterfall.png)](./financial_charts/waterfall_charts.md)
Funnel Charts | [![Funnel Charts](./img/funnel.png)](./financial_charts/funnel_charts.md)
Rangebreaks | [![Rangebreaks](./img/rangebreaks.png)](./financial_charts/rangebreaks.md)
34 changes: 34 additions & 0 deletions docs/book/src/recipes/financial_charts/funnel_charts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Funnel Charts

A funnel chart shows how a quantity narrows as it passes through a sequence of stages. It is a
*containment* form: each stage is understood to be a subset of the one above it, and the band
widths carry that claim — so it suits pipelines that genuinely nest, such as a conversion funnel.

Stages are fed **upstream-first**: plotly draws index 0 at the top, which is the opposite of a
plain category axis.

`text_info` takes a `+`-joined flaglist, so a band can show its own value alongside its conversion
from the previous stage (`"value+percent previous"`), the share of the first stage
(`"percent initial"`), or the share of the total (`"percent total"`).

For a sequence whose steps do *not* nest — independent totals, or contributions that can be
negative — see [Waterfall Charts](./waterfall_charts.md) instead.

The following imports have been used to produce the plots below:

```rust,no_run
use plotly::color::NamedColor;
use plotly::common::Marker;
use plotly::funnel::Connector as FunnelConnector;
use plotly::layout::Layout;
use plotly::{Funnel, Plot};
```

The `to_inline_html` method is used to produce the html plot displayed in this page.

## Basic Funnel
```rust,no_run
{{#include ../../../../../examples/financial_charts/src/main.rs:basic_funnel}}
```

{{#include ../../../../../examples/financial_charts/output/inline_basic_funnel.html}}
32 changes: 32 additions & 0 deletions docs/book/src/recipes/financial_charts/waterfall_charts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Waterfall Charts

A waterfall chart shows how a running total is built up from a starting value and a
sequence of signed contributions. Each bar's role is set by its `Measure`:

- `Measure::Absolute` resets the running total and draws a bar from zero to it,
- `Measure::Relative` adds a signed delta, drawn as a floating bar,
- `Measure::Total` draws the running total accumulated so far.

The value supplied for a `Total` bar is ignored — plotly.js re-derives it — but the slot
must still be present, because the label, value and `measure` arrays are read positionally.

For nested stage-to-stage containment rather than signed contributions, see
[Funnel Charts](./funnel_charts.md) instead.

The following imports have been used to produce the plots below:

```rust,no_run
use plotly::color::NamedColor;
use plotly::layout::Layout;
use plotly::waterfall::{Marker as WaterfallMarker, Measure, MeasureStyle};
use plotly::{Plot, Waterfall};
```

The `to_inline_html` method is used to produce the html plot displayed in this page.

## Basic Waterfall
```rust,no_run
{{#include ../../../../../examples/financial_charts/src/main.rs:basic_waterfall}}
```

{{#include ../../../../../examples/financial_charts/output/inline_basic_waterfall.html}}
Binary file added docs/book/src/recipes/img/choropleth_maps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/book/src/recipes/img/density_maps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/book/src/recipes/img/funnel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/book/src/recipes/img/mesh3d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/book/src/recipes/img/scatter_maps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/book/src/recipes/img/table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/book/src/recipes/img/waterfall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion docs/book/src/recipes/maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ The source code for the following examples can also be found [here](https://gith

Kind | Link
:---|:----:
Choropleth Maps | [Choropleth Maps](./maps/choropleth_maps.md)
Scatter Maps | [![Scatter Maps](./img/scatter_maps.png)](./maps/scatter_maps.md)
Density Maps | [![Density Maps](./img/density_maps.png)](./maps/density_maps.md)
Choropleth Maps | [![Choropleth Maps](./img/choropleth_maps.png)](./maps/choropleth_maps.md)
25 changes: 25 additions & 0 deletions docs/book/src/recipes/maps/density_maps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Density Maps

A [`DensityMapbox`](https://docs.rs/plotly/latest/plotly/struct.DensityMapbox.html)
trace renders a kernel density estimate as a heatmap layer on a Mapbox-style
basemap.

The following imports have been used to produce the plots below:

```rust,no_run
use plotly::{
layout::{Center, DragMode, Mapbox, MapboxStyle},
Configuration, DensityMapbox, Layout, Plot,
};
```

The `to_inline_html` method is used to produce the html plot displayed in this
page. The rendered map requires an internet connection for the basemap tiles.

## Basic Density Mapbox

```rust,no_run
{{#include ../../../../../examples/maps/src/main.rs:density_mapbox}}
```

{{#include ../../../../../examples/maps/output/inline_density_mapbox.html}}
48 changes: 48 additions & 0 deletions docs/book/src/recipes/maps/scatter_maps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Scatter Maps

Scatter map traces place markers or lines on geographic basemaps. Two trace types
are available:

- [`ScatterGeo`](https://docs.rs/plotly/latest/plotly/struct.ScatterGeo.html) —
drawn on the built-in `geo` subplot
([`LayoutGeo`](https://docs.rs/plotly/latest/plotly/layout/struct.LayoutGeo.html)).
- [`ScatterMapbox`](https://docs.rs/plotly/latest/plotly/struct.ScatterMapbox.html) —
drawn on a Mapbox-style basemap via
[`Mapbox`](https://docs.rs/plotly/latest/plotly/layout/struct.Mapbox.html).

The following imports are used in the examples below:

```rust,no_run
use plotly::{
common::{Line, Marker, Mode},
layout::{
Axis, Center, DragMode, GeoResolution, LayoutGeo, Mapbox, MapboxStyle, Projection,
Rotation,
},
color::Rgb,
Configuration, Layout, Plot, ScatterGeo, ScatterMapbox,
};
```

The `to_inline_html` method is used to produce the html plots displayed in this
page. The Mapbox example requires an internet connection for the basemap tiles.

## Scatter on a Mapbox basemap

```rust,no_run
{{#include ../../../../../examples/maps/src/main.rs:scatter_mapbox}}
```

{{#include ../../../../../examples/maps/output/inline_scatter_mapbox.html}}

## Lines on an orthographic geo subplot

The example below downloads contour data from the Plotly datasets repository. If
the fetch fails (for example during an offline build), the example is skipped with
a warning rather than panicking.

```rust,no_run
{{#include ../../../../../examples/maps/src/main.rs:scatter_geo}}
```

{{#include ../../../../../examples/maps/output/inline_scatter_geo.html}}
6 changes: 3 additions & 3 deletions docs/book/src/recipes/statistical_charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The complete source code for the following examples can also be found [here](htt

Kind | Link
:---|:----:
Error Bars |[![Scatter Plots](./img/error_bars.png)](./statistical_charts/error_bars.md)
Box Plots | [![Line Charts](./img/box_plot.png)](./statistical_charts/box_plots.md)
Error Bars | [![Error Bars](./img/error_bars.png)](./statistical_charts/error_bars.md)
Box Plots | [![Box Plots](./img/box_plot.png)](./statistical_charts/box_plots.md)
Violin Plots | [![Violin Plots](./img/violin_plot.png)](./statistical_charts/violin_plots.md)
Histograms | [![Scatter Plots](./img/overlaid_histogram.png)](./statistical_charts/histograms.md)
Histograms | [![Histograms](./img/overlaid_histogram.png)](./statistical_charts/histograms.md)
2D Histograms | [![2D Histograms](./img/basic_histogram2d.png)](./statistical_charts/histogram2d.md)
SPLOM | [![SPLOM](./img/splom.png)](./statistical_charts/splom.md)
Loading
Loading