I am using XamDataChart 12.2 Hotfix version and wanted to add a bit of padding to the series so that the first and last points are not on the axis itself. So i used snoop and found that I have a Rootcanvas under Series that i can set a margin on to achieve what i want to. But when i try to get the root canvas it always comes as null. I am using the following code:
Canvas canvas = null;
DependencyObject chartAreaPanel = (((((Utilities.GetDescendantFromType(sender as XamDataChart, typeof(Grid), true) as Grid).Children[0] as Border).Child as Grid).Children[0] as ContentPresenter).Content) as DependencyObject; if (chartAreaPanel != null) {
var control = (((Utilities.GetDescendantFromType(chartAreaPanel, typeof(Border), true) as Border).Child as Grid).Children[2]) as Grid;
foreach (var child in control.Children)
{ if (child is Series) { var rootCanvas = Utilities.GetDescendantFromType(child as LineSeries, typeof(Canvas), true) as Canvas; if (rootCanvas != null && !string.IsNullOrEmpty(rootCanvas.Name) && rootCanvas.Name == "RootCanvas") { canvas = rootCanvas; } } }
}
Then i just want to set a margin to this canvas.
Any help would be appreciated.
Hello Jinish,
I am just checking your progress on the issue that you are having.
If you require any further assistance please do not hesitate to ask.