YAxis number format

5 posts, 1 answers
  1. Derek
    Derek avatar
    118 posts
    Member since:
    Oct 2008

    Posted 18 May 2011 Link to this post

    We have a Telerik report that includes a stacked bar chart. The chart gets data from a SQL datasource. The chart is created fully at design time (not programmatically), including adding two series entries with titles and column names. The y axis contains currency amounts, and we'd like it to show as currency. We've tried setting the valueformat appropriately, and it appears to change it on the visual display, but when we preview or run the report the numbers are unformatted.. I notice that the following line is added to the designer.vb file;

    Me.ChartSpendByTier.PlotArea.YAxis.Appearance.ValueFormat = Telerik.Reporting.Charting.Styles.ChartValueFormat.Currency

    But the problem is that it just doesn't seem to work! Ideally we'd like to use a custom format (ie {C0}), but none of this seems to produce the expected behaviour.

    Are we doing something wrong?

    A second question; is it possible to add a total value to the stacked bar (ie the sum of all the segments)?

  2. Derek
    Derek avatar
    118 posts
    Member since:
    Oct 2008

    Posted 24 May 2011 Link to this post

    Here's the behaviour I've confirmed;

    At design time, my developer changes the PlotArea --> YAxis --> Appearance --> Value Format to CURRENCY
    Preview the chart, the yaxis is unformatted
    Open the settings, ahd value format is set to NONE

    Can anyone from Telerik offer an insight here? This does NOT seem to be the correct behaviour. if the axis is populated from a data source, is it necessary to change the setting AFTER the axis is populated?

    This same behaviour seems to happen with data label positions (change and the changes are undone as soon as you preview it).
  3. DevCraft R3 2016 release webinar banner
  4. Answer
    Steve avatar
    10941 posts

    Posted 25 May 2011 Link to this post

    Hello Derek,

    We've tried this on our end, but could not reproduce it. From your description, it sound like the property is not serialized in the InitializeComponent() method - can you verify that by inspecting the code?
    We would also appreciate if you try to reproduce this on a new chart, as this behavior might be caused by something else you have altered in the chart item. If you are unable to identify the cause, please open a support ticket and attach a sample runnable report that we can look into.

    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  5. Derek
    Derek avatar
    118 posts
    Member since:
    Oct 2008

    Posted 25 May 2011 Link to this post

    Thanks for the response;

    We tried it with a simple report/chart in a new project, and we were able to get the axes formatting properly. There must be something in the specific report that is causing the problems; we'll go back to the drawing board and see if we can figure out what it is.
  6. Stefen
    Stefen avatar
    18 posts
    Member since:
    Oct 2010

    Posted 08 Jun 2011 Link to this post

    Derek, I haven't had a chance to research why but in my experimentations with telerik reporting I have noticed that skins overwrite a lot of my settings for some reason. This may be the cause of your problem. Unfortunately the telerik docs are not very useful for understanding the reporting events lifecycle so its hard to guesstimate what is changing your settings. 
    Hope this helps =D 
Back to Top
DevCraft R3 2016 release webinar banner