Open Huang-Libo opened 8 years ago
Displaying that black box in the middle - is possible by implementing a custom Marker. (In v3 this also becomes much more easier).
Interactive legends are not yet supported - but are a nice feature request.
@danielgindi If I can get each legend's container(UILabel?) , then I can add gesture to interact with legend.
It's not a label - it's dynamically rendered. But the sizes are available internally. There's a function that calculates the expected layout, and then the renderer uses it to render. Since it is now implemented this way for a few months already - it makes it much easier to make the legend interactive.
We've thought about using layers - but it over complicates stuff, as we might change the rendering engine from CoreGraphics to something else in the future. I'm considering SK or a subset of it.
I see. By the way, what is SK?
@danielgindi I used to use a scroll view to hold the legend, clickable and has synergy with the highlight. I think current legend still has the space issue.
i also highly need this feature for what i am working on. I looked at the code and as @danielgindi mentioned the legends are not distinct UILabels which you can attach recognizers. I don't mind spending time on adding this feature if this is not picked up by anyone else.
just thinking out loud here , is it possible to actually find out where user clicked using "(ChartViewBase *__nonnull)chartView" ?
I'm also interested in helping add this feature. @farshidce have you made any progress on this?
+1
+1
+1
I want to add similar feature . Any progress ?
Is there any progress on this feature?
Can Charts do the job below ?
1. Just like the picture below, by default three legends are selected and displayed on line chart, then user can tap at legend to highlight some legends and append new data at line chart.
2. If user tap at line chart to select a day (x value), it will display today's (x value's) associated title and value in the center of line chart.