Giter VIP home page Giter VIP logo

Comments (4)

lcallarec avatar lcallarec commented on July 21, 2024

I could give access to series private chart array list, but it may lead to inconsistencies / bugs if you manually add or remove series.

To match your use case, I could add an chart.add_value method which take the serie_number instead of the Series :

public void add_value_by_index(int serie_index, double value) {
    add_value(series[serie_index], value);
}

Another option would be to have access to some kind of read-only array list ;

    public void update (int serie_number, double value) {
        Gee.List<Serie> series = chart.get_ro_series();
        chart.add_value (series.get(serie_number, value);
    }

IMHO, the both options match your use case. The first is straight forward, the second is more versatile (hence, it could resolves more use cases) but requires a bit more code on your side.

What do you think ?

from live-chart.

stsdc avatar stsdc commented on July 21, 2024

I created serie_list = new Gee.ArrayList<LiveChart.Serie> (); and it works, but, well, now I have two lists with same content 😅
chart.add_value_by_index would be cool

from live-chart.

lcallarec avatar lcallarec commented on July 21, 2024

https://github.com/lcallarec/live-chart/releases/tag/1.5.1

Please let me know when it works on your side.

Thanks !

from live-chart.

stsdc avatar stsdc commented on July 21, 2024

works really nice

thank You!

from live-chart.

Related Issues (20)

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.