Jump to content
Software FX Community
rhswain

Clearing a Constant Line

Recommended Posts

I have a chart with two constant lines that I create with OpenDataEx COD_CONSTANTS 2I can clear both lines by using ClearData CD_CONSTANTLINESBut what if I want to clear just one line while leaving the other visible?I have tried setting the Value of one line to CHART_HIDDEN, but that makes the line appear at the bottom of the Y axis!  I can set the value to -99999, which does hide the line, but I am uncomfortable with that "solution" since my real data might include -99999.Is there a clean way to clear/hide just one constant line? 

Also...  Another question about a Constant Line:  If I have a chart with both a bar chart and a Constant Line, is it possible to have the Line appear "under" the bars of the bar chart?  Right now, my Line appears "on top" of the bars.  Can the "Z-order" be changed?

 

Thanks in advance for any help on this. 

Yes, I know I should upgrade, but...

Share this post


Link to post
Share on other sites

Hi,The ShowLine property aAllows you to show or hide a constant line in the chart. However, please note that when you hide a constant line using this property, any text associated with the line will remain in the chart. You can use the ShowText property to show or hide the constant line text.Chart1.ConstantLines(0).ShowLine = FalseAs for your second question, I am afraid that would not be possible since this is by design.Regards,RandyJ

Share this post


Link to post
Share on other sites

I don't see a ShowLine property for a Constant Line. 

Perhaps that was introduced in a later version...?

The properties that I do see are:  Axis Label LineColor LineStyle LineWidth Style Value

 

Share this post


Link to post
Share on other sites

Hi,

In Chart FX 5.x, you can delete a constant line from the chart just by making it invisible. For the look of the chart I'm assuming you are using Chart FX 5.x, the code to hide a constant line is:

ChartFX1.ConstantLine(0).Style = ChartFX1.ConstantLine(0).Style Or CC_HIDE

ChartFX1.Refresh

Regards,

RandyJ

Share this post


Link to post
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.

Loading...

×
×
  • Create New...