This is a migrated thread and some comments may be shown as answers.

Real Time Data in RadChart

1 Answer 168 Views
Chart
This is a migrated thread and some comments may be shown as answers.
M_S_E
Top achievements
Rank 1
M_S_E asked on 30 Mar 2013, 07:30 PM
Hi,
sorry for poor english ;-)
I'm creating a data logging software that gets temperature,pressure,... from external hardware. An IObservableCollection is used  to store new data i want to visualize them in your amazing chart tool. the logging may take days and data points adds every second.
my problem is HorizontalAxis labels, I have already used another 3rd party component ( C1.WPF.Chart ). it has a property named : "IsTime" and when enabled and bound to a TimeSpan data label formatting changed as logging continued ( seconds,minutes,hours,...). Now I'm evaluating your control and pretty sure RadChart is capable of doing the same thing much better. would please tell me how?
mentioned component looks like this :
Axis AxisTemperatureVal = new Axis()
            {
                AxisType = AxisType.Y,
                Title = "Temperature [°C]",
                Name = "Temperature",
                IsDependent = false,
                Position = AxisPosition.Far,
                MajorGridStrokeThickness = 0,
                MinorTickThickness = 0,
                Min = 0,
};
MainPage.Chart.ChartType = C1.WPF.C1Chart.ChartType.Line;
MainPage.Chart.View.Axes.Add(AxisTemperatureVal);
MainPage.Chart.View.AxisY.Min = 0;
MainPage.Chart.View.AxisY.Max = 100;
MainPage.Chart.View.AxisX.Title = "Time";
MainPage.Chart.View.AxisX.IsTime = true;

thanks in advance

1 Answer, 1 is accepted

Sort by
0
Missing User
answered on 03 Apr 2013, 02:35 PM
Hi Mohammad,

RadChart supports DateTime values rather than TimeSpan. Using DateTime objects for X values is done in a similar way - by setting the IsDateTime property of the X axis to true as shown in this article from the RadChart section in RadControls' for WPF documentation.

Also, since you are new to our controls, I'd like to advise you to prefer RadChartView over RadChart wherever the situation permits it. RadChartView is the successor to RadChart and is built from the ground up to be faster and more flexible. You can read a comparison between the two here. RadChartView also supports DateTime binding in a different, but more appropriate way by using axes specifically designed for this purpose. The article which covers DateTime support in RadChartView is located here.

Regards,
Ivan N.
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
M_S_E
Top achievements
Rank 1
Answers by
Missing User
Share this question
or