charts icon indicating copy to clipboard operation
charts copied to clipboard

"No data to display" shown when both x and pointName is set

Open Artur- opened this issue 8 years ago • 2 comments

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

Artur- avatar Nov 30 '16 11:11 Artur-

hhmm . no progress ?

svenruppert avatar Feb 02 '18 14:02 svenruppert

Problem still existing.

ChristinaSi avatar Oct 04 '18 09:10 ChristinaSi