Settings

There are numerous settings available for altering the charts. The below are accessed from the xaml markup for the chart.

GAMultipleTypeSeriesChart Settings

Setting Information
ChartTitle The text for the title. It will default to ChartTitle if not supplied
ChartSubTitle The text for the title. It will default to ChartSubTitle if not supplied
ChartTitleVisibility Will hide or show both the Title and Subtitle
ChartLegendVisibility Show or hide the series descriptor
Width
Height
Foreground Sets the colour for the Title, Subtitle, x axis number and series legend descriptor
Background Chart background
BorderBrush
BorderThickness
Font Size The size of the series descriptor and x-axis numbers.
Selected Item Represents the item that is currently clicked on
Pallette Sets the palette for the series
ToolTipFormat Control over the format of the tool tip ex."{}Caption: {0}, Value: '{1}', Series: '{2}', Percentage: {3:P2}"
IsRowColumnSwitched Switch the row and columns around

ChartSeries settings

Setting Information
SeriesTitle The title for the series - must be not null and must be unique
ItemsSource The data bound list of DisplayMembers and ValueMembers
DisplayMember The y-axis value (if row and column not switched
ValueMember The x-axis value (if row and column not switched
DataPointType Defines the class to draw the datapoints. GAColumnPiece, GAScatterPiece, GALinePiece are the 3 suppied
DataPointStyle Defines the style sued to draw the datapoints. Defaults are GALineStyle, GAColumnPieceStyle, GAScatterBulletStyle
DataPointSelectedStyle Defines the style to draw the datapoints when they have been selected. GAColumnPieceSelectedStyle and GAScatterBulletSelectedStyle are the 2 suppied
SeriesLegendVisibilty Show or hide the legend for this series
RelativeSeriesColour Set the colour of this series to the Previous series, the Next Series, or the Default value. This can be used to keep scatter points the same colour as the previous drawn line (for example)
RelativeSeriesColour Set the colour of this series to the Previous series, the Next Series, or the Default value. This can be used to keep scatter points the same colour as the previous drawn line (for example)
SeriesLegendStyle The style used to draw the legend - if you implement your own datapoint style you should change this too

Notes

Example

The below code draws a chart 400 x 400, allowing for column switching and item selection via bound properties.

  • There is a series of columns using the default style (and so the first pallette colour).
  • There is then a Scatter piece using the default style (and will get the second pallette colour).
  • Next is a line, using the default style. The RelativeSeriesColour is set to 'Previous', so instead of getting the 3rd Pallette colour, it will still have the second colour (ie tha same as the scatter above). This is bound to the same data series as the scatter piece (though with a different series name), so it will appear that there is a line, with scatter pieces at each datapoint.
  • Next is a scatter piece with custom styles. These styles happen to define their own colours.
  • Last is another line series, with defaults, so will pick up the 3rd Pallette colour.

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

                        <GAChart:GAMultipleTypeSeriesChart.Series >
                            <GAChart:ChartSeries
                        		SeriesTitle="Column
                        		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 NotFilledCircleStyle}"
                                DataPointSelectedStyle="{StaticResource  RectangleFilledStyle}"
                                SeriesLegendStyle="{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:21 AM by gravityapps, version 18