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