Hi Satishkumar,
If your intention is to draw the the secondary Y-axes to occupy the height of the PrimaryYAxis then it can be done by adjusting the size and location of the secondary-Y axes as shown in the code snippet below,
private void SetAxis()
{
if (this.chartControl1.Series.Count > 0)
{
this.chartControl1.ChartArea.ChartAreaMargins.Bottom = 30;
this.chartControl1.ChartArea.ChartAreaMargins.Left = 30;
axis0.LocationType = ChartAxisLocationType.Set;
axis0.Location = new PointF(this.chartControl1.PrimaryXAxis.Location.X, this.chartControl1.PrimaryXAxis.Location.Y);
axis0.AutoSize = false;
axis0.Size = new SizeF(0, this.chartControl1.PrimaryYAxis.Size.Height);
axis1.LocationType = ChartAxisLocationType.Set;
axis1.Location = new PointF(this.chartControl1.PrimaryXAxis.Location.X-40, this.chartControl1.PrimaryXAxis.Location.Y);
axis1.AutoSize = false;
axis1.Size = new SizeF(0, this.chartControl1.PrimaryYAxis.Size.Height);
}
}
In this SetAxis( ) method I have drawn the axis1 to be away from the PrimaryYAxis since both axis0 and axis1 get overlapped as they are of the same height.
I have also attached the modified sample with this post.
Let me know whether this helps you.
Thanks & Regards,
Ramya.
ChartAxesSample1.zip