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

Chart Xaxis Margin and label interval

2 Answers 120 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
raphael
Top achievements
Rank 1
raphael asked on 03 Dec 2013, 01:12 PM
Hi I'm stucked with a little problem.
I'm working with the telerik report designer, and I'm trying to show a chart on a report I'm designing. I've already did a sample with SSRS and now I would like to get about the same chart with telerik.
I almost got everything to work as I wanted but I still have 2 little problems I can't solve, because I can't find the properties to change on my designer.

the first is that my linechart does not start from the intersection of X and Y axis, and at the end leaves a blank space from the image you can see it in the 2 blue squares
the second is the Xaxis interval, as you can see from the image in the green square, the label are a bit a mess, but i cannot find where I could set this property too.

Can somebody help me?

Thank you very much raphael

2 Answers, 1 is accepted

Sort by
0
Accepted
Stef
Telerik team
answered on 06 Dec 2013, 01:04 PM
Hi Raphael,

To control the formatting of the axes, you need to apply specific settings on their scales. Notice different scales labels are recognized according to the type of the scale:
  • CategoryScale - labels are strings.Labels format depends on the CategoryGroups - Misc - Label expression, which allows you to control when and how labels will be rendered on the exis;
  • DateTimeScale - labels are treated as DateTime objects. Labels format depends on the axis LabelFormat property;
  • NumericalScale - labels are treated as numbers. Labels format depends on the axis LabelFormat property;

Using DateTimeScale or NumericalScale you can control the step of the labels through the Scale properties - MajorStep and MajorUnit, LabelStep and LabelUnit. To remove the space at the beginning of the chart, set the X axis Scale.CrossAxisPosition to Specific and give the first point on the axis as value. Then set the Scale.PositionMode to OnTicks. Finally to remove the space at the end of the chart, set the Scale.Maximum to the axis last point value. Without knowing your data, you will need to analyze it in order to set the above mentioned settings programmatically.

I hope this information helps you.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
raphael
Top achievements
Rank 1
answered on 06 Dec 2013, 02:06 PM
Hi stef,

Thank you for your help, I have to say that's quite tricky to achieve what I was looking for.
Everytime I changed the scale to datetime the editor crashed, at the end I found this article
http://www.telerik.com/help/reporting/graphhowtocreategraphwithcolumnandlineseries.html
that explained me what I was missing, the part where you have to set the datetime field to the x of the serie taht it's automatically done from the wizard.

regards

Raphael
Tags
General Discussions
Asked by
raphael
Top achievements
Rank 1
Answers by
Stef
Telerik team
raphael
Top achievements
Rank 1
Share this question
or