charts
charts copied to clipboard
"No data to display" shown when both x and pointName is set
List<Order> orders = new ArrayList<>(); // Order from the docs
orders.add(new Order("Domain Name", 3, 7.99));
orders.add(new Order("SSL Certificate", 1, 119.00));
orders.add(new Order("Web Hosting", 1, 19.95));
orders.add(new Order("Email Box", 20, 0.15));
orders.add(new Order("E-Commerce Setup", 1, 25.00));
orders.add(new Order("Technical Support", 1, 50.00));
Chart chart = new Chart();
Configuration configuration = chart.getConfiguration();
DataProvider<Order> dataProvider = new ListDataProvider<>(orders);
DataProviderSeries<Order> series = new DataProviderSeries<>(dataProvider);
series.setY(Order::getTotalPrice);
series.setX(Order::getDescription);
series.setPointName(order -> "static point name");
The end result is a chart displaying "no data to display" , which is wrong as data has been set and will be displayed if either setPointName
or setX
is removed.
There is also no indication whatsoever about what went wrong or what can/should be done to fix the problem
hhmm . no progress ?
Problem still existing.