-
Notifications
You must be signed in to change notification settings - Fork 305
Description
Hello,
When creating an animated chart, does this simply mean recreating the chart every time new data comes in? The piston example seems to suggest that, but it doesn't seem supported anymore.
I'm working on creating a Iced backend with its canvas component. Drawing charts seems to work with the required DrawingBackend methods implemented. The optional methods shouldn't be a problem besides estimate_text_size and blit_bitmap.
estimate_text_size requires this issue to be implemented.
Does blit_bitmap help with anything besides the bitmap backend?
draw_text provides pos as the anchorpoint of the text, where is this located in relation to the text, the top left corner?
Would you be interested to add an Iced backend to the other supported backends?
My end goal is to create interactive charts where you can resize the shown data and get a "popup" showing the data the cursor hovers over. For the hovering think something like this.
In Iced, I think this could be achieved by comparing the cursor position to what's drawn on the canvas. For this to work I would need the position of the drawn elements of the chart. As a simple example, when drawing a histogram I would need to know where the bar's borders are located. For zooming with linecharts, I would probably need the border coordinates of the coordinate system, maybe the coordinates of the data points but those should be easy enough to calculate with the coordinate system borders. Is there any way to get this information or maybe to include optional Methods in the
DrawingBackend?
Thank you very much for your time and work.