Telerik Forums
UI for WPF Forum
1 answer
134 views

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

Dilyan Traykov
Telerik team
 answered on 28 Nov 2017
3 answers
398 views

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?

 

 

 

Martin Ivanov
Telerik team
 answered on 28 Nov 2017
13 answers
238 views
I need a line chart where the user can click and drag a data point up and down. When the user releases the data point I will need to calculate various values. Is this possible with your controls and if so is there a demo available?
Martin Ivanov
Telerik team
 answered on 28 Nov 2017
3 answers
181 views

Have minor ticks and grid lines gone away forever, or is it possible to add them to a RadCartesianChart?

 

Thanks!

Brad.

Martin Ivanov
Telerik team
 answered on 28 Nov 2017
11 answers
235 views

I have an sporadically unexplicable OverflowException in RibbonView. 

All information i have from the user is, they are scrolling or using the mousewheel inside the window 
and a  small Stack Trace

Exception:
########################################
Message: UnhandledException OverflowException "Die arithmetische Operation hat einen Überlauf verursacht."(German)
Source: Telerik.Windows.Controls.RibbonView
Location: Telerik.Windows.Controls.RibbonView.Shell.WindowChromeWorker._HandleNCHitTest

Stack Trace:
   bei Telerik.Windows.Controls.RibbonView.Shell.WindowChromeWorker._HandleNCHitTest(WM uxoMsg, IntPtr param, IntPtr legParam, Boolean& handled)
   bei Telerik.Windows.Controls.RibbonView.Shell.WindowChromeWorker._WndProc(IntPtr hwnd, Int32 msg, IntPtr param, IntPtr legParam, Boolean& handled)
   bei System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

Any idees?

WPF Telerik Version 2012.3.1129.40
Martin Ivanov
Telerik team
 answered on 28 Nov 2017
3 answers
202 views

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>

Dinko | Tech Support Engineer
Telerik team
 answered on 28 Nov 2017
9 answers
291 views
Hello,
I have searched the forum but have not found a way to get notification when:
1.  a column is moved 
2.  a column is resized

What is the straightforward way to capture these events? I'm trying to do this from a custom control that extends RadGridView.

I'm using Q2 release.

Thanks,
Laura
parthiv
Top achievements
Rank 1
 answered on 28 Nov 2017
1 answer
226 views

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

Vladimir Stoyanov
Telerik team
 answered on 27 Nov 2017
1 answer
314 views

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.

Dilyan Traykov
Telerik team
 answered on 27 Nov 2017
3 answers
226 views

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>

Martin Ivanov
Telerik team
 answered on 27 Nov 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?