agentZuluka Posted March 17, 2009 Report Share Posted March 17, 2009 Hi! I need to combine on graph two series with bar chart type and one with Line type chart. I have 3 series - one for line and two for bar. The problem is that my line graph displayed behind of bar graph instead of showing on the top: How can i dispay line graph on the top? Quote Link to comment Share on other sites More sharing options...
rogelioB Posted March 17, 2009 Report Share Posted March 17, 2009 Hi, you just need to apply BringToFront method to the line graph. You can do it using this:chart1.Series[0].BringToFront(); Regards, RB Quote Link to comment Share on other sites More sharing options...
agentZuluka Posted March 17, 2009 Author Report Share Posted March 17, 2009 Tried it, no luck Quote Link to comment Share on other sites More sharing options...
rogelioB Posted March 17, 2009 Report Share Posted March 17, 2009 Hi, Try this code: chart1.Data.Series = 3; chart1.Data.Points = 10; chart1.Gallery = ChartFX.WinForms.Gallery.Bar; Random ran = new Random(); for (int i = 0; i < chart1.Data.Series; i++) { for (int j = 0; j < chart1.Data.Points; j++) { chart1.Data[i, j] = ran.NextDouble() * 100; } } chart1.Series[0].Stacked = true; chart1.Series[1].Stacked = true; chart1.Series[2].Gallery = ChartFX.WinForms.Gallery.Lines; Please let me know if this works. Regards, RB Quote Link to comment Share on other sites More sharing options...
agentZuluka Posted March 20, 2009 Author Report Share Posted March 20, 2009 Thats works fine for me. Thanks. So what the reason that I cannot bring Line chart on top of bars charts? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.