{"id":13753538,"url":"https://github.com/Joylei/plotters-iced","last_synced_at":"2025-05-09T21:35:06.041Z","repository":{"id":42210289,"uuid":"375019973","full_name":"Joylei/plotters-iced","owner":"Joylei","description":":chart_with_upwards_trend: Iced backend for Plotters","archived":false,"fork":false,"pushed_at":"2024-09-18T16:44:40.000Z","size":353,"stargazers_count":167,"open_issues_count":3,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T05:08:47.566Z","etag":null,"topics":["chart","gui","iced","plot","plotters","rust","visualization"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Joylei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-08T13:30:59.000Z","updated_at":"2025-04-06T03:43:20.000Z","dependencies_parsed_at":"2024-02-15T09:29:12.774Z","dependency_job_id":"3a7be05c-01b0-46d0-b953-9c5cbba1aa7a","html_url":"https://github.com/Joylei/plotters-iced","commit_stats":{"total_commits":126,"total_committers":10,"mean_commits":12.6,"dds":0.1428571428571429,"last_synced_commit":"222f08dc765e335445b6155c5f1e2a5c4a746a9b"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joylei%2Fplotters-iced","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joylei%2Fplotters-iced/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joylei%2Fplotters-iced/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Joylei%2Fplotters-iced/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Joylei","download_url":"https://codeload.github.com/Joylei/plotters-iced/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253328902,"owners_count":21891546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chart","gui","iced","plot","plotters","rust","visualization"],"created_at":"2024-08-03T09:01:24.167Z","updated_at":"2025-05-09T21:35:05.659Z","avatar_url":"https://github.com/Joylei.png","language":"Rust","funding_links":[],"categories":["Rust","Integrations"],"sub_categories":[],"readme":"# plotters-iced\n[![Test and Build](https://github.com/joylei/plotters-iced/workflows/Test%20and%20Build/badge.svg?branch=master)](https://github.com/joylei/plotters-iced/actions?query=workflow%3A%22Test+and+Build%22)\n[![Documentation](https://docs.rs/plotters-iced/badge.svg)](https://docs.rs/plotters-iced)\n[![Crates.io](https://img.shields.io/crates/v/plotters-iced.svg)](https://crates.io/crates/plotters-iced)\n[![License](https://img.shields.io/crates/l/plotters-iced.svg)](https://github.com/joylei/plotters-iced/blob/master/LICENSE)\n\nThis is an implementation of an Iced backend for Plotters, for both native and wasm applications.\n\nThis backend has been optimized as for speed. Note that some specific plotting features supported in the Bitmap backend may not be implemented there, though.\n\n## Showcase\n\n![CPU Monitor Example](./images/plotter_iced_demo.png)\n\n![WASM Example](./images/split-chart-web.png)\n\n## What is Plotters?\n\nPlotters is an extensible Rust drawing library that can be used to plot data on nice-looking graphs, rendering them through a plotting backend (eg. to a Bitmap image raw buffer, to your GUI backend, to an SVG file, etc.).\n\n**For more details on Plotters, please check the following links:**\n\n- For an introduction of Plotters, see: [Plotters on Crates.io](https://crates.io/crates/plotters);\n- Check the main repository on [GitHub](https://github.com/38/plotters);\n- You can also visit the Plotters [homepage](https://plotters-rs.github.io/);\n\n## How to install?\n\nInclude `plotters-iced` in your `Cargo.toml` dependencies:\n\n```toml\n[dependencies]\nplotters-iced = \"0.11\"\niced = { version = \"0.13\", features = [\"canvas\", \"tokio\"] }\nplotters=\"0.3\"\n```\n\n## How to use?\n\nFirst, import `Chart` and `ChartWidget`:\n\n```rust,ignore\nuse plotters_iced::{Chart, ChartWidget, DrawingBackend, ChartBuilder};\n```\n\nThen, derive `Chart` trait and build your chart, and let `plotters-iced` takes care the rest:\n\n```rust,ignore\nstruct MyChart;\nimpl Chart\u003cMessage\u003e for MyChart {\n    type State = ();\n    fn build_chart\u003cDB:DrawingBackend\u003e(\u0026self, state: \u0026Self::State, builder: ChartBuilder\u003cDB\u003e) {\n        //build your chart here, please refer to plotters for more details\n    }\n}\n```\n\nFinally, render your chart view:\n\n```rust,ignore\nimpl MyChart {\n    fn view(\u0026mut self)-\u003eElement\u003cMessage\u003e {\n        ChartWidget::new(self)\n            .width(Length::Fixed(200))\n            .height(Length::Fixed(200))\n            .into()\n    }\n}\n```\n\n_If you are looking for a full example of an implementation, please check [cpu-monitor.rs](./examples/cpu-monitor.rs)._\n\n## How to run the examples?\n\n### Example #1: `cpu-monitor`\n\nThis example samples your CPU load every second, and renders it in a real-time chart:\n\n```sh\ncargo run --release --example cpu-monitor\n```\n\nFrom this example, you'll learn:\n\n- how to build charts by `plotters-iced`\n- how to feed data to charts\n- how to make layouts of charts responsive\n- how to use fonts with charts\n\n### Example #2: `split-chart`\n\nThis example shows you how to split drawing area.\n\n- run the native version\n\n```sh\ncargo run --release --example split-chart\n```\n\n- run the web version\n\n```sh\ncd examples/split-chart\ntrunk serve\n```\n\n## Are there any limitations?\n\n### Limitation #1: No image rendering\n\nNo image rendering for native and wasm applications.\n\n### Limitation #2: Limited text rendering for native applications\n\nOnly TTF font family are supported for text rendering, which is a limitation of `Iced`, please look at  [cpu-monitor.rs](./examples/cpu-monitor.rs). As well, font transforms are not supported,which is also a limitation of `Iced`.\n\n## Credits\n\n- [plotters-conrod](https://github.com/valeriansaliou/plotters-conrod)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJoylei%2Fplotters-iced","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJoylei%2Fplotters-iced","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJoylei%2Fplotters-iced/lists"}