Currently, RadChartView offers exporting to a Bitmap in one of the following formats: https://docs.microsoft.com/en-us/dotnet/api/system.drawing.imaging.imageformat?view=netframework-4.8
It would be nice to have export functionality to a vector image.
The same issue can be observed in a DPI-aware application on higher scaling Workaround: set the RadControl.EnableDpiScaling property to false public partial class Form1 : Form { public Form1() { RadControl.EnableDpiScaling = false; InitializeComponent(); LineSeries lineSeries = new LineSeries(); lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan")); lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr")); lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul")); lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct")); this.radChartView1.Series.Add(lineSeries); LineSeries lineSeries2 = new LineSeries(); lineSeries2.DataPoints.Add(new CategoricalDataPoint(18, "Jan")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(15, "Apr")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(17, "Jul")); lineSeries2.DataPoints.Add(new CategoricalDataPoint(22, "Oct")); this.radChartView1.Series.Add(lineSeries2); LassoZoomController lassoZoomController = new LassoZoomController(); radChartView1.Controllers.Add(lassoZoomController); } private void radButton1_Click(object sender, EventArgs e) { this.radChartView1.ExportToImage(@"..\..\image.png", this.radChartView1.Size); } }
The new controller should allow lasso selection of data points without zooming the view port.
https://demos.telerik.com/kendo-ui/radar-charts/radar-column The attached proejct shows a sample implementation.
Workaround: Sub New() InitializeComponent() AddHandler Me.RadChartView1.CreateRenderer, AddressOf CreateRenderer AddHandler Me.RadChartView1.LabelFormatting, AddressOf LabelFormatting Dim barSeries As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName") barSeries.ShowLabels = True barSeries.DataPoints.Add(New CategoricalDataPoint(177, "Harley")) barSeries.DataPoints.Add(New CategoricalDataPoint(128, "White")) barSeries.DataPoints.Add(New CategoricalDataPoint(143, "Smith")) barSeries.DataPoints.Add(New CategoricalDataPoint(111, "Jones")) barSeries.DataPoints.Add(New CategoricalDataPoint(118, "Marshall")) Me.RadChartView1.Series.Add(barSeries) Dim barSeries2 As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName") barSeries2.ShowLabels = True barSeries2.DataPoints.Add(New CategoricalDataPoint(153, "Harley")) barSeries2.DataPoints.Add(New CategoricalDataPoint(141, "White")) barSeries2.DataPoints.Add(New CategoricalDataPoint(130, "Smith")) barSeries2.DataPoints.Add(New CategoricalDataPoint(88, "Jones")) barSeries2.DataPoints.Add(New CategoricalDataPoint(109, "Marshall")) Me.RadChartView1.Series.Add(barSeries2) End Sub Private Sub LabelFormatting(sender As Object, e As Telerik.WinControls.UI.ChartViewLabelFormattingEventArgs) Dim dataPoint As CategoricalDataPoint = TryCast(e.LabelElement.DataPoint, CategoricalDataPoint) e.LabelElement.Text = "Value: " & Environment.NewLine & dataPoint.Value e.LabelElement.BackColor = Color.Yellow End Sub Private Sub CreateRenderer(sender As Object, e As ChartViewCreateRendererEventArgs) e.Renderer = New CustomCartesianRenderer(TryCast(e.Area, CartesianArea)) End Sub Public Class CustomCartesianRenderer Inherits CartesianRenderer Public Sub New(area As CartesianArea) MyBase.New(area) End Sub Protected Overrides Sub Initialize() MyBase.Initialize() For i As Integer = 0 To Me.DrawParts.Count - 1 Dim labelPart As BarLabelElementDrawPart = TryCast(Me.DrawParts(i), BarLabelElementDrawPart) If labelPart IsNot Nothing Then Me.DrawParts(i) = New CustomLabelElementDrawPart(DirectCast(labelPart.Element, BarSeries), Me) End If Next End Sub End Class Public Class CustomLabelElementDrawPart Inherits BarLabelElementDrawPart Public Sub New(owner As ChartSeries, renderer As IChartRenderer) MyBase.New(owner, renderer) End Sub Public Overrides Sub Draw() For Each dataPointElement As DataPointElement In Me.Element.Children For Each label As LabelElement In dataPointElement.Children label.ForeColor = Color.Transparent Next Next MyBase.Draw() Dim graphics As Graphics = TryCast(Me.Renderer.Surface, Graphics) Dim radGraphics As New RadGdiGraphics(graphics) Dim slot As RadRect Dim rect As Rectangle Dim stringFormat As New StringFormat() stringFormat.Alignment = StringAlignment.Center stringFormat.LineAlignment = StringAlignment.Center For Each dataPointElement As DataPointElement In Me.Element.Children For Each label As LabelElement In dataPointElement.Children label.ForeColor = Color.Transparent slot = label.GetLayoutSlot() slot = AdjustLayoutSlot(slot, label.DataPointElement) rect = ChartRenderer.ToRectangle(slot) Using brush As Brush = New SolidBrush(Color.Red) Dim drawLocation As New PointF() drawLocation.X = rect.X + label.Padding.Left drawLocation.Y = rect.Y + label.Padding.Top graphics.DrawString(label.Text, label.Font, brush, rect, stringFormat) End Using Next Next End Sub End Class
When the legend has many items a scrollbar should appear.
Add Range series similar to those provided by WPF/SL http://demos.telerik.com/silverlight/#ChartView/Gallery/Range
The lasso controller should zoom vertically as well.
It would be very helpful if you either added ScaleBreaks (as in the deprecated RadChart control - http://www.telerik.com/help/winforms/chart-features-scale-breaks.html) or provided an alternative way. I use them a great deal with bar charts and logarithmic scales are not optimal.
Currently, when you zoom in and out, the position the mouse is initially hovering is not kept, while it should
ADD. RadChartView - add waterfall series type.
Add the ability a user to be able to use a Custom DashStyle in the following scenario: this.Chart.ShowLegend = true; this.Chart.Series.Add(new LineSeries() { LegendTitle = "DDDD" }); this.Chart.ChartElement.LegendElement.Items[0].Element.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Custom; for (int i = 0; i < 10; i++) { this.Chart.Series[0].DataPoints.Add(i); } The following article describes how to use a Custom DashStyle: How to: Draw a Custom Dashed Line