Jump to content
Software FX Community

Recommended Posts

Posted

I created a customGridLine dinamically from source:

double[] strokeArr = { 1, 1, 1 };

CustomGridLine c2 = new CustomGridLine();

c2.Value = value;

Brush borderBrush = new SolidColorBrush(Color.FromArgb(225, 155, 55, 75));

c2.Stroke = borderBrush; c2.StrokeThickness = 3;

c2.StrokeDashArray = new DoubleCollection(strokeArr);

chart1.AxisY.CustomGridLines.Add(c2);

But my problem is that the CustomGridLine appear over the Points of the chart. I'd like to mive this GridLine backwards downto the bottom of the chart.

I tried to create this CustomGridLine before adding all the points to the chart and no way...

Thanks

AdolfoCG

Posted

Hi AdolfoCG,I am afraid this is by design. CustomGridLines are meant to highlight limits or specific points of interest in the chart. They can be drawn anywhere in the chart area by being attached to a particular value in the Axis but they are intended to appear over the points by design. RandyJ

Posted

Thanks for the celerity with your reply! I must say i was beginning to think that... Instead of using this CustomGridLine is there another control that may be posible to use so it could be sent to the back?

 Posted Image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I attach a pic of my XAML, i

Posted

Good news, most of our code was internally ready to handle gridlines on the back or front (note that Axis.Grids.ShowInFront allows to move the default grids to the front) so we have added a ShowInFront property to CustomGridLine (default is true).

You can pickup this change by downloading hotfix build 3693 or later here, note that if UAC is enabled in your machine you have to run IE as administrator.

I hope this works for you

JuanC

  • 8 months later...
Posted

We have the latest version of ChartFX 7 for VS 2005 and the ShowInFront for the CustomGridLine does not appear in the object model.

Is there any way to have the series and point labels to appear on top of the custom gridlines?

Thanks

Posted

Note that you posted a message in the "Chart FX for WPF" forum which is a different product than "Chart FX 7 for VS 2005".

If you are in fact using ChartFX 7 for VS 2005 as you stated then you need something like this

  customGrid.ExtraStyle |= CustomGridLineStyles.BackOnly;

If you are using Chart FX for WPF (as the screenshot seems to imply) then you need to make sure you download the most recent hotfix for ChartFX for WPF, the third number in the version for ChartFX.WPF.dll is the build number. ShowInFront was added in build 3693.

JuanC

Posted

Thank you, this worked for me.  I am using ChartFX 7 (not WPF), so wrong forum - I agree.  Here is the code I added for benefit of others. 

  Me.Chart1.Series(0).AxisY.CustomGridLines(0).ExtraStyle = _

  Me.Chart1.Series(0).AxisY.CustomGridLines(0).ExtraStyle Or CustomGridLineStyles.BackOnly

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