Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
151298 | Feb 6,2020 07:27 AM UTC | Feb 25,2020 12:55 PM UTC | WPF | 3 |
![]() |
Tags: SfChart |
Hii,
I have a solutionXAML code
<Grid Name="LayoutRoot"> <Grid.Resources> <Style x:Key="CategoryLegendItem" TargetType="DVC:LegendItem"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="DVC:LegendItem"> <StackPanel Orientation="Horizontal"> <CheckBox VerticalAlignment="Center" IsChecked="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Owner.Visibility, Mode=TwoWay, Converter={StaticResource BooleanToVisibilityConverter1}}" Margin="0,0,3,0" /> <Rectangle Width="8" Height="8" Fill="{Binding Background}" Stroke="{Binding BorderBrush}" StrokeThickness="1" Margin="0,0,3,0" /> <DV:Title VerticalAlignment="Center" Content="{TemplateBinding Content}" /> </StackPanel> </ControlTemplate> </Setter.Value> </Setter> </Style> </Grid.Resources> <DVC:Chart Name="mcChart" > </DVC:Chart>
C#
ColumnSeries ser = new ColumnSeries { Title = kvpNuclide.Value, IndependentValueBinding = new Binding("Key"), DependentValueBinding = new Binding("Value") }; ser.ItemsSource = null; ser.ItemsSource = listRelease; ser.DataPointStyle = columnStyleAqua; ser.LegendItemStyle = (Style)LayoutRoot.Resources["CategoryLegendItem"]; mcChart.Series.Add(ser);
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.