in my Dolphin Platform project, the XYChart.Series Object, which contains a series of XYChart.Data, does not seem to synchronize its datamodel.
My viewbinder binds the data of the BarChart with the PM and sets it to the BarChartObjekt
public class GesamtErgebnisViewBinder extends AbstractViewBinder<GesamtErgebnisModel> {
@Override
protected void init() {
....
ObservableList<XYChart.Series<String, Integer>> data = FXWrapper.wrapList(getModel().getData())
barChart.setData(data);
}
}
The model consists of an observable list of BarChart Data
@DolphinBean
public class GesamtErgebnisModel {
....
private ObservableList<XYChart.Series<String, Integer>> data;
....
}
On the serverside I am computing the BarChart data to pass it to my model object.
@DolphinController("GesamtErgebnisController")
public class GesamtErgebnisController {
@Inject
private BeanManager beanManager;
@DolphinModel
private GesamtErgebnisModel model;
...
taskExecutor.execute(GesamtErgebnisController.class, e -> {
final Series<String, Integer> series = beanManager.create(XYChart.Series.class);
rawFilterData.entrySet().stream().map((mitgliedToFilterResultEntry) -> {
final XYChart.Data<String, Integer> datas = beanManager.create(XYChart.Data.class);
....
}).forEach((datas) -> {
series.getData().add(datas);
});
model.getData().add(series);
});
But the bar chart just stays empty. Just the category is visible. Because I thought maybe my data that I put together is flawed, I altered an example from the Oracle website and tested the data manually. On server side, this doesn´t work either.. same output. If I put this code on clientside inside the init method of my viewbinder, the data shows correctly. So there should be nothing wrong with the data being passed. Observerable lists with String i.e work just fine. Maybe I am missing something else?