8 Answers, 1 is accepted
You could access the Brush of the Appointment's Category using the CategoryBrush property. Please, check the attached sample project that demonstrates how that could be achieved.
Hopes this helps.
Regards,
Nasko
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Hi Team,
<telerik:RadPieChart Palette="Windows8" Grid.Column="1" Grid.Row="0">
<telerik:RadPieChart.Series>
<telerik:DoughnutSeries AngleRange="180,180" >
<telerik:DoughnutSeries.DataPoints >
<telerik:PieDataPoint Value="43.46" Label=""/>
</telerik:DoughnutSeries.DataPoints>
</telerik:DoughnutSeries>
</telerik:RadPieChart.Series>
</telerik:RadPieChart>
I use this for Half Pie chart in WPF. I want to change the color of my selected area. With out using "Palette".
please assist for that.
Thank You,
srivatshan BR.
You can change the color of the selected area of the DoughnutSeries by specifying the following style as the DefaultSliceStyle:
<
telerik:DoughnutSeries.DefaultSliceStyle
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"Blue"
/>
<
Style.Triggers
>
<
DataTrigger
Binding
=
"{Binding IsSelected}"
Value
=
"True"
>
<
Setter
Property
=
"Fill"
Value
=
"Yellow"
/>
</
DataTrigger
>
</
Style.Triggers
>
</
Style
>
</
telerik:DoughnutSeries.DefaultSliceStyle
>
For your convenience, I've prepared a small sample project demonstrating this approach.
Please have a look and let me know whether this would work for you.
Regards,
Dilyan Traykov
Progress Telerik
Hi Dilyan,
Thank you for your response.its working awesome.
can you please help me to bind value within the chart like '52' dynamically.
I attached the example. please assist for that.
Thank You,
Srivatshan BR.
Hi Dilyan,
<telerik:RadPieChart Grid.Column="1" Grid.Row="0" >
<telerik:RadPieChart.Series>
<telerik:DoughnutSeries AngleRange="180,180" SelectedPointOffset="0" ItemsSource="{Binding SelectedItems}" ValueBinding="nsv" ShowLabels="True">
<telerik:PieSeries.LabelDefinitions>
<telerik:ChartSeriesLabelDefinition Margin="50,0,0,0" >
<telerik:ChartSeriesLabelDefinition.Template>
<DataTemplate>
<TextBlock Text="5" VerticalAlignment="Bottom" FontWeight="Bold" FontSize="20"/>
</DataTemplate>
</telerik:ChartSeriesLabelDefinition.Template>
</telerik:ChartSeriesLabelDefinition>
</telerik:PieSeries.LabelDefinitions>
<telerik:DoughnutSeries.SliceStyles>
<Style TargetType="Path">
<Setter Property="Fill" Value="YellowGreen"/>
</Style>
<Style TargetType="Path">
<Setter Property="Fill" Value="Gray"/>
</Style>
</telerik:DoughnutSeries.SliceStyles>
</telerik:DoughnutSeries>
</telerik:RadPieChart.Series>
</telerik:RadPieChart>
In this code the "nsv" that observable collection having two rows.
so,it shows two value in mid of the chart.
but i need only one value with in that.
please assist to show one value with in that.
Screenshot of the above code output attached.
As accessing the first label of the series will not be that straightforward, I can suggest simply defining a TextBlock below the chart, bound to the value of the first data point, like so:
<
StackPanel
>
<
telerik:RadPieChart
Grid.Column
=
"1"
Grid.Row
=
"0"
>
<
telerik:RadPieChart.Series
>
<
telerik:DoughnutSeries
AngleRange
=
"180,180"
SelectedPointOffset
=
"0"
ItemsSource
=
"{Binding SelectedItems}"
ValueBinding
=
"nsv"
ShowLabels
=
"False"
>
<
telerik:DoughnutSeries.SliceStyles
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"YellowGreen"
/>
</
Style
>
<
Style
TargetType
=
"Path"
>
<
Setter
Property
=
"Fill"
Value
=
"Gray"
/>
</
Style
>
</
telerik:DoughnutSeries.SliceStyles
>
</
telerik:DoughnutSeries
>
</
telerik:RadPieChart.Series
>
</
telerik:RadPieChart
>
<
TextBlock
Margin
=
"0 -50 0 0"
Text
=
"{Binding SelectedItems[0].nsv}"
HorizontalAlignment
=
"Center"
/>
</
StackPanel
>
Please note, however, that you may be able to achieve the same result by using the RadGauge control instead.
Could you please have a look at the documentation of the radial gauge control, check the available demos in our WPF Controls Samples application as well as in the SDK Samples Browser and let me know if it would work for you?
I'm looking forward to your reply.
Regards,
Dilyan Traykov
Progress Telerik
Hi Dilyan,
Thank You,Awesome it's looking same as i expected.
Hi Team,
I am using <telerik:RadGridView> with <telerik:RadNumericUpDown>.
The <telerik:RadNumericUpDown> column focus was changing while scrolling.
How can i stop the focus while scrolling.
Please assist to fix.