How-to create a dynamic bar graph

Hi everyone,

First of all thanks for this very good library.
I’m thinking about implementing a dynamic bar graph.
I have no idea how to do it:
From a chart obj ?
Just create my objects and draw a children obj, which got a floating height, into the parent.
Is an animation possible on this kind of graph ?

Is that possible to create an obj with a negative height ?
For example:

lv_obj_set_size(toto, 50U, -50U);

which means, if i set the position of toto into the center of my screen it will create a bottom line at x=50 then he will draw above. Which can allow me to have an x fixed value for a bar graph and use body.grad_color in the other direction for example. I tried that code but it doesnt draw anything.



I guess a bar object will already do the most things that you want:
The backbround may be changed by a custom style object, but I’m also new to lvGL and cannot exactly tell what to do for this.

1 Like

I’m “very” new on littlevgl.

It works perfectly just style adjustment needed :slight_smile:
Thanks dude !