Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
560
how to add a horizontal scrollbar in xamwebchart
posted

Hi,

I am evaludating the silverlight controls. There is a scenario like I need to present a month's data in column chart.

If the datas are more no scrollbars are appearing in the chart. It tries to adjust the data in the same displayed with.

How I can get a horizontal scrollbar, so that I can scroll throught the chart contents?

Thanks in advance.

  • 30692
    Suggested Answer
    Offline posted

    Please see: http://help.infragistics.com/Help/NetAdvantage/DV/2009.2/CLR3.5/html/SL_DV_xamWebChart_Working_with_ZoomBars_and_Using_the_ZoomRectangle.html

    Also see this example code:

    <UserControl x:Class="SilverlightApplication11.MainPage"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

        mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"

        xmlns:igChart="clr-namespace:Infragistics.Silverlight.Chart;assembly=Infragistics.Silverlight.DataVisualization.Chart.v9.2">

      <Grid x:Name="LayoutRoot">

            <igChart:XamWebChart Width="400" Height="400">

                <igChart:XamWebChart.Axes>

                    <igChart:Axis AxisType="PrimaryX" ScrollEnabled="True" ScrollScale="0.75" ScrollPosition="0"/>

                </igChart:XamWebChart.Axes>

                <igChart:XamWebChart.Series>

                    <igChart:Series ChartType="Column">

                        <igChart:Series.DataPoints>

                            <igChart:DataPoint Label="Test1" Value="2" />

                            <igChart:DataPoint Label="Test2" Value="8" />

                            <igChart:DataPoint Label="Test3" Value="1" />

                            <igChart:DataPoint Label="Test4" Value="7" />

                            <igChart:DataPoint Label="Test5" Value="5" />

                            <igChart:DataPoint Label="Test6" Value="3" />

                            <igChart:DataPoint Label="Test7" Value="10" />

                            <igChart:DataPoint Label="Test8" Value="9" />

                            <igChart:DataPoint Label="Test9" Value="5" />

                            <igChart:DataPoint Label="Test10" Value="14" />

                            <igChart:DataPoint Label="Test11" Value="2" />

                        </igChart:Series.DataPoints>

                    </igChart:Series>

                                   

                </igChart:XamWebChart.Series>

            </igChart:XamWebChart>

        </Grid>

    </UserControl>