BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
Hi,
I would like to render the annotation's position.
Is it possible to wrap only the CartesianChartAnnotation with stream builder/ Storeconnector(Flutter redux/ bloc builder (Bloc) ?
Thanks.
Hi Bar,
We suspect that you have tried to update the annotation with the help of StreamBuilder, for this you can set the StreamBuilder to the widget property in CartesianChartAnnotation and then get the value from stream and return the value to the Text widget. We have shared the sample below for your reference.
If this is not your query then please share more details regarding your requirement along with the screenshot or screen recordings this will be more helpful to us to assist you in a better way.
Regards,
Yuvaraj.
Thanks for your response,
I need to set position also from the stream builder how can i do it?
Hi Bar,
For updating the annotation position from the StreamBuilder value, you need to wrap the whole chart into the StreamBuilder and give the position to the annotation directly. Otherwise, you can't be able to update the annotation position or wrap the CartesianChartAnnotation inside the StreamBuilder are not a possible way to achieve your requirement.
If you have any further queries please get back to us.
Regards,
Yuvaraj.
The problem is that i don't want to rebuild all the chart
Hi Bar,
We are validating your query at our end and we will update further details tomorrow. We appreciate your patience until then.
Regards,
Yuvaraj.
Hi Bar,
We have prepared the sample to update a custom annotation with the value get from the stream builder by wrapping the chart and custom annotation widget inside the chart. Then use the pointToPixel method and get the pixel position and positioned the customer annotation with the help of Positioned widget. We have prepared the sample and shared it below for your reference.
UG, https://help.syncfusion.com/flutter/cartesian-charts/methods#pointtopixel
Regards,
Yuvaraj.