Summary
setting data asynchronous, PieChart does not render on first view (iOS only).
By turning the screen off an on, it gets shown.
Example
const set = new PieDataSet([{
label: 'foo',
value: 1
}, {
label: 'bar',
value: 1.5
}], 'Test', 'value');
set.setColors(['green', 'red']);
// this works fine
chart.setData(new PieData([set]));
// this not
setTimeout(() => {
chart.setData(new PieData([set]));
chart.redraw(); // this line soves the problem
});
Device (please complete the following information):
Device: iPhone 6
iOS Version 14.4.2
Library Version
Additional Context
I don't know if this bug is related to this library or from some other part (@nativescript-community/ui-canvas or the core library)
On Android and any other chart type it works very well
@wendt88 that s normal. Out of better performance you are responsible for callingredraw. Was working without the timeout because you set before a render triggered by the system.
Summary setting data asynchronous,
PieChart
does not render on first view (iOS only). By turning the screen off an on, it gets shown.Example
Device (please complete the following information):
Additional Context I don't know if this bug is related to this library or from some other part (
@nativescript-community/ui-canvas
or the core library) On Android and any other chart type it works very well