Hi,
i have a datachart that has the same datasource as the pivotgrid and using an olap axis.
<ig:XamDataChart Grid.Row="1" Grid.Column="0" x:Name="xmOlapDataChart" VerticalZoombarVisibility="Visible" VerticalZoomable="True" HorizontalZoombarVisibility="Visible" HorizontalZoomable="True"> <ig:XamDataChart.Axes> <ig:OlapXAxis x:Name="olapXAxis" DataSource="{StaticResource DataSource}" SeriesInitialing="olapXAxis_SeriesInitialing" SeriesCreating="olapXAxis_SeriesCreating" OlapAxisSource="Columns" AutoGenerateSeries="True" Label="{}{Date}" YAxis="{Binding ElementName=xmYAxis1}"/> <ig:NumericYAxis x:Name="xmYAxis1" MinimumValue="0" /> </ig:XamDataChart.Axes> </ig:XamDataChart>
<ig:XamDataChart Grid.Row="1" Grid.Column="0" x:Name="xmOlapDataChart" VerticalZoombarVisibility="Visible" VerticalZoomable="True" HorizontalZoombarVisibility="Visible" HorizontalZoomable="True"> <ig:XamDataChart.Axes> <ig:OlapXAxis x:Name="olapXAxis" DataSource="{StaticResource DataSource}"
SeriesInitialing="olapXAxis_SeriesInitialing" SeriesCreating="olapXAxis_SeriesCreating"
OlapAxisSource="Columns" AutoGenerateSeries="True"
Label="{}{Date}"
YAxis="{Binding ElementName=xmYAxis1}"/> <ig:NumericYAxis x:Name="xmYAxis1" MinimumValue="0" /> </ig:XamDataChart.Axes> </ig:XamDataChart>
the functions for creating the stacked series is below:
private void olapXAxis_SeriesCreating(object sender, SeriesCreatingEventArgs e) { e.UserCreate = true; // creating the stacked fragments StackedFragmentSeries stackedFragment = new StackedFragmentSeries(); stackedFragment.ValueMemberPath = e.SeriesInfo.Title;
// adding stacked fragment to the stacked column series
series.Series.Add(stackedFragment); // adding the stacked column series to the data chart e.Series = series; } private void olapXAxis_SeriesInitialing(object sender, SeriesInitialingEventArgs e) { series = new StackedColumnSeries(); }
i have also added an XamZoombar to my chart:
<ig:XamZoombar x:Name="xmZoombar" Height="30" Grid.Column="0" Grid.Row="1" Margin="30,-6,13,5" Style="{StaticResource XamZoombarStyle1}" Background="Transparent" SmallChange="0.0119" > <ig:XamZoombar.HorizontalPreviewContent> <ig:XamDataChart x:Name="DataChartpreview" HorizontalZoombarVisibility="Collapsed" HorizontalZoomable="True" VerticalZoomable="False" VerticalZoombarVisibility="Collapsed" IsHitTestVisible="False" IsTabStop="False" PlotAreaBorderBrush="#efefef" PlotAreaBackground="#efefef" WindowResponse="Immediate" Background="{x:Null}" GridMode="None" Margin="0" Padding="0"> <ig:XamDataChart.Axes> <ig:NumericYAxis x:Name="yAxispreview" Interval="1" MinimumValue="0" MaximumValue="100"> <ig:NumericYAxis.LabelSettings> <ig:AxisLabelSettings Visibility="Collapsed" /> </ig:NumericYAxis.LabelSettings> </ig:NumericYAxis> <ig:OlapXAxis x:Name="xAxispreview" YAxis="{Binding ElementName=yAxispreview}"> <ig:OlapXAxis.LabelSettings> <ig:AxisLabelSettings Visibility="Collapsed"/> </ig:OlapXAxis.LabelSettings> </ig:OlapXAxis> </ig:XamDataChart.Axes> </ig:XamDataChart> </ig:XamZoombar.HorizontalPreviewContent> </ig:XamZoombar>
i want the xamzoombar to have a spline series chart in it representing the data of the datachart. how is that possible?
Thanks,
Nazha
Hello,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Nazha,
I have been investigating how the functionality that you are looking for can be achieved and I have created a sample application for you, in which I am using the ResultChanged event of the FlatDataSource in order to create a data source for the SplineLineSeries in the XamDataChart in the preview of the XamZoombar.
Please let me know if you need any further assistance on the matter.