Larsmoll Posted June 9, 2009 Report Share Posted June 9, 2009 Hi evbody! I have a problem making a chart with one lineseries and one barseries. I can't get the line in the foreground. I have tried .sendtoback/.bringtofront but it doesn't look good. I have also played with the order of the series and transparencies but it doesn't help. I get a lot of different results. Is there a specific way of doing this? TIA Lars :-)) Quote Link to comment Share on other sites More sharing options...
juanZ Posted June 9, 2009 Report Share Posted June 9, 2009 Hi! This is a small example, but I think we can start from here. Please copy this into your page load method, (create an empty page with a chart for testing) Chart1.Data.Series = 2; Chart1.Data.Points = 5; Chart1.Data[0, 0] = 15; Chart1.Data[0, 1] = 18; Chart1.Data[0, 2] = 19; Chart1.Data[0, 3] = 19; Chart1.Data[0, 4] = 15; Chart1.Data[1, 0] = 20; Chart1.Data[1, 1] = 16; Chart1.Data[1, 2] = 22; Chart1.Data[1, 3] = 14; Chart1.Data[1, 4] = 12; Chart1.Series[0].Color = Color.DarkGreen; Chart1.Series[0].Gallery = Gallery.Lines; Chart1.Series[1].Gallery = Gallery.Bar; Chart1.Series[0].SendToBack(); Quote Link to comment Share on other sites More sharing options...
Larsmoll Posted June 10, 2009 Author Report Share Posted June 10, 2009 Hi and thanks for answer. This works fine. I set Chart1.Series[1].SendToBack(); and the line is up front. I have tried this in the other code which is a lot more complex: I am instatiating a new object in the page load and sending it the Chart1 when instatiating, along which is generated at design in default.aspx. Then I have a method to fill in the chart. Could this confuse chartfx? barline_namespace.clsBarLine Barline = new barline_namespace.clsBarLine(Chart1); Barline.GenerateChart(seriesData, wgsWidth, wgsHeight, wgsFrom, wgsTo, QS_object.Language, QS_object.Heading, QS_object.Xgrid, QS_object.Ygrid, QS_object.Kvartiler); Lars :-)) Quote Link to comment Share on other sites More sharing options...
juanZ Posted June 11, 2009 Report Share Posted June 11, 2009 Hi, The way yo passed the chart as a parameter should not cause any trouble, however Im not sure what are you doing inside the GenerateChart method. 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.