adolfocg Posted February 10, 2010 Report Posted February 10, 2010 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 Quote
RandyJ Posted February 10, 2010 Report Posted February 10, 2010 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 Quote
adolfocg Posted February 11, 2010 Author Report Posted February 11, 2010 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? I attach a pic of my XAML, i Quote
JuanC Posted February 11, 2010 Report Posted February 11, 2010 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 Quote
mscochran Posted October 22, 2010 Report Posted October 22, 2010 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 Quote
JuanC Posted October 26, 2010 Report Posted October 26, 2010 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 Quote
mscochran Posted October 26, 2010 Report Posted October 26, 2010 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 Quote
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.