()
| 260 | |
| 261 | #[test] |
| 262 | fn test_histogram_to_json() { |
| 263 | let df = df!["x" => [1.0, 2.0, 2.0, 3.0, 3.0, 3.0]].unwrap(); |
| 264 | let plot = Histogram::builder().data(&df).x("x").build(); |
| 265 | let json = to_json_value(&plot); |
| 266 | assert_eq!(json["traces"].as_array().unwrap().len(), 1); |
| 267 | assert_eq!(json["traces"][0]["type"], "histogram"); |
| 268 | } |
| 269 | |
| 270 | #[test] |
| 271 | fn test_line_to_json() { |
nothing calls this directly
no test coverage detected