Jump to content
Software FX Community

Two Y-axis with Same X-axis


Recommended Posts

I have two Y-axis with both having same data for x-axis, I am using the following code

But I am not getting proper output of graph and X-axis value are also not been getting displayed as required.




sNiftyMax = Convert.ToDouble(dtNifty.Compute("Max(CurPrice)", ""));sNiftyMin = Convert.ToDouble(dtNifty.Compute("Min(CurPrice)", ""));

Chart1.Data.Series = 1;

Chart1.Data.Points = dtNifty.Rows.Count;

Chart1.AxisY.Max = (Convert.ToDouble(sNiftyMax)+50);

Chart1.AxisY.Min = (

Convert.ToDouble(sNiftyMin)-50);Chart1.AxisY.Step = (((Convert.ToDouble(sNiftyMax) + 100)-(Convert.ToDouble(sNiftyMin)-50))/4);

Chart1.Data.X.Shared =

true; int i = 0;for (int j = 0; j < Chart1.Data.Points;j++)


Chart1.Data.Y[i, j] =

Convert.ToDouble(dtNifty.Rows[j].ItemArray[1]);dTime = ((dtNifty.Rows[j].ItemArray[0]).ToString()).Remove(5,3).Replace(":",".") ;Chart1.Data.X[i, j] = Double.Parse(dTime);



i = 1;

for (int j = 0; j < Chart1.Data.Points-1; j++)






Is something I m missing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...