Hi,
Using Version 7.1
my chart has Y Axis Set to automatic
chart1.Axis.Y.RangeType = UltraChart.Shared.Styles.AxisRangeType.Automatic
I want to increase the range of the Y Axis by 10 % to make the chart look better. I do not know the RangeMin and RangeMax in advanced,
How can I determinate the current RangeMin and RangeMax Value of the chart ? I want to do something like this
chart1.Axis.Y.RangeType = UltraChart.Shared.Styles.AxisRangeType.Custom
chart1.Axis.Y.RangeMin = _Chart.Axis.Y.RangeMin * 0.9
chart1.Axis.Y.RangeMax = _Chart.Axis.Y.RangeMax * 1.1
Hope thats clear,
Thanks
sorry, but this won't work in 3D charts. i think your best option is to get the minimum and maximum values from your datasource and use those values as the rangemin/max instead.
This doesn't seem to work for me (C#). I'm using a ColumnChart3D (version 8.1). When I run the code, it says always that yAxis IS NULL (I'm setting that datasource in the Load event). Can u help? Tx in advance.
private void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e)
{
Infragistics.UltraChart.Core.IAdvanceAxis yAxis = (Infragistics.UltraChart.Core.IAdvanceAxis)e.Grid["Y"];
if (yAxis == null)
MessageBox.Show("null");
}
else
MessageBox.Show(yAxis.Maximum.ToString());
you can only access that information inside the FillSceneGraph event ... the syntax for that would be:
IAdvanceAxis yAxis = this.Grid["Y"] as IAdvanceAxis;
Console.WriteLine(yAxis.Minimum);
Console.WriteLine(yAxis.Maximum);
...but i think a better way to add that 10% space would be by using the properties under Axis.Y.Margin.