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

YAxis number format

4 Answers 100 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 19 May 2011, 12:40 AM
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)?

TIA.

4 Answers, 1 is accepted

Sort by
0
Derek
Top achievements
Rank 1
answered on 24 May 2011, 01:28 PM
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).
0
Accepted
Steve
Telerik team
answered on 25 May 2011, 03:45 PM
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.

Regards,
Steve
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
0
Derek
Top achievements
Rank 1
answered on 25 May 2011, 06:41 PM
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.
0
Stefen
Top achievements
Rank 1
answered on 08 Jun 2011, 05:57 PM
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 
Tags
General Discussions
Asked by
Derek
Top achievements
Rank 1
Answers by
Derek
Top achievements
Rank 1
Steve
Telerik team
Stefen
Top achievements
Rank 1
Share this question
or