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

Line Graph Category Axis Label Format?

7 Answers 140 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
jim-bob
Top achievements
Rank 1
jim-bob asked on 11 May 2015, 11:22 AM

Hi,

Having issues trying to remove time formatting from the x-axis 'category label format. Tried several formats but don't see a change on the outputted report - always showing my category dates as date WITH the time. STUPID! have already spent too much time on this & will take at least another day to get an answer, assuming no further info is required.

‚Äč

7 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 13 May 2015, 02:28 PM
Hello WillemM,

The labels on the X axis are defined by groups. When you are using a CategoryScale for the X axis (default), these group labels are represented as strings. These strings are not of type DateTime, which is why any date formatting will not be applied. In order to change this behavior you need to switch to a DateTimeScale and set the XAxis.X property, as described in the How to: Change the Axis Scale help article.
Then you can change the format (remove the time part) using the Format Property or the Format() text function.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
jim-bob
Top achievements
Rank 1
answered on 14 May 2015, 09:51 AM
i had a work around running fine, by using an actual date along with a pre-formatted label, i then configured the line graph series to group by the date value but sort by the label, which work 100 percent. Anyway, i tried doing a line graph using your method (without the pre-formatted label) and it does not work! as soon as i change misc > scale to datetime, my design-mode preview goes tits-up and when i run the report the graph throws an exception: "x-value cannot be null". I checked the category grouping for the x-scale & the mapping to the inbound data column still appears intact!!!!!!
0
jim-bob
Top achievements
Rank 1
answered on 14 May 2015, 09:53 AM
...have you actually tried this - i assume you have, are there any other steps you neglected to mention because its not rocket science. is there something ELSE i need to check after changing the scale setting to datetime??????
0
Nasko
Telerik team
answered on 18 May 2015, 05:09 PM
Hello WillemM,

The steps suggested in the provided How to: Change the Axis Scale help article work correctly when tested on our end:

"How to change the axis scale to DateTime:
1. On the design surface, click on the axis.
The selected axis properties are listed in the Property Browser.
2. In the Misc section for Scale select the DateTime Scale option.
3. Set the Groupings and Series.X/X0/Y/Y0 expressions to a DateTime field.
"

Please check this video for reference.

In case you need further advise, please open a new support ticket where you can attach a runnable sample report exhibiting the issue. We will be able to provide further suggestions once we review your scenario.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shiwani
Top achievements
Rank 1
answered on 19 Mar 2017, 11:46 AM

Hello,

I have created a line graph in telerik report designer 2016, which is working fine, but the series on the graph shows data lines from bottom to top and i want to show series data from top to bottom, please guide me how can i do the same.

0
Stef
Telerik team
answered on 22 Mar 2017, 03:51 PM
Hello Shiwani,

Please test moving the XAxis on top by setting the Yaxis.Scale's CrossAxisPositions - add new cross position AtMaximum.

If you need further help, please post the code for generating the Graph item, including test data in CSV format.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shiwani
Top achievements
Rank 1
answered on 23 Mar 2017, 04:21 AM
Thanks Stef, now it is working.
Tags
Report Designer (standalone)
Asked by
jim-bob
Top achievements
Rank 1
Answers by
Nasko
Telerik team
jim-bob
Top achievements
Rank 1
Shiwani
Top achievements
Rank 1
Stef
Telerik team
Share this question
or