Hi,
Im trying creating achive result with chart like on supply screen. ItemsSource is dynamic list, so im creating it imperative way in code
At screen which i applied each color is one task. It's grouped for each user. Real times of task, and planned times.
How can i achive result like on screen?
thanks in advance for help.
ps. I have problem with uploading screen files to this thread, so im attached in on outer server
http://imageshack.us/f/232/telerikchart.jpg/
Im trying creating achive result with chart like on supply screen. ItemsSource is dynamic list, so im creating it imperative way in code
private
void
BuildChart()
{
RadChart1.SeriesMappings.Clear();
SeriesMapping map
=
new
SeriesMapping();
var groupSett =
new
GroupingSettings() { StackGroupFieldName =
"TimeType"
};
groupSett.GroupDescriptors.Add(
new
ChartGroupDescriptor() { Member =
"TimeType"
});
map.GroupingSettings = groupSett;
map.SeriesDefinition =
new
HorizontalStackedBarSeriesDefinition() ;
ItemMapping imap
=
new
ItemMapping();
imap.DataPointMember = DataPointMember.XCategory;
imap.FieldName =
"UserName"
;
map.ItemMappings.Add(imap);
imap =
new
ItemMapping();
imap.DataPointMember = DataPointMember.YValue;
imap.FieldName =
"Time"
;
//RealTime
map.ItemMappings.Add(imap);
RadChart1.SeriesMappings.Add(map);
}
public
List<UserRecords> GetData()
{
foreach
(var item
in
e.Result)
{
UserRecord rec =
new
UserRecord();
rec.StandardTime
= item.RealTime.Ticks ;
rec.TimeType=
"RealTime"
;
rec.UserName=
item.UserName;
userrecs.Add(rec);
UserRecord rec2
=
new
UserRecord();
rec2.StandardTime
= item.StandardTime.Ticks ;
rec2.TimeType=
"StdTime"
;
rec2.UserName=
item.UserName;
userrecs.Add(rec2);
}
return
userrecs;
}
class
UserRecords
{
public
string
TimeType{
get
;
set
; }
public
string
UserName{
get
;
set
; }
public
double
Time {
get
;
set
; }
public
int
TaskNumber{
get
;
set
; }
}
//initializing
chart
RadChart1.ItemsSource =
GetData();
At screen which i applied each color is one task. It's grouped for each user. Real times of task, and planned times.
How can i achive result like on screen?
thanks in advance for help.
ps. I have problem with uploading screen files to this thread, so im attached in on outer server
http://imageshack.us/f/232/telerikchart.jpg/