hee Posted March 3, 2009 Report Share Posted March 3, 2009 hi. I've already displayed dataview with chart, adding a dataview element to wpf xml but, I want to swap rows and coloumns, but i can't. and I want to display percentages also data values in same dataview matrix. Thx. Quote Link to comment Share on other sites More sharing options...
JuanC Posted March 4, 2009 Report Share Posted March 4, 2009 Currently we switch the dataview display depending on the location. If it is docked to the left or right, each dataview row will correspond to an item in your data. If it is docked to the top or bottom, we display each item on a different column. This is done primarily to try to take advantage of the available space assuming a typical chart has more items than series. We will consider adding a property to control this in future builds. About displaying percentages, we do not have a specific feature that will help you accomplish this. We will research if we can support this in future builds as well. Regards, JuanC Quote Link to comment Share on other sites More sharing options...
JuanC Posted March 4, 2009 Report Share Posted March 4, 2009 Future builds will support the following new properties DataView.Fields.Orientation: Specifies whether fields should have a vertical, horizontal or Auto orientationSeriesField.Template: Allows to template a SeriesField. You can use this in conjunction with our ToolTipConverter e.g. <cfx:Chart Gallery="Pie" x:Name="chart1" ItemsSource="{Binding Source={StaticResource myXmlData}}"> <cfx:Chart.Series> <cfx:SeriesAttributes BindingPath="@Sales"/> </cfx:Chart.Series> <cfx:Chart.AxisX> <cfx:Axis> <cfx:Axis.Labels> <cfx:AxisLabelAttributes BindingPath="@Name"/> </cfx:Axis.Labels> </cfx:Axis> </cfx:Chart.AxisX> <cfx:Chart.DataView> <cfx:DataView Visibility="Visible"> <cfx:DataView.Fields> <cfx:DataViewFieldAttributes Orientation="Vertical"> <cfx:DataViewFieldAttributes.Items> <cfx:AxisField ShowMarkers="true"/> <cfx:SeriesField SeriesIndex="0"> <cfx:SeriesField.Template> <DataTemplate> <DataTemplate.Resources> <cfxConverters:TooltipConverter x:Key="tooltipConverter"/> </DataTemplate.Resources> <TextBlock Text="{Binding Path=Self, Converter={StaticResource tooltipConverter}, ConverterParameter=%v (%p%%)}" Margin="{Binding Path=Margin}" Foreground="{Binding Path=Foreground}" FontFamily="{Binding Path=FontFamily}" FontWeight="{Binding Path=FontWeight}" FontSize="{Binding Path=FontSize}" FontStyle="{Binding Path=FontStyle}" HorizontalAlignment="Right" VerticalAlignment="Center"/> <DataTemplate.Triggers> <DataTrigger Binding="{Binding Path=Dimmed}"> <DataTrigger.Value> <sys:Boolean>True</sys:Boolean> </DataTrigger.Value> <Setter Property="Opacity" Value="0.25" /> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> </cfx:SeriesField.Template> </cfx:SeriesField> </cfx:DataViewFieldAttributes.Items> </cfx:DataViewFieldAttributes> </cfx:DataView.Fields> </cfx:DataView> </cfx:Chart.DataView></cfx:Chart>A little verbose but it will get the job done Regards, JuanC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.