Approved
Last Updated: 03 Jan 2017 20:54 by ADMIN
ADMIN
Martin Ivanov
Created on: 03 Feb 2015 15:58
Category: ChartView
Type: Bug Report
1
ChartView: The PanZoomBar's orientation is not changed when the chart's axes are switched
When there is defined a ChartPanAndZoomBehavior and the axes of the chart are switched at run-time, the orientation of the PanZoomBar elements it is not changed.

Workaround:
Get the PanZoomBar element and set its Orientation property.

private void TrySetOrientation(CartesianAxis axis, Orientation orientation)
{
    var panZoomBar = Telerik.Windows.Controls.ChildrenOfTypeExtensions.FindChildByType<PanZoomBar>(axis);
    if (panZoomBar != null)
    {
        panZoomBar.Orientation = orientation;
    }
}

private void SwapAxes()
{           
    // Swapping code here

    this.Dispatcher.BeginInvoke((Action)(() =>
    {
        this.TrySetOrientation(this.chart.HorizontalAxis, Orientation.Horizontal);
        this.TrySetOrientation(this.chart.VerticalAxis, Orientation.Vertical);
    }));
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments