XAML Markup

See Settings for more information about the settings possible.

Requirements

  • <GAMultipleTypeSeriesChart> with at least one <GAMultipleTypeSeriesChart.Series>
  • You must provide a different series title for each series.
  • A series title must be supplied.
  • The graph.xaml (or similar with the same information) must be linked in some way to your application. (see Documentation for details)
  • Set the style of the <GAMultipleTypeSeriesChart> to the MinimalChartStyle in the Graph.XAML, or in the least supply the height and WIdth for the chart.
  • Set the <ChartTitle>.
  • Set any other Settings as required.
  • To enable seleting a point when it is clicked, bind the SelectedItem to a property in your application.
  • Set the DataPointType property in the <ChartSeries> to a class that will render the data point or data series. There are 3 classes provided,
    • GAColumnPiece - The equivalent of the column piece from the normal Clustered Column Chart. The style is defined by a rectanlge style.
    • GAScatterPiece - A bullet that is defined by a rectangle style. This allows for rectangles, cricles, ovals (filled or clear, with ot woithout border) depeding on the style you provide.
    • GALinePiece - A simple line chart (defined by a path style). This is not selectable like the other two classes. To make a line chart that appears to have scatter points that are selectable, use two series, one with line and one with scatter points.
  • Bind the ItemsSource to the location of the data and the DisplayMember and ValueMember to the titles and values for each point. (or X and Y values)
  • To use the default styling for the chart there is nothing else to do.
  • To alter the stying you should create you own Style, and set that in the DataPointStyle, or the DataPointSelectedStyle in the <ChartSeries>
  • You can use the SeriesLegendStyle and SeriesLegendVisibilty to chnage the look of the series legend items

<GAChart:GAMultipleTypeSeriesChart  Style="{StaticResource MinimalChartStyle}"
    					Width="400" Height="400"
    					DataContext="{Binding ''}"
    					ChartTitle="GA Multiple Series Type Chart" 
    					ChartSubTitle="Series overlap - column, scatter, line, custom"
                        SelectedItem="{Binding selectedItem, Mode=TwoWay}"
                                                       
                >

                        <GAChart:GAMultipleTypeSeriesChart.Series >
                            <GAChart:ChartSeries
                        		SeriesTitle="Target Line"
                        		DisplayMember="date"
                        		ValueMember="amount"
                        		ItemsSource="{Binding scatterData.Items}"
                        		DataPointType="{x:Type GAChart:GAColumnPiece}"
                                
                        />
                            <GAChart:ChartSeries
                        		SeriesTitle="{Binding scatterData1.seriesDisplayName}"
                        		DisplayMember="date"
                        		ValueMember="amount"
                        		ItemsSource="{Binding scatterData.Items}"
                        		DataPointType="{x:Type GAChart:GAScatterPiece}"
                                
                        />
                            <GAChart:ChartSeries
                        		SeriesTitle="{Binding scatterData.seriesDisplayName}"
                        		DisplayMember="date"
                        		ValueMember="amount"
                        		ItemsSource="{Binding scatterData.Items}"
                        		DataPointType="{x:Type GAChart:GALinePiece}"
                        		RelativeSeriesColour="Previous"
                        		SeriesLegendVisibilty="Collapsed"
                                
                        />
                            <GAChart:ChartSeries
                        		SeriesTitle="{Binding scatterData2.seriesDisplayName}"
                        		DisplayMember="date"
                        		ValueMember="amount"
                        		ItemsSource="{Binding scatterData2.Items}"
                                
                        		DataPointType="{x:Type GAChart:GAScatterPiece}"
                                 DataPointStyle="{StaticResource RectangleFilledStyle}"
                                DataPointSelectedStyle="{StaticResource NotFilledCircleStyle}"
                                
                        />
                            <GAChart:ChartSeries
                        		SeriesTitle="{Binding scatterData3.seriesDisplayName}"
                        		DisplayMember="date"
                        		ValueMember="amount"
                        		ItemsSource="{Binding scatterData3.Items}"
                        		DataPointType="{x:Type GAChart:GALinePiece}"
                                
                        />
                        </GAChart:GAMultipleTypeSeriesChart.Series>
                    </GAChart:GAMultipleTypeSeriesChart>

Last edited Oct 8, 2015 at 3:12 AM by gravityapps, version 6