Articles in this section
Category / Section

How to set the interval range of OLAP Chart axis?

1 min read

To change the interval range of the OLAP Chart axis, manually, you can use the following code example.

C#

public partial class MainPage : UserControl
    {
        private IOlapDataProvider dataProvider;
        public object OlapDataManager;
        public MainPage()
        {
            InitializeComponent();
            InitializeConnection();
this.olapchart1.Loaded += new RoutedEventHandler(olapchart1_Loaded);
        }
        private void InitializeConnection()
        {
            Binding customBinding = new CustomBinding(new BinaryMessageEncodingBindingElement(), new HttpTransportBindingElement { MaxReceivedMessageSize = 2147483647 });
            EndpointAddress address = new EndpointAddress("http://bi.syncfusion.com/OlapWcfProject/Services/OlapManager.svc/binary");
            ChannelFactory<IOlapDataProvider> clientChannel = new ChannelFactory<IOlapDataProvider>(customBinding, address);
            dataProvider = clientChannel.CreateChannel();
            OlapDataManager olapDataManager = new OlapDataManager();
            olapDataManager.DataProvider = dataProvider;
            olapDataManager.SetCurrentReport(CreateOlapReport());
            this.OlapDataManager = olapDataManager;
        }
void olapChart1_Loaded(object sender, RoutedEventArgs e)
        {
            this.olapChart1.OlapArea.Loaded += new RoutedEventHandler(OlapArea_Loaded);
        }
        void OlapArea_Loaded(object sender, RoutedEventArgs e)
        {
            this.olapChart1.OlapArea.SecondaryAxis.Interval = 50000.00;
        }

VB

Partial Public Class MainPage
    Inherits UserControl
    Private dataProvider As IOlapDataProvider
    Public OlapDataManager As Object
    Public Sub New()
        InitializeComponent()
        InitializeConnection()
                Me.olapchart1.Loaded += New RoutedEventHandler( (olapchart1_Loaded)
    End Sub
    Private Sub InitializeConnection()
            Binding customBinding = New CustomBinding(New BinaryMessageEncodingBindingElement(), New HttpTransportBindingElement 
            {
        MaxReceivedMessageSize = 2147483647
            }
)
        Dim address As EndpointAddress = New EndpointAddress("http://bi.syncfusion.com/OlapWcfProject/Services/OlapManager.svc/binary")
            Dim clientChannel As ChannelFactory<IOlapDataProvider> =  New ChannelFactory<IOlapDataProvider>(customBinding,address) 
        dataProvider = clientChannel.CreateChannel()
        Dim olapDataManager As OlapDataManager = New OlapDataManager()
        olapDataManager.DataProvider = dataProvider
        olapDataManager.SetCurrentReport(CreateOlapReport())
        Me.OlapDataManager = olapDataManager
    End Sub
    Private Sub olapChart1_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Me.olapChart1.OlapArea.Loaded += New RoutedEventHandler(OlapArea_Loaded)
    End Sub
    Private Sub OlapArea_Loaded(ByVal sender As Object, ByVal e As RoutedEventArgs)
        Me.olapChart1.OlapArea.SecondaryAxis.Interval = 50000.0
    End Sub
.OlapChartArea.Axes(0).Interval = 500000.0
    End Sub

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied