All Projects → Joylei → plotters-iced

Joylei / plotters-iced

Licence: MIT license
📈 Iced backend for Plotters

Programming Languages

rust
11053 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to plotters-iced

Highcharts Chart
Polymer Element wrapper for highcharts library. Seamlessly create various types of charts from one element.
Stars: ✭ 97 (+223.33%)
Mutual labels:  chart, plot
Computator.net
Computator.NET is a special kind of numerical software that is fast and easy to use but not worse than others feature-wise. It's features include: - Real and complex functions charts - Real and complex calculator - Real functions numerical calculations including different methods - Over 107 Elementary functions - Over 141 Special functions - Over 21 Matrix functions and operations - Scripting language with power to easy computations including matrices - You can declare your own custom functions with scripting language
Stars: ✭ 174 (+480%)
Mutual labels:  chart, plot
Nim Plotly
plotting library for nim-lang
Stars: ✭ 121 (+303.33%)
Mutual labels:  chart, plot
Go Chartjs
golang library to make https://chartjs.org/ plots (this is vanilla #golang, not gopherjs)
Stars: ✭ 42 (+40%)
Mutual labels:  chart, plot
plotters backend iced app
example of plotters and iced canvas
Stars: ✭ 22 (-26.67%)
Mutual labels:  iced, plotters
Asciichart
Nice-looking lightweight console ASCII line charts ╭┈╯ for NodeJS, browsers and terminal, no dependencies
Stars: ✭ 1,107 (+3590%)
Mutual labels:  chart, plot
Aachartkit Swift
📈📊📱💻🖥️An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的跨平台数据可视化图表框架,支持柱状图、条形图、…
Stars: ✭ 1,962 (+6440%)
Mutual labels:  chart, plot
Aachartcore Kotlin
📈📊⛰⛰⛰An elegant modern declarative data visualization chart framework for Android . Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types.极其精美而又强大的 Android 数据可视化图表框架,支持柱状图、条形图、折线图、曲线图、折线填充图、曲线填充图、气泡图、扇形图、环形图、散点图、雷达图、混合图等各种类型的多达几十种的信息图图表,完全满足工作所需.
Stars: ✭ 332 (+1006.67%)
Mutual labels:  chart, plot
Swiftcharts
Easy to use and highly customizable charts library for iOS
Stars: ✭ 2,336 (+7686.67%)
Mutual labels:  chart, plot
Charts
⚡ Laravel Charts — Build charts using laravel. The laravel adapter for Chartisan.
Stars: ✭ 2,337 (+7690%)
Mutual labels:  chart, plot
Uplot
📈 A small, fast chart for time series, lines, areas, ohlc & bars
Stars: ✭ 6,808 (+22593.33%)
Mutual labels:  chart, plot
smag
Show Me A Graph - Command Line Graphing
Stars: ✭ 78 (+160%)
Mutual labels:  chart, plot
Ttyplot
a realtime plotting utility for terminal/console with data input from stdin
Stars: ✭ 532 (+1673.33%)
Mutual labels:  chart, plot
Highcharts trendline
HighCharts demo of scatter plot, including a trend line
Stars: ✭ 79 (+163.33%)
Mutual labels:  chart, plot
Plotly
Plotly for Rust
Stars: ✭ 433 (+1343.33%)
Mutual labels:  chart, plot
Asciigraph
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
Stars: ✭ 1,805 (+5916.67%)
Mutual labels:  chart, plot
asciichart-sharp
C# port of asciichart
Stars: ✭ 27 (-10%)
Mutual labels:  chart, plot
Plotlib
Data plotting library for Rust
Stars: ✭ 308 (+926.67%)
Mutual labels:  chart, plot
Plotjuggler
The Time Series Visualization Tool that you deserve.
Stars: ✭ 2,620 (+8633.33%)
Mutual labels:  chart, plot
chart4s
Draw a web chart by Scala
Stars: ✭ 36 (+20%)
Mutual labels:  chart, plot

plotters-iced

Test and Build Documentation Crates.io License

This is an implementation of an Iced backend for Plotters, for both native and wasm applications.

This backend has been optimized as for speed. Note that some specific plotting features supported in the Bitmap backend may not be implemented there, though.

Showcase

CPU Monitor Example

WASM Example

What is Plotters?

Plotters 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.).

For more details on Plotters, please check the following links:

How to install?

Include plotters-iced in your Cargo.toml dependencies:

[dependencies]
plotters-iced = "0.1"
iced = { version = "0.3", features = ["canvas", "tokio"] }
plotters="0.3"

How to use?

First, import Chart and ChartWidget:

use plotters_iced::{Chart, ChartWidget, DrawingBackend, ChartBuilder};

Then, derive Chart trait and build your chart, and let plotters-iced takes care the rest:

struct MyChart;
impl Chart<Message> for MyChart {
    fn build_chart<DB:DrawingBackend>(&self, builder: ChartBuilder<DB>) {
        //build your chart here, please refer to plotters for more details
    }
}

Finally, render your chart view:

impl MyChart {
    fn view(&mut self)->Element<Message> {
        ChartWidget::new(self)
            .width(Length::Unit(200))
            .height(Length::Unit(200))
            .into()
    }
}

If you are looking for a full example of an implementation, please check cpu-monitor.rs.

How to run the examples?

Example #1: cpu-monitor

This example samples your CPU load every second, and renders it in a real-time chart:

cargo run --release --example cpu-monitor

From this example, you'll learn:

  • how to build charts by plotters-iced
  • how to feed data to charts
  • how to make layouts of charts responsive
  • how to use fonts with charts

Example #2: split-chart

This example shows you how to split drawing area.

  • Run as native application
cargo run --release --example split-chart
  • Run as wasm application

First, install wasm-bindgen-cli v0.2.69 (iced requires this version)

cargo install -f wasm-bindgen-cli --version 0.2.69

Then build the code and generate wasm bindings

cargo build --example split-chart --target wasm32-unknown-unknown
wasm-bindgen ./target/wasm32-unknown-unknown/debug/examples/split-chart.wasm --out-dir ./examples/js --target web

Then, host the examples folder with a http server

cargo install https
http examples

visit http://localhost:8000/web-demo.html in your browser.

Are there any limitations?

Limitation #1: No image rendering

No image rendering for native and wasm applications.

Limitation #2: Limited text rendering for native applications

Only TTF font family are supported for text rendering, which is a limitation of Iced, please look at cpu-monitor.rs. As well, font transforms are not supported,which is also a limitation of Iced.

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].