I have the chart above with a left and right y axis and a date time category for the x axis. I want to draw an axis tick line as shown for the left-hand Y axis on the right-hand Y axis. How can I do this?
OK, I can confirm this works as expected - The chart gets boxed in on both sides, which is what I needed, thanks!
E.
Hello Gary,
I have been investigating into this behavior you are seeing, and it appears that we actually added support for the axis line when the axis is moved in 18.1 and later. Prior to then, this was only actually supported for the left-side axis.
I have been looking into this with version 17.2, and I have found a workaround by digging into the visual tree of the XamDataChart and marking an internal Border element to be more visible. You can use the following code after the chart has loaded to achieve this:
private void XamDataChart_Loaded(object sender, RoutedEventArgs e) { XamDataChart chart = sender as XamDataChart; ContentPresenter presenter = Infragistics.Windows.Utilities.GetDescendantFromName(chart, "ContentPresenter") as ContentPresenter; Border border = Infragistics.Windows.Utilities.GetDescendantFromType(presenter, typeof(Border), false) as Border; border.BorderBrush = Brushes.Black; border.BorderThickness = new Thickness(1,0,1,0); }
Please let me know if you have any other questions or concerns on this matter.
OK, setting the Stroke property does not show the line, is there something else to check? I am using v17.2.20172.1000.
I will note that the vertical black line on the left stays even when I only assign a right-hand axis, so I thought perhaps it is not related to the axis, however, setting the stroke thickness (yAxis.StrokeThickness = 20D;) on the axis makes the left vertical black line thicker, so the line is being drawn by the axis, but not in the proper location for some reason.I dynamically create multiple Y Axes in the code behind like this - some Y axes are placed on the left, some on the right in my actual code, but this is the modified version to get all Y axes on the right to test drawing the line:
I would expect that setting the Stroke property to "Black" on "yAxis2" in the configuration above would draw this line. If you are seeing a different behavior, it may be possible that we are using different versions of the XamDataChart. Which version of the Infragistics assemblies are you using?
Thanks, I am able to place the axis on the right-hand side of the chart, but I am looking to draw the black line (circled in red on the left in the screen shot) that boxes off the chart itself from the axis next to the right-hand axis.