Skip to content

Commit

Permalink
Fix: histogram data draw
Browse files Browse the repository at this point in the history
  • Loading branch information
mrxiaozhuox authored Dec 10, 2024
1 parent 3ad52da commit 57ae178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plotters/examples/histogram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
chart.draw_series(
Histogram::vertical(&chart)
.style(RED.mix(0.5).filled())
.data(data.iter().map(|x: &u32| (*x, 1))),
.data(data.iter().enumerate().map(|(x, &y)| (x, y))),

Check failure on line 31 in plotters/examples/histogram.rs

View workflow job for this annotation

GitHub Actions / build_and_test (ubuntu-latest)

the trait bound `SegmentValue<u32>: From<usize>` is not satisfied

Check failure on line 31 in plotters/examples/histogram.rs

View workflow job for this annotation

GitHub Actions / test_all_features

the trait bound `SegmentValue<u32>: From<usize>` is not satisfied

Check failure on line 31 in plotters/examples/histogram.rs

View workflow job for this annotation

GitHub Actions / run_all_examples

the trait bound `SegmentValue<u32>: From<usize>` is not satisfied
)?;

// To avoid the IO failure being ignored silently, we manually call the present function
Expand Down

0 comments on commit 57ae178

Please sign in to comment.