1[package]
2name = "plotters"
3version = "0.3.7"
4authors = ["Hao Hou <haohou302@gmail.com>"]
5edition = "2018"
6license = "MIT"
7msrv = "1.56"
8description = "A Rust drawing library focus on data plotting for both WASM and native applications"
9repository = "https://github.com/plotters-rs/plotters"
10homepage = "https://plotters-rs.github.io/"
11keywords = ["WebAssembly", "Visualization", "Plotting", "Drawing"]
12categories = ["visualization", "wasm"]
13readme = "../README.md"
14exclude = ["doc-template", "plotters-doc-data"]
15
16[lints.rust]
17unexpected_cfgs = { level = "warn", check-cfg = ['cfg(doc_cfg)'] }
18deprecated = { level = "allow" }
19
20[dependencies]
21num-traits = "0.2.14"
22chrono = { version = "0.4.32", optional = true }
23
24[dependencies.plotters-backend]
25version = "0.3.6"
26path = "../plotters-backend"
27
28[dependencies.plotters-bitmap]
29version = "0.3.6"
30default-features = false
31optional = true
32path = "../plotters-bitmap"
33
34[dependencies.plotters-svg]
35version = "0.3.6"
36optional = true
37path = "../plotters-svg"
38
39[target.'cfg(not(all(target_arch = "wasm32", not(target_os = "wasi"))))'.dependencies]
40ttf-parser = { version = "0.20.0", optional = true }
41lazy_static = { version = "1.4.0", optional = true }
42pathfinder_geometry = { version = "0.5.1", optional = true }
43font-kit = { version = "0.14.2", optional = true }
44ab_glyph = { version = "0.2.12", optional = true }
45once_cell = { version = "1.8.0", optional = true }
46
47
48[target.'cfg(not(all(target_arch = "wasm32", not(target_os = "wasi"))))'.dependencies.image]
49version = "0.24.3"
50optional = true
51default-features = false
52features = ["jpeg", "png", "bmp"]
53
54[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies.wasm-bindgen]
55version = "0.2.89"
56
57[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies.web-sys]
58version = "0.3.66"
59features = [
60 "Document",
61 "DomRect",
62 "Element",
63 "HtmlElement",
64 "Node",
65 "Window",
66 "HtmlCanvasElement",
67 "CanvasRenderingContext2d",
68]
69
70[features]
71default = [
72 "bitmap_backend", "bitmap_encoder", "bitmap_gif",
73 "svg_backend",
74 "chrono",
75 "ttf",
76 "image",
77 "deprecated_items", "all_series", "all_elements",
78 "full_palette",
79 "colormaps"
80]
81all_series = ["area_series", "line_series", "point_series", "surface_series"]
82all_elements = ["errorbar", "candlestick", "boxplot", "histogram"]
83
84# Tier 1 Backends
85bitmap_backend = ["plotters-bitmap"]
86bitmap_encoder = ["plotters-bitmap/image_encoder"]
87bitmap_gif = ["plotters-bitmap/gif_backend"]
88svg_backend = ["plotters-svg"]
89
90# Colors
91full_palette = []
92colormaps = []
93
94# Elements
95errorbar = []
96candlestick = []
97boxplot = []
98
99# Series
100histogram = []
101area_series = []
102line_series = []
103point_series = []
104surface_series = []
105
106# Font implementation
107ttf = ["font-kit", "ttf-parser", "lazy_static", "pathfinder_geometry"]
108# dlopen fontconfig C library at runtime instead of linking at build time
109# Can be useful for cross compiling, especially considering fontconfig has lots of C dependencies
110fontconfig-dlopen = ["font-kit/source-fontconfig-dlopen"]
111
112ab_glyph = ["dep:ab_glyph", "once_cell"]
113
114# Misc
115datetime = ["chrono"]
116evcxr = ["svg_backend"]
117evcxr_bitmap = ["evcxr", "bitmap_backend", "plotters-svg/bitmap_encoder"]
118deprecated_items = [] # Keep some of the deprecated items for backward compatibility
119
120[dev-dependencies]
121itertools = "0.10.0"
122criterion = "0.5.1"
123rayon = "1.5.1"
124serde_json = "1.0.82"
125serde = "1.0.139"
126serde_derive = "1.0.140"
127
128[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
129rand = "0.8.3"
130rand_distr = "0.4.0"
131rand_xorshift = "0.3.0"
132
133[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dev-dependencies]
134wasm-bindgen-test = "0.3.39"
135
136[[bench]]
137name = "benchmark"
138harness = false
139path = "benches/main.rs"
140
141[package.metadata.docs.rs]
142all-features = true
143rustdoc-args = ["--cfg", "doc_cfg"]
144
145