Skip to content

Commit

Permalink
migration to iced 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
GyulyVGC authored and Joylei committed Apr 13, 2023
1 parent 77ac1d0 commit 222f08d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
target/*
Cargo.lock
.cargo/*
examples/split-chart/dist/*
examples/split-chart/dist/*
.idea
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "plotters-iced"
version = "0.7.0"
version = "0.8.0"
description = "Iced backend for Plotters"
readme = "README.md"
license = "MIT"
Expand All @@ -19,8 +19,8 @@ members = [".", "examples/split-chart"]
[dependencies]
plotters = { version = "0.3", default_features = false }
plotters-backend = "0.3"
iced_native = "0.9"
iced_graphics = { version = "0.7", features = ["canvas"] }
iced_native = "0.10"
iced_graphics = { version = "0.8", features = ["canvas"] }

[dev-dependencies]
plotters = { version = "0.3", default_features = false, features = [
Expand All @@ -29,7 +29,7 @@ plotters = { version = "0.3", default_features = false, features = [
"line_series",
"point_series",
] }
iced = { version = "0.8", features = ["canvas", "tokio"] }
iced = { version = "0.9", features = ["canvas", "tokio"] }
chrono = { version = "0.4", default-features = false }
rand = "0.8"
tokio = { version = "1", features = ["rt"], default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Include `plotters-iced` in your `Cargo.toml` dependencies:

```toml
[dependencies]
plotters-iced = "0.6"
iced = { version = "0.7", features = ["canvas", "tokio"] }
plotters-iced = "0.8"
iced = { version = "0.9", features = ["canvas", "tokio"] }
plotters="0.3"
```

Expand Down
4 changes: 2 additions & 2 deletions src/sample/lttb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ where
let avg_range_length = (avg_range_end - avg_range_start) as f64;

for i in 0..(avg_range_end - avg_range_start) {
let idx = (avg_range_start + i) as usize;
let idx = avg_range_start + i;
let item = self.source.item_at(idx);
avg_x += item.x();
avg_y += item.y();
Expand All @@ -199,7 +199,7 @@ where
let mut max_area = -1f64;
let mut next_a = range_offs;
for i in 0..(range_to - range_offs) {
let idx = (range_offs + i) as usize;
let idx = range_offs + i;

// Calculate triangle area over three buckets.
let item = self.source.item_at(idx);
Expand Down

0 comments on commit 222f08d

Please sign in to comment.