Git Product home page Git Product logo

gust's Issues

Unable to render_graph

I tried to use gust with the following code:

extern crate gust;

use gust::backend::bar_chart::BarChart;
use gust::frontend::write::render_graph;
use gust::backend::general::FileType;

fn main() {
    println!("Hello, world!");

    let mut b = BarChart::new();

    let v = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"];
    for i in 0..10 {
        b.add_data(v[i].to_string(), (i * i * i) as i32);
    }
    render_graph(&b, FileType::HTML).unwrap();
}

But it seems to panic at this line:

.parse_file("./src/frontend/template.html")

Doesn't compile

I get several of these errors when I try to compile:

error[E0046]: not all trait items implemented, missing: `set_color`, `set_dimensions`, `get_dimensions`, `set_description`, `set_identifier`
   --> src/backend/stacked_bar_chart.rs:109:1
    |
109 | impl Graphable for StackedBarChart {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `set_color`, `set_dimensions`, `get_dimensions`, `set_description`, `set_identifier` in implementation
    | 
   ::: src/backend/traits.rs:16:5
    |
16  |     fn set_color(&mut self, &str);
    |     ------------------------------ `set_color` from trait
17  |     // set_dimensions
18  |     fn set_dimensions(&mut self, (i32, i32));
    |     ----------------------------------------- `set_dimensions` from trait
19  | 
20  |     fn get_dimensions(&self) -> (i32, i32);
    |     --------------------------------------- `get_dimensions` from trait
21  | 
22  |     fn set_description(&mut self, &str);
    |     ------------------------------------ `set_description` from trait
23  | 
24  |     fn set_identifier(&mut self, &str);
    |     ----------------------------------- `set_identifier` from trait

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.