Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

[Vaadin Charts 2.1]

Jon Inazio Sánchez Martínez
6 years ago Sep 16, 2015 9:19am

I've started this week developing with vaadin charts 2.1. It's really straightforward to use its API and thanks to the documentation and examples, it doesn't take you too much to "paint" your first chart.
Here it's my first one:
Now, I'm interested in knowing better how to add data (personalization of charts comes next :p). I mean, now what I'm doing is adding several ListSeries, containing a title and the series itselves, e.g. :

Integer d1 = {0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
conf.addSeries(new ListSeries(operador.getNombre(), d1));

The data added to the series is somehow the number of elements per day. These numbers represents faults in buses. The question comes here: could I add, instead of the total sum of faults per day, buses' id?

Let me explain a bit. Within d1 and on 5th September 2015, red coloured stack has 4 faults, which means that 4 buses had a fault (there are several types of faults, but I won't be explaining them here right now). I'd like to, instead of adding the 4 itself, add the buses:

Integer d1 = {...,{6555, 7665, 7665, 1927},...};

Which means that buses with ids 6555, 7665, 7665 and 1927 had some fault.

Is there any way to accomplish it?

Thanks for your helpful comments!!

Thomas Mattsson
6 years ago Sep 17, 2015 7:58am
Jon Inazio Sánchez Martínez
6 years ago Sep 17, 2015 8:10am