1[package]
2name = "plotters"
3version = "0.3.0"
4authors = ["Hao Hou <haohou302@gmail.com>"]
5edition = "2018"
6license = "MIT"
7description = "A Rust drawing library focus on data plotting for both WASM and native applications"
8repository = "https://github.com/38/plotters"
9homepage = "https://plotters-rs.github.io/"
10keywords = ["WebAssembly", "Visualization", "Plotting", "Drawing"]
11categories = ["visualization", "wasm"]
12readme = "README.md"
13exclude = ["doc-template/*"]
14
15[dependencies]
16num-traits = "0.2.11"
17chrono = { version = "0.4.11", optional = true }
18plotters-backend = "^0.3.*"
19plotters-svg = {version = "^0.3.*", optional = true}
20
21[dependencies.plotters-bitmap]
22version = "^0.3.*"
23optional = true
24default_features = false
25
26[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
27rusttype = { version = "0.8.2", optional = true }
28lazy_static = { version = "1.4.0", optional = true }
29font-kit = { version = "0.7.0", optional = true }
30
31[target.'cfg(not(target_arch = "wasm32"))'.dependencies.image]
32version = "0.23.4"
33optional = true
34default-features = false
35features = ["jpeg", "png", "bmp"]
36
37[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
38version = "0.2.62"
39
40[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
41version = "0.3.39"
42features = [
43         "Document",
44         "DomRect",
45         "Element",
46         "HtmlElement",
47         "Node",
48         "Window",
49         "HtmlCanvasElement",
50         "CanvasRenderingContext2d",
51]
52
53[features]
54default = [
55        "bitmap_backend", "bitmap_encoder", "bitmap_gif",
56        "svg_backend",
57        "chrono",
58        "ttf",
59        "image",
60        "deprecated_items",  "all_series", "all_elements"
61]
62all_series = ["area_series", "line_series", "point_series", "surface_series"]
63all_elements = ["errorbar", "candlestick", "boxplot", "histogram"]
64
65# Tier 1 Backends
66bitmap_backend = ["plotters-bitmap", "ttf"]
67bitmap_encoder = ["plotters-bitmap/image_encoder"]
68bitmap_gif = ["plotters-bitmap/gif_backend"]
69svg_backend = ["plotters-svg"]
70
71# Elements
72errorbar = []
73candlestick = []
74boxplot = []
75
76# Series
77histogram = []
78area_series = []
79line_series = []
80point_series = []
81surface_series = []
82
83# Font implemnetation
84ttf = ["font-kit", "rusttype", "lazy_static"]
85
86# Misc
87datetime = ["chrono"]
88evcxr = ["svg_backend"]
89deprecated_items = [] # Keep some of the deprecated items for backward compatibility
90
91[dev-dependencies]
92rand = "0.7.3"
93itertools = "0.9.0"
94rand_distr = "0.2.2"
95criterion = "0.3.2"
96rayon = "1.3.0"
97rand_xorshift = "0.2.0"
98plotters-bitmap = "^0.3.*"
99
100[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
101wasm-bindgen-test = "0.3.12"
102
103[[bench]]
104name = "benchmark"
105harness = false
106path = "benches/main.rs"
107