This question is locked. New answers and comments are not allowed.
Hello.
I'm brand new to telerik and have spent the last couple of days combing examples. I understand the basic ones ie the Line Chart example with an object holding MonthResults.
I've looked but cannot find an example where the object is slightly more complex. My question is How do I draw a Line chart from an object that contains data and looks like what is pasted below
My intention is to have the Date on the X axis and two lines where one shows total Incoming Funds and the other TotalSpent. Note that I dont actually need to use the data in the object within having childItems (details of the transactions). However if it is possible to also use this data I'd be glad to know how as well.
(I have tried creating a chart but get stuck when creating a DataPointBinding to the LineSeries. The problem is that my arraylist requires provision of an index before accessing the item. ie myObject.get(index).getDate() ------where Date is to be used as the Line Series DataPointBinding.
//------------------------------------- ArrayList Object --------------------------------------------------
public class dailylog_Trans_ExpListGroupDay {
public static Comparator<dailylog_Trans_ExpListGroupDay> SORT_BY_DATE = new Comparator<dailylog_Trans_ExpListGroupDay>() {
public int compare(dailylog_Trans_ExpListGroupDay one, dailylog_Trans_ExpListGroupDay other) {
return one.getDate().compareTo(other.getDate());
}
};
private String Date;
private ArrayList<dailylog_Trans_ExpListChildDay> Items;
private double TotalSpent = 0;
private double TotalIncoming = 0;
public String getDate() {
return Date;
}
public void setDate(String date) {
Date = date;
}
public ArrayList<dailylog_Trans_ExpListChildDay> getItems() {
return Items;
}
public void setItems(ArrayList<dailylog_Trans_ExpListChildDay> items) {
Items = items;
}
public double getTotalSpent() {
return TotalSpent;
}
public void setTotalSpent(double totalSpent) {
TotalSpent = totalSpent;
}
public double getTotalIncoming() {
return TotalIncoming;
}
public void setTotalIncoming(double totalIncoming) {
TotalIncoming = totalIncoming;
}
}
I'm brand new to telerik and have spent the last couple of days combing examples. I understand the basic ones ie the Line Chart example with an object holding MonthResults.
I've looked but cannot find an example where the object is slightly more complex. My question is How do I draw a Line chart from an object that contains data and looks like what is pasted below
My intention is to have the Date on the X axis and two lines where one shows total Incoming Funds and the other TotalSpent. Note that I dont actually need to use the data in the object within having childItems (details of the transactions). However if it is possible to also use this data I'd be glad to know how as well.
(I have tried creating a chart but get stuck when creating a DataPointBinding to the LineSeries. The problem is that my arraylist requires provision of an index before accessing the item. ie myObject.get(index).getDate() ------where Date is to be used as the Line Series DataPointBinding.
//------------------------------------- ArrayList Object --------------------------------------------------
public class dailylog_Trans_ExpListGroupDay {
public static Comparator<dailylog_Trans_ExpListGroupDay> SORT_BY_DATE = new Comparator<dailylog_Trans_ExpListGroupDay>() {
public int compare(dailylog_Trans_ExpListGroupDay one, dailylog_Trans_ExpListGroupDay other) {
return one.getDate().compareTo(other.getDate());
}
};
private String Date;
private ArrayList<dailylog_Trans_ExpListChildDay> Items;
private double TotalSpent = 0;
private double TotalIncoming = 0;
public String getDate() {
return Date;
}
public void setDate(String date) {
Date = date;
}
public ArrayList<dailylog_Trans_ExpListChildDay> getItems() {
return Items;
}
public void setItems(ArrayList<dailylog_Trans_ExpListChildDay> items) {
Items = items;
}
public double getTotalSpent() {
return TotalSpent;
}
public void setTotalSpent(double totalSpent) {
TotalSpent = totalSpent;
}
public double getTotalIncoming() {
return TotalIncoming;
}
public void setTotalIncoming(double totalIncoming) {
TotalIncoming = totalIncoming;
}
}