Jump to content
Software FX Community

Bar/line combination chart


Larsmoll

Recommended Posts

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

:-))

 

 

Link to comment
Share on other sites

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();

 

Link to comment
Share on other sites

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

:-))

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.

Guest
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...