
Ryan Overton
Top achievements
Rank 2
Ryan Overton
asked on 07 Dec 2009, 11:53 PM
I have been able to add a chart to my report and bind the data to the chart. I have even gotten the X-axis to display in time, but I have 2 design requirements which I cannot figure out.
- 1. How do I provide a custom step when I am using the time value format? If I use autoscale, it does provide some stepping, but it puts a buffer before the beginning of the first time and another buffer at the end. If I change autoscale to false, I cannot enter a label step large enough to display as many as I want.
- 2. How can I display both date and time as the label on each step of the X-axis? I can do date or time, but have not found a way to do date and time together. The chart could span 1 - 3 days.
Can anyone help me resolve either of these issues?
- 1. How do I provide a custom step when I am using the time value format? If I use autoscale, it does provide some stepping, but it puts a buffer before the beginning of the first time and another buffer at the end. If I change autoscale to false, I cannot enter a label step large enough to display as many as I want.
- 2. How can I display both date and time as the label on each step of the X-axis? I can do date or time, but have not found a way to do date and time together. The chart could span 1 - 3 days.
Can anyone help me resolve either of these issues?
5 Answers, 1 is accepted
0
Accepted
Hi Ryan,
With AutoScale set to false, you would need to manually configure the MinValue, MaxValue and Step properties. So, you can leave LabelStep property with its default value of 1 - the Step property will guarantee that you will see only certain labels. Note, that in the OLEAutomation date format (double) a value of 1 corresponds to 1 day (ex. a step of 3 hours would be 3d/24 or .125).
Displaying date and time simultaneously -- set XAxis.Appearance.ValueFormat to one of the DateTime-related members (ex. ChartValueFormat.ShortDate) and then set XAxis.Appearance.CustomFormat property with any valid standard or custom DateTime format string.
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
With AutoScale set to false, you would need to manually configure the MinValue, MaxValue and Step properties. So, you can leave LabelStep property with its default value of 1 - the Step property will guarantee that you will see only certain labels. Note, that in the OLEAutomation date format (double) a value of 1 corresponds to 1 day (ex. a step of 3 hours would be 3d/24 or .125).
Displaying date and time simultaneously -- set XAxis.Appearance.ValueFormat to one of the DateTime-related members (ex. ChartValueFormat.ShortDate) and then set XAxis.Appearance.CustomFormat property with any valid standard or custom DateTime format string.
Kind regards,
Ves
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0

Yanli
Top achievements
Rank 1
answered on 11 Sep 2013, 03:16 PM
I need to set the X-Axis steps dynamically based on how many data points in the series. I'm using Graph since Chart is depreciated. Now with Graph, how can I access AutoScale, MinValue, MaxValue and Steps? it doesn't has the property PlotArea.
Thanks!
Thanks!
0
Hi Yanli,
You can access the properties of an Axis by selecting the Axis as shown here. You can also set these properties programmatically:
For a more thorough and complete example on how to create a graph and add series and other elements programmatically, please follow the How to: Create Chart Programmatically help article.
Regards,
Peter
Telerik
You can access the properties of an Axis by selecting the Axis as shown here. You can also set these properties programmatically:
var graph1 =
new
Telerik.Reporting.Graph();
...
var cartesianCoordinateSystem =
new
Telerik.Reporting.CartesianCoordinateSystem();
...
var scale =
new
Telerik.Reporting.DateTimeScale();
//set needed properties
scale.MajorStep = 1;
scale.Minimum = 1;
...
var graphAxisNumericScale =
new
Telerik.Reporting.GraphAxis();
graphAxisNumericScale.Scale = scale;
...
cartesianCoordinateSystem.XAxis = graphAxisNumericScale;
...
graph1.CoordinateSystems.Add(cartesianCoordinateSystem);
Regards,
Peter
Telerik
Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.
0

Kedar
Top achievements
Rank 1
answered on 09 Apr 2015, 11:42 AM
Hi,
I am using telerik RadCartesianChart and I would want to set the step along horizontal axis,I am unable to find any property associated with the chart to set to.
Also I am unable to put colors to series(line series, I have as many as 5 line series in a chart). Could some one help me with this?
Thanks
Kedar
0
Hello Kedar,
Telerik Reporting uses Telerik.Reporting.Graph to create and render charts in the reports. For more information on the Graph item and how to use it, please refer to the Graph help articles in the Reporting online documentation.
Regards,
Nasko
Telerik
Telerik Reporting uses Telerik.Reporting.Graph to create and render charts in the reports. For more information on the Graph item and how to use it, please refer to the Graph help articles in the Reporting online documentation.
Regards,
Nasko
Telerik
See What's Next in App Development. Register for TelerikNEXT.