Hello,
When using the following code my data points don't get connected properly, as seen in picture attached.
The picture attached is from only one Series object.The data is a list of objects with properties amount (an int) and datetime which is a value like this xxh30 or xxh00.
When using the following code my data points don't get connected properly, as seen in picture attached.
The picture attached is from only one Series object.The data is a list of objects with properties amount (an int) and datetime which is a value like this xxh30 or xxh00.
DateTimeCategoricalAxis categoricalAxis =
new
DateTimeCategoricalAxis();
categoricalAxis.PlotMode = Telerik.Charting.AxisPlotMode.BetweenTicks;
categoricalAxis.DateTimeComponent = Telerik.Charting.DateTimeComponent.Hour;
categoricalAxis.LabelFormat =
"{0:HH:mm}"
;
foreach
(RadCheckedListDataItem item
in
radCheckedDropDownListDates.CheckedItems)
{
List<MonitoringToolDomain.FILESPROCESSED> queryChart =
new
List<MonitoringToolDomain.FILESPROCESSED>();
queryChart = MonitoringToolCore.FilesProcessed.QueryLineChart((DateTime?)item.DataBoundItem, fromHour, toHour);
queryChart.Select(c => { c.DATETIME = CreateDateFromTime(2015, 12, 12, c.DATETIME);
return
c; }).ToList();
LineSeries test =
new
LineSeries
{
DataSource = queryChart,
ValueMember =
"AMOUNT"
,
CategoryMember =
"DATETIME"
,
IsVisibleInLegend =
true
,
LegendTitle = item.DataBoundItem.ToString()
//CombineMode = Telerik.Charting.ChartSeriesCombineMode.None
};
test.HorizontalAxis = categoricalAxis;
radChartView.Series.Add(test);
}
radChartView.ShowLegend =
true
;
}
I have a second problem, not sure if I should post it here but I don't want to create too many new threads. I would like to compare charts from different days as in my second attached picture. If I create different line series, the charts appear sequentially because they don't have the same date. The solution I'm using at the moment is to change the DATETIME parameter in all of my objects to have the same date part. Is there any other way to do this ?
What I'm doing now :
queryChart.Select(c => { c.DATETIME = CreateDateFromTime(2015, 12, 12, c.DATETIME);
return
c; }).ToList();