Hi, is it possible to integrate the pivot with a pie chart?
Something like this but with a pie
https://docs.telerik.com/devtools/wpf/controls/radpivotgrid/features/radchartview-integration
Thank you
Hi Guys,
I've got a very simple example I have been trying to get to work, specifically, I am binding a RadCartesianChart with a stacked barseries. However unfortunately I have been unable to get the RadLegend control to work with my example.
So my model looks like this.
public class DissectionMonthlySales
{
public DateTime Date { get; set; }
public string Name { get; set; }
public decimal Total { get; set; }
public Brush Color { get; private set; }
public override string ToString()
{
return string.Format("{0} - {1:c}", this.Name, this.Total);
}
}
and my chart xaml looks like this
<
telerik:RadCartesianChart
x:Name
=
"SalesByDissectionsChart"
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartTooltipBehavior
Placement
=
"Top"
/>
</
telerik:RadCartesianChart.Behaviors
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeCategoricalAxis
LabelFitMode
=
"Rotate"
LabelFormat
=
"MMM-yyyy"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
LabelFormat
=
"c0"
Minimum
=
"0"
SmartLabelsMode
=
"SmartStep"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:BarSeries
x:Name
=
"SalesByDissectionSeries"
CombineMode
=
"Stack"
ValueBinding
=
"Total"
StackGroupKey
=
"Name"
CategoryBinding
=
"Date"
ItemsSource
=
"{Binding}"
ShowLabels
=
"False"
>
<
telerik:BarSeries.TooltipTemplate
>
<
DataTemplate
>
<
Border
Padding
=
"4"
BorderBrush
=
"LightGray"
>
<
Border.Background
>
<
SolidColorBrush
Opacity
=
"0.7"
Color
=
"SlateGray"
/>
</
Border.Background
>
<
Border.BitmapEffect
>
<
DropShadowBitmapEffect
/>
</
Border.BitmapEffect
>
<
TextBlock
Foreground
=
"White"
Text
=
"{Binding DataItem}"
/>
</
Border
>
</
DataTemplate
>
</
telerik:BarSeries.TooltipTemplate
>
<
telerik:BarSeries.PointTemplate
>
<
DataTemplate
>
<
Rectangle
Fill
=
"{Binding DataItem.Color}"
/>
</
DataTemplate
>
</
telerik:BarSeries.PointTemplate
>
</
telerik:BarSeries
>
</
telerik:RadCartesianChart
>
and my radlegend looks like this.
<
telerik:RadLegend
x:Name
=
"RadLegend"
Margin
=
"6"
Items
=
"{Binding LegendItems, ElementName=SalesByDissectionsChart}"
/>
Basically what I want to achieve is the ability to display the StackGroup items in the radlegend.
However no matter what I do Chart.LegendItems seems to contain zero elements and I consequently can't get it to display my stacked groups in the legend.
Can anyone provide any guidance on what I might be doing wrong?
Have minor ticks and grid lines gone away forever, or is it possible to add them to a RadCartesianChart?
Thanks!
Brad.
I'm trying to create a LineSeries chart with two series of data which are displayed on top of each other. The display data is data bound to series1 and series2. When I use the code below the two graphs are adjacent to each other (series1 on the left and series2 on the right). How can I get the two series to display on top of each other?
<telerik1:RadCartesianChart x:Name="RadChart1">
<telerik1:RadCartesianChart.HorizontalAxis>
<telerik1:CategoricalAxis
x:Name="AxisX"
Title="Length (km)"
IsStepRecalculationOnZoomEnabled="True"
LabelFormat="{}{0:0.000}"
MajorTickInterval="1000"
PlotMode="OnTicks"
SmartLabelsMode="SmartStep"
TitleTemplate="{DynamicResource BoldAxisTitle}" />
</telerik1:RadCartesianChart.HorizontalAxis>
<telerik1:RadCartesianChart.VerticalAxis>
<telerik1:LinearAxis
x:Name="AxisY"
Title="dB"
MajorStep="5"
Maximum="40"
Minimum="0"
TitleTemplate="{DynamicResource BoldAxisTitle}" />
</telerik1:RadCartesianChart.VerticalAxis>
<telerik1:RadCartesianChart.Series>
<telerik1:LineSeries
CategoryBinding="XVal"
ItemsSource="{Binding series1}"
Stroke="RoyalBlue"
StrokeThickness="1"
ValueBinding="YVal">
</telerik1:LineSeries>
<telerik1:LineSeries
CategoryBinding="XVal"
ItemsSource="{Binding series2}"
Stroke="Purple"
StrokeThickness="1"
ValueBinding="YVal">
</telerik1:LineSeries>
</telerik1:RadCartesianChart.Series>
</telerik1:RadCartesianChart>
Hi Team,
I would like to set few styles, namely TextDecorations like StrikeThrough, Underline and other styles like Horizontal Alignment, Boldness and Font Style programmatically by creating a FrameworkElementFactory of type Textblock and then assigning the same to a DataTemplate of type GridViewRow, which is then assigned to the ContentTemplateProperty of the GridViewRow; but to no avail.
Could you please guide me on the same.
Please let me know if any details/clarifications are required.
Thanks,
Swapnil Ramteke
Hello
I used the following code to export to image
Dim filename As String = "C:\Export\ExportedChart.png"
Using fileStream As Stream = File.Open(filename, FileMode.OpenOrCreate)
Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(Me.chart, fileStream, New PngBitmapEncoder())
End Using
But the exported image misses the X and Y coordinate values. How can I export the image exactly as seen in the UI
I would like to export to PDF as well.
How can I display the X and Y values in the tool tip for radCartesianchart bar series
In radChart, there is a option as below:
<telerik:BarSeriesDefinition ItemToolTipFormat="the X value is #X, the Y value is #Y"ShowItemToolTips="True" />
</telerik:SeriesMapping.SeriesDefinition>