Method to set starting Y value in Left Axes
Posted: Fri Jun 22, 2012 8:41 pm
Is there a way to set the starting Y value where X/Y intersect? I have the need to show the lowest value from the Y Axis in the chart. I should note that this chart has both area and line within one chart. Also to note is that this is using the iOS Tchart library.
I have tried a couple different ways including:
Setting automatic to false and then specifying the left minimum and maximum values
areaLY.Chart.Axes.Left.Automatic = false;
areaLY.Chart.Axes.Left.Minimum = Math.Round(areaLY.Chart.Axes.Left.MinYValue);
lineTY.Chart.Axes.Left.Automatic = false;
lineTY.Chart.Axes.Left.Minimum = Math.Round(lineTY.Chart.Axes.Left.MinYValue);
areaLY.Chart.Axes.Left.Maximum = Math.Round(areaLY.Chart.Axes.Left.MaxYValue);
lineTY.Chart.Axes.Left.Maximum = Math.Round(lineTY.Chart.Axes.Left.MaxYValue);
The second method:
areaLY.Chart.Axes.Left.SetMinMax(Math.Round(areaLY.Chart.Axes.Left.MinYValue),areaLY.Chart.Axes.Left.MaxYValue);
lineTY.Chart.Axes.Left.SetMinMax(Math.Round(lineTY.Chart.Axes.Left.MinYValue),lineTY.Chart.Axes.Left.MaxYValue);
In the attached screen shot the lowest value is actually 932, so I want to show 900 where x/y intersect in the chart. Currently you'll see in the chart the starting value is 1000.
I have tried a couple different ways including:
Setting automatic to false and then specifying the left minimum and maximum values
areaLY.Chart.Axes.Left.Automatic = false;
areaLY.Chart.Axes.Left.Minimum = Math.Round(areaLY.Chart.Axes.Left.MinYValue);
lineTY.Chart.Axes.Left.Automatic = false;
lineTY.Chart.Axes.Left.Minimum = Math.Round(lineTY.Chart.Axes.Left.MinYValue);
areaLY.Chart.Axes.Left.Maximum = Math.Round(areaLY.Chart.Axes.Left.MaxYValue);
lineTY.Chart.Axes.Left.Maximum = Math.Round(lineTY.Chart.Axes.Left.MaxYValue);
The second method:
areaLY.Chart.Axes.Left.SetMinMax(Math.Round(areaLY.Chart.Axes.Left.MinYValue),areaLY.Chart.Axes.Left.MaxYValue);
lineTY.Chart.Axes.Left.SetMinMax(Math.Round(lineTY.Chart.Axes.Left.MinYValue),lineTY.Chart.Axes.Left.MaxYValue);
In the attached screen shot the lowest value is actually 932, so I want to show 900 where x/y intersect in the chart. Currently you'll see in the chart the starting value is 1000.