1#![allow(clippy::needless_doctest_main)]
9
10#[cfg(all(feature = "plotly", feature = "plotters"))]
13compile_error!(
14 "Only one plotlars backend can be enabled at a time. \
15 Choose either features = [\"plotly\"] or features = [\"plotters\"]."
16);
17
18#[cfg(not(any(feature = "plotly", feature = "plotters")))]
19compile_error!(
20 "A plotlars backend must be enabled. \
21 Add features = [\"plotly\"] or features = [\"plotters\"] to your Cargo.toml."
22);
23
24pub use plotlars_core::policy::{set_unsupported_option_policy, UnsupportedOptionPolicy};
27pub use plotlars_core::Plot as PlotData;
28
29pub use plotlars_core::io::{CsvReader, ParquetReader, PlotlarsError};
31
32#[cfg(feature = "format-json")]
33pub use plotlars_core::io::JsonReader;
34
35#[cfg(feature = "format-excel")]
36pub use plotlars_core::io::ExcelReader;
37
38pub mod polars {
47 pub use polars::prelude;
48}
49
50pub use plotlars_core::components::arrangement::Arrangement;
52pub use plotlars_core::components::axis::{Axis, AxisSide, AxisType};
53pub use plotlars_core::components::bar_mode::BarMode;
54pub use plotlars_core::components::cell::Cell;
55pub use plotlars_core::components::color::Rgb;
56pub use plotlars_core::components::colorbar::ColorBar;
57pub use plotlars_core::components::coloring::Coloring;
58pub use plotlars_core::components::dimensions::Dimensions;
59pub use plotlars_core::components::direction::Direction;
60pub use plotlars_core::components::exponent::ValueExponent;
61pub use plotlars_core::components::facet::{FacetConfig, FacetScales};
62pub use plotlars_core::components::fill::Fill;
63pub use plotlars_core::components::header::Header;
64pub use plotlars_core::components::intensity::IntensityMode;
65pub use plotlars_core::components::legend::Legend;
66pub use plotlars_core::components::lighting::Lighting;
67pub use plotlars_core::components::line::Line;
68pub use plotlars_core::components::mode::Mode;
69pub use plotlars_core::components::orientation::Orientation;
70pub use plotlars_core::components::palette::Palette;
71pub use plotlars_core::components::shape::Shape;
72pub use plotlars_core::components::text::Text;
73pub use plotlars_core::components::tick::TickDirection;
74
75#[cfg(feature = "plotly")]
78pub use plotlars_plotly::PlotlyExt as Plot;
79
80#[cfg(feature = "plotly")]
81pub use plotlars_plotly::SubplotGrid;
82
83#[cfg(feature = "plotly")]
84pub use plotlars_core::plots::array2dplot::Array2dPlot;
85#[cfg(feature = "plotly")]
86pub use plotlars_core::plots::barplot::BarPlot;
87#[cfg(feature = "plotly")]
88pub use plotlars_core::plots::boxplot::BoxPlot;
89#[cfg(feature = "plotly")]
90pub use plotlars_core::plots::candlestick::CandlestickPlot;
91#[cfg(feature = "plotly")]
92pub use plotlars_core::plots::contourplot::ContourPlot;
93#[cfg(feature = "plotly")]
94pub use plotlars_core::plots::density_mapbox::DensityMapbox;
95#[cfg(feature = "plotly")]
96pub use plotlars_core::plots::heatmap::HeatMap;
97#[cfg(feature = "plotly")]
98pub use plotlars_core::plots::histogram::Histogram;
99#[cfg(feature = "plotly")]
100pub use plotlars_core::plots::image::Image;
101#[cfg(feature = "plotly")]
102pub use plotlars_core::plots::lineplot::LinePlot;
103#[cfg(feature = "plotly")]
104pub use plotlars_core::plots::mesh3d::Mesh3D;
105#[cfg(feature = "plotly")]
106pub use plotlars_core::plots::ohlc::OhlcPlot;
107#[cfg(feature = "plotly")]
108pub use plotlars_core::plots::piechart::PieChart;
109#[cfg(feature = "plotly")]
110pub use plotlars_core::plots::sankeydiagram::SankeyDiagram;
111#[cfg(feature = "plotly")]
112pub use plotlars_core::plots::scatter3dplot::Scatter3dPlot;
113#[cfg(feature = "plotly")]
114pub use plotlars_core::plots::scattergeo::ScatterGeo;
115#[cfg(feature = "plotly")]
116pub use plotlars_core::plots::scattermap::ScatterMap;
117#[cfg(feature = "plotly")]
118pub use plotlars_core::plots::scatterplot::ScatterPlot;
119#[cfg(feature = "plotly")]
120pub use plotlars_core::plots::scatterpolar::ScatterPolar;
121#[cfg(feature = "plotly")]
122pub use plotlars_core::plots::surfaceplot::SurfacePlot;
123#[cfg(feature = "plotly")]
124pub use plotlars_core::plots::table::Table;
125#[cfg(feature = "plotly")]
126pub use plotlars_core::plots::timeseriesplot::TimeSeriesPlot;
127
128#[cfg(feature = "plotters")]
131pub use plotlars_plotters::PlottersExt as Plot;
132
133#[cfg(feature = "plotters")]
134pub use plotlars_core::plots::barplot::BarPlot;
135#[cfg(feature = "plotters")]
136pub use plotlars_core::plots::boxplot::BoxPlot;
137#[cfg(feature = "plotters")]
138pub use plotlars_core::plots::candlestick::CandlestickPlot;
139#[cfg(feature = "plotters")]
140pub use plotlars_core::plots::heatmap::HeatMap;
141#[cfg(feature = "plotters")]
142pub use plotlars_core::plots::histogram::Histogram;
143#[cfg(feature = "plotters")]
144pub use plotlars_core::plots::lineplot::LinePlot;
145#[cfg(feature = "plotters")]
146pub use plotlars_core::plots::scatterplot::ScatterPlot;
147#[cfg(feature = "plotters")]
148pub use plotlars_core::plots::timeseriesplot::TimeSeriesPlot;