Hi all,
sometimes(it happens sometimes) I get repeated values on Y axis(ColumnChart3D), like this:
8 (maxval)
7
6
5
4
3
2
1 (minval)
Here my code snippet for axis customization(maxval and minval are dynamic-calculated values):
[ASPX page]
<Y Visible="True"><Labels ItemFormatString="<DATA_VALUE:#>" VerticalAlign="Center" Font="Verdana, 7pt" FontColor="#C8C8C8" Orientation="Horizontal" Visible="True" HorizontalAlign="Far" /><Margin><Far MarginType="Percentage" Value="0"></Far><Near MarginType="Percentage" Value="0"></Near></Margin></Y>
[CS page]
this.MyChart.Axis.Y.RangeType = Infragistics.UltraChart.Shared.Styles.AxisRangeType.Custom;this.MyChart.Axis.Y.RangeMin = [calculated min value, i.e. 8];this.MyChart.Axis.Y.RangeMax = [calculated max value, i.e. 1];this.MyChart.Axis.Y.NumericAxisType = Infragistics.UltraChart.Shared.Styles.NumericAxisType.Linear;this.MyChart.Axis.Y.TickmarkStyle = Infragistics.UltraChart.Shared.Styles.AxisTickStyle.DataInterval;this.MyChart.Axis.Y.TickmarkIntervalType = Infragistics.UltraChart.Shared.Styles.AxisIntervalType.Ticks;this.MyChart.Axis.Y.TickmarkInterval = 2;
Something wrong/missing in the code? Any ideas?
Thanks in advance
Could you attach a screenshot of your chart, because I'm not sure that I'm getting the problem.
Here it is...
Infragistics2.WebUI.UltraWebChart.v6.3, Version=6.3.20063.53
setting the TickmarkStyle to Smart on that axis should give you the best results, regardless of the range.
If you set the ItemFormatString to <DATA_VALUE:00.00> then this error occurs.
I've got a similar problem: I got it right for my X-axis to show only integer values, but the same happens what happens to you (repeating the same integer value). If you don't format the x-axis in any way, then decimal values are displayed on the graph.
I was wondering wheter or not there's an option how I can tell the graph to render only integer values, but not every dataInterval. Rendering each and every datainterval will create problems when the data ranges from 5 to 100+.
Anyone got a solution?
although your data may only contain integers, the axis is still plotting values at each 10% interval between your min and max. i am surprised that setting TickmarkStyle = Smart; something may be amiss there, but here's how you can set the interval manually.
Axis.Y.TickmarkStyle = DataInterval;
Axis.Y.TickmarkInterval = 1.0;
If you set max and min it does not work even if TickmarkStyle = Smart. I do not have decimal values but simply integer numbers. It seems to happen when the diffrence between RangeMax and RangeMin is relatively short(i.e. 1 and 8).
Axis.Y.TickmarkStyle = Smart
that should do it. or,
Axis.Y.Labels.ItemFormatString = <DATA_VALUE:00.00>
so you can see the decimal places after those repeated integers.