DataProvider and DataSeries in a view class

Hi,

I have a class named LTPChart with getter, setter methods and ListDataProvider.
I have to call the data from LTPChart in the View class to create a chart on my home page. I am unable to do it.
please can anyone help

public class LTPChartInput { private String name; private int quantity; private double price; public LTPChartInput(String name, int quantity, double price) { this.name = name; this.quantity = quantity; this.price = price; } public String getName() { return name; } public int getQuantity() { return quantity; } public double getPrice() { return price; } public double getTotalPrice() { return price * quantity; } public ListDataProvider<LTPChartInput> getcontractsListDataProvider() { List<LTPChartInput> contractsList = new ArrayList<>(); contractsList.add(new LTPChartInput("ABC", 3, 7.99)); contractsList.add(new LTPChartInput("DEF", 1, 119.00)); contractsList.add(new LTPChartInput("GHI", 1, 19.95)); contractsList.add(new LTPChartInput("JKL", 20, 0.15)); contractsList.add(new LTPChartInput("MNO", 1, 25.00)); contractsList.add(new LTPChartInput("PQR", 1, 50.00)); DataProvider<LTPChartInput, ?> ds = new ListDataProvider<>(contractsList); DataProviderSeries<LTPChartInput> series = new DataProviderSeries<>(ds); return new ListDataProvider<>(contractsList); }