Add track cursor to `chart` object

Take a look at here.
I think cursor is a great thing that the lvgl chart object lacks it. So what do you think?

I agree; this would definitely be a great feature.

At the moment, there is no support for the concept of hovering within LittlevGL. Do you think it would work if these tooltips were shown when a point on the chart was clicked?

Yeah, we can define cursor as a property for the series so then when it is true, the cursor will be shown as a default in x = 0, and it will be snapped to the nearest touched point when we touch the chart.
The cursor can be:

  • horizontal, vertical or both of them.
  • solid line or dotted line.
  • we should be able to take the value of the x and y of the cursor, so then we can use it in a label like the below picture.
    image

It looks pretty simple to implement; I’ll see what I can do with it today.

I’m not sure that LittlevGL supports drawing dotted lines though.

1 Like

@embeddedt could you do anything for it? Can I help?

I didn’t get time to finish it, but I will continue working on it when I get a chance next.

I can’t promise an exact delivery date, though.

1 Like

@embeddedt, @Ali_Rostami
For such an important feature I suggest opening an issue on GitHub to discuss the details.
We can also reconsider the whole chart object because there were some requests related to:

  • support different series types on one chart
  • X/Y mode
  • maybe rework the existing chart types? Maybe some of them can be combined or dropped.