Line Graph Category Axis Label Format?

5 posts, 0 answers
  1. jim-bob
    jim-bob avatar
    4 posts
    Member since:
    Jan 2014

    Posted 11 May 2015 Link to this post

    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.

  2. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 13 May 2015 Link to this post

    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
  3. DevCraft banner
  4. jim-bob
    jim-bob avatar
    4 posts
    Member since:
    Jan 2014

    Posted 14 May 2015 in reply to Nasko Link to this post

    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!!!!!!
  5. jim-bob
    jim-bob avatar
    4 posts
    Member since:
    Jan 2014

    Posted 14 May 2015 in reply to Nasko Link to this post

    ...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??????
  6. Nasko
    Admin
    Nasko avatar
    909 posts

    Posted 18 May 2015 Link to this post

    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
Back to Top
DevCraft banner