plotly_fork/
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 askama;
6extern crate rand;
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::{box_plot, contour, histogram, image, mesh3d, sankey, scatter_mapbox, surface};
34// Bring the different trace types into the top-level scope
35pub use traces::{
36    Bar, BoxPlot, Candlestick, Contour, HeatMap, Histogram, Image, Mesh3D, Ohlc, Sankey, Scatter,
37    Scatter3D, ScatterMapbox, ScatterPolar, Surface, Table,
38};
39
40pub trait Restyle: serde::Serialize {}
41pub trait Relayout {}
42
43// Not public API.
44#[doc(hidden)]
45mod private;