Jump to content
Software FX Community

Is it possible to move a series charted as a line in front of series charted as bars?


ari88

Recommended Posts

I've seen that other versions of ChartFX have a function called SendToBack(), but I can't find anything like this for the COM version.  Is there any way to get line series in front of the bars?  I've tried adding the data for the line series before all other series, and after all other series, but that had no effect.

Link to comment
Share on other sites

Hi ari88

Unfortunately, Chart FX for COM 6.2 (both versions, Client Server 6.2 and Internet 6.2) does not contains any method that allow you to modify the order of the series.

I have created a sample code that shows you how to put the lines over the bars, please try at your side.

' Open the communication channel

Chart1.OpenData COD_Values, 2, 5

' Assign the values to the bars

Chart1.Value(0, 0) = 6

Chart1.Value(0, 1) = 7

Chart1.Value(0, 2) = 8

Chart1.Value(0, 3) = 9

Chart1.Value(0, 4) = 10

' Assign the values to the lines

Chart1.Value(1, 0) = 5

Chart1.Value(1, 1) = 5

Chart1.Value(1, 2) = 5

Chart1.Value(1, 3) = 5

Chart1.Value(1, 4) = 5

'Close the communication channel

Chart1.CloseData COD_Values

Chart1.Series(0).Gallery = Gallery_Bar

Chart1.Series(1).Gallery = Gallery_Lines

I am attaching an image of the output of this code. 

Carlos Chaves

post-7389-13922413080991_thumb.png

Link to comment
Share on other sites

Hi...

 Your example showed me what was wrong with how I was doing this: I was adding in the wrong order.  I was going point by point, adding to each series.  Changing my code to add series by series, and ordering the series correctly before putting the data in the chart fixed the issue.

 Thanks!

-Ari

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