Hello Great People of the Community Forum.
In our mobile app we've been using a number of various SF Xamarin.Forms components with great success. However, we've bumped into a critical problem using the SfChart in the following scenario: a bluetooth device (connected to a mobile android/ios device) is constantly (about every second) sending data points that have to be rendered in the chart.
Unfortunately, the chart refuses to render all the points. After the app has been launched and the data points start to flow into the chart, at best, the first 2 points will be rendered and then the chart stops updating the series (we use FastLineSeries). More often though, no points are rendered at all.
If we generate (random) data points after a test button is clicked on the app screen the chart renders them just fine. It also works when a random data point is generated at every timer tick.
The following combinations of getting the data points (from the bluetooth device) into the chart have been tried:
- Data points are sent immediately (after they have been received) into the chart.
- Every time a new point is received the entire series gets rebuilt (to include the new point) and re-attached to the chart.
- Upon receipt, the data points are first pushed into a stack and then are popped at a timer tick that runs every 3-5 seconds (tried different times).
As alternative, we've used OxyPlot and it worked just fine and w/o any tricks (the points are immediately rendered upon receipt). One key difference we observed between the SfChart and the OxyPlot is that the latter does not bind to the data - you have to refresh/re-render the chart every time a new point is added.
We could try a similar approach but the SfChart does not seem to have an option of rendering the data w/o binding.
We like the SfChart over OxyPlot but this problem is a showstopper and we cannot rely on SfChart in this case. If someone has a similar case and has found a workaround that could share with us it would be greatly appreciated.