plotly/
lib.rs

1//! # Plotly.rs
2//!
3//! A plotting library for Rust powered by [Plotly.js](https://plot.ly/javascript/).
4#![recursion_limit = "256"] // lets us use a large serde_json::json! macro for testing crate::layout::Axis
5extern crate rand;
6extern crate rinja;
7extern crate serde;
8
9#[cfg(all(feature = "kaleido", feature = "wasm"))]
10compile_error!(
11    r#"The "kaleido" and "wasm" features are mutually exclusive and cannot be activated at the same time. Please disable one or the other."#
12);
13
14#[cfg(feature = "plotly_ndarray")]
15pub mod ndarray;
16#[cfg(feature = "plotly_ndarray")]
17pub use crate::ndarray::ArrayTraces;
18
19#[cfg(feature = "wasm")]
20pub mod bindings;
21
22pub mod common;
23pub mod configuration;
24pub mod layout;
25pub mod plot;
26pub mod traces;
27
28pub use common::color;
29pub use configuration::Configuration;
30pub use layout::Layout;
31pub use plot::{ImageFormat, Plot, Trace};
32// Also provide easy access to modules which contain additional trace-specific types
33pub use traces::{
34    box_plot, contour, heat_map, histogram, image, mesh3d, sankey, scatter_mapbox, surface,
35};
36// Bring the different trace types into the top-level scope
37pub use traces::{
38    Bar, BoxPlot, Candlestick, Contour, DensityMapbox, HeatMap, Histogram, Image, Mesh3D, Ohlc,
39    Pie, Sankey, Scatter, Scatter3D, ScatterMapbox, ScatterPolar, Surface, Table,
40};
41
42pub trait Restyle: serde::Serialize {}
43pub trait Relayout {}
44
45// Not public API.
46#[doc(hidden)]
47mod private;