Current filter:
                                You should refresh the page.
                                Support Center

                                DXCharts Getting Started - Lesson 2 - Bind Chart Series to Data

                                0

                                This example demonstrates how to manually add a series to the chart's diagram, and then bind this series to the datasource.

                                You must  log in  or  register  to leave comments
                                Select file
                                • MainPage.xaml
                                Select language
                                • C#
                                • VB.NET
                                Select version
                                • v2012 vol 1.5 - v2013 vol 1.4
                                • v2011 vol 2.5 - v2012 vol 1.5
                                • v2011 vol 1.7 - v2011 vol 1.12
                                <UserControl x:Class="SilverlightApplication2.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"
                                    xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
                                    mc:Ignorable="d"
                                    d:DesignHeight="300" d:DesignWidth="400" >
                                
                                    <UserControl.Resources>
                                        <ResourceDictionary>
                                            <PointCollection x:Key="ObjectCollection">
                                                <Point X="1" Y="8" />
                                                <Point X="2" Y="3" />
                                                <Point X="3" Y="10" />
                                                <Point X="4" Y="4" />
                                                <Point X="5" Y="6" />
                                                <Point X="6" Y="7" />
                                                <Point X="7" Y="3" />
                                                <Point X="8" Y="-2" />
                                                <Point X="9" Y="-4" />
                                                <Point X="10" Y="-8" />
                                                <Point X="11" Y="-6" />
                                                <Point X="12" Y="-2" />
                                                <Point X="13" Y="-5" />
                                            </PointCollection>
                                        </ResourceDictionary>
                                    </UserControl.Resources>
                                    <Grid>
                                        <dxc:ChartControl Name="chartControl1">
                                            <dxc:ChartControl.Diagram>
                                                <dxc:XYDiagram2D>
                                                    <dxc:XYDiagram2D.Series>
                                                        <dxc:BarSideBySideSeries2D DataSource="{StaticResource ObjectCollection}"
                                                                               ArgumentDataMember="X" ValueDataMember="Y" 
                                                                               ColorEach="True" LabelsVisibility="True">
                                                            <dxc:BarSideBySideSeries2D.LegendPointOptions>
                                                                <dxc:PointOptions PointView="ArgumentAndValues" />
                                                            </dxc:BarSideBySideSeries2D.LegendPointOptions>
                                                        </dxc:BarSideBySideSeries2D>
                                                    </dxc:XYDiagram2D.Series>
                                                </dxc:XYDiagram2D>
                                            </dxc:ChartControl.Diagram>
                                            <dxc:ChartControl.Legend>
                                                <dxc:Legend VerticalPosition="TopOutside" HorizontalPosition="Center" 
                                                            Orientation="Horizontal" />
                                            </dxc:ChartControl.Legend>
                                            <dxc:ChartControl.CrosshairOptions>
                                                <dxc:CrosshairOptions ShowArgumentLabels="True" ShowArgumentLine="True" 
                                                                      ShowValueLabels="True" ShowValueLine="True" />
                                            </dxc:ChartControl.CrosshairOptions>
                                        </dxc:ChartControl>
                                    </Grid>
                                </UserControl>

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Your Privacy - Legal Statements

                                Copyright © 1998-2013 Developer Express Inc.
                                ALL RIGHTS RESERVED
                                All trademarks or registered trademarks
                                are property of their respective owners