Completed
Last Updated: 30 Jul 2019 13:03 by ADMIN
Inside the constructor of a form create a pie series and populate it with data. Then add it to a RadChartView. You will notice that there are two legend items per data point.
Approved
Last Updated: 10 Jul 2019 05:32 by ADMIN
Currently, there is no built-in way to indicate an arbitrary area.
Completed
Last Updated: 03 Jul 2019 13:41 by Jonathan
Release R3 2019 (LIB 2019.2.708)
Currently, there is no way to increase the line thickness.
Completed
Last Updated: 03 Jul 2019 11:22 by ADMIN
Release R3 2019 (LIB 2019.2.708)
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);
    }
}
Completed
Last Updated: 03 Jul 2019 11:21 by ADMIN
Release R3 2019 (LIB 2019.2.708)

Use attached to reproduce. 

Workaround:

series.DataPoints.Add(new PieDataPoint(0.01, "Germany"));
series.DataPoints.Add(new PieDataPoint(0.01, "United States"));

 

Completed
Last Updated: 03 Jul 2019 04:10 by ADMIN
Release R3 2018
To reproduce:
- Just add StochasticSlowIndicator to a chart.
Under Review
Last Updated: 20 Jun 2019 07:43 by ADMIN
Approved
Last Updated: 10 Jun 2019 13:32 by ADMIN
How can I achieve the same behaviour as with the obsolete RadChart plotting the area between the maxima of a sine. 
Completed
Last Updated: 31 May 2019 09:37 by ADMIN
To reproduce:

1. Perform zoom and pan operation and click the print/print preview button:
2. You will notice that the printed chart is not exactly the same as the displayed one. Please refer to the attached screenshot.

public Form1()
{
    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);

    ChartPanZoomController panZoomController = new ChartPanZoomController();
    panZoomController.PanZoomMode = ChartPanZoomMode.Horizontal;
    radChartView1.Controllers.Add(panZoomController);
}

private void radButton1_Click(object sender, EventArgs e)
{
    this.radChartView1.PrintPreview();
}

3.The issue also appears when the LassoZoomController is used.
 
Completed
Last Updated: 02 Apr 2019 15:45 by Dimitar
Release R2 2019 (LIB 2019.1.408)

After 1 million the decimal places of the labels are not correct, In your image. the labels on the horizontal axis go 999,992.50 - 999,995.00 - 999,997.5 -  1,000,000.00 - *1,000,003.00(should be 1,000,002.50) - 1,000,005.00 - *1,000,008.00(should be 1,000,007.5)

Completed
Last Updated: 27 Nov 2018 16:14 by Dimitar
To reproduce:
- Add a chart to the form and set series with DataSource
- Close and dispose the form

Workaround:
Set the DataSource property of the series to null prior closing.
Completed
Last Updated: 23 Nov 2018 11:34 by Dimitar
To reproduce:
            WaterfallSeries series = new WaterfallSeries();
            series.ShowLabels = true;

            series.DataPoints.Add(new WaterfallDataPoint(50000, false, false, "Beginning\nBalance"));
            series.DataPoints.Add(new WaterfallDataPoint(17000, false, false, "Jan"));
            series.DataPoints.Add(new WaterfallDataPoint(14000, false, false, "Feb"));
            series.DataPoints.Add(new WaterfallDataPoint(-12000, false, false, "Mar"));
            series.DataPoints.Add(new WaterfallDataPoint(69000, true, false, "Q1"));
            series.DataPoints.Add(new WaterfallDataPoint(-22000, false, false, "Apr"));
            series.DataPoints.Add(new WaterfallDataPoint(-18000, false, false, "May"));
            series.DataPoints.Add(new WaterfallDataPoint(500, false, false, "Jun"));
            series.DataPoints.Add(new WaterfallDataPoint(-30000, true, false, "Q2"));
            series.DataPoints.Add(new WaterfallDataPoint(39000, false, true, "Ending\nBalance"));
            this.radChartView1.Series.Add(series);

            CartesianGridLineAnnotation annotation1 = new CartesianGridLineAnnotation();
            annotation1.Label = "Annotation";
            annotation1.ForeColor = Color.Lime;
            annotation1.BackColor = Color.Black;
            this.radChartView1.Annotations.Add(annotation1);

Workaround:

        public RadForm1()
        {
            InitializeComponent();
            this.radChartView1.CreateRenderer += radChartView1_CreateRenderer;

            WaterfallSeries series = new WaterfallSeries();
            series.ShowLabels = true;
     
            series.DataPoints.Add(new WaterfallDataPoint(50000, false, false, "Beginning\nBalance"));
            series.DataPoints.Add(new WaterfallDataPoint(17000, false, false, "Jan"));
            series.DataPoints.Add(new WaterfallDataPoint(14000, false, false, "Feb"));
            series.DataPoints.Add(new WaterfallDataPoint(-12000, false, false, "Mar"));
            series.DataPoints.Add(new WaterfallDataPoint(69000, true, false, "Q1"));
            series.DataPoints.Add(new WaterfallDataPoint(-22000, false, false, "Apr"));
            series.DataPoints.Add(new WaterfallDataPoint(-18000, false, false, "May"));
            series.DataPoints.Add(new WaterfallDataPoint(500, false, false, "Jun"));
            series.DataPoints.Add(new WaterfallDataPoint(-30000, true, false, "Q2"));
            series.DataPoints.Add(new WaterfallDataPoint(39000, false, true, "Ending\nBalance"));
            this.radChartView1.Series.Add(series);
 
            CartesianGridLineAnnotation annotation1 = new CartesianGridLineAnnotation();
            annotation1.Label = "Annotation";
            annotation1.ForeColor = Color.Lime;
            annotation1.BackColor = Color.Black;
            annotation1.PositonOffset = new SizeF(0, -20);
            annotation1.Axis = this.radChartView1.Axes[1] as CartesianAxis;
            annotation1.Value = 70000;
            annotation1.BorderColor = Color.Red;
            annotation1.BorderDashStyle = DashStyle.Solid;
            annotation1.BorderWidth = 1;
            this.radChartView1.Annotations.Add(annotation1);
        }

        private void radChartView1_CreateRenderer(object sender, ChartViewCreateRendererEventArgs e)
        {
            e.Renderer = new CustomCartesianRenderer(e.Area as CartesianArea);
        }
 
        public class CustomCartesianRenderer : CartesianRenderer
        {
            public CustomCartesianRenderer(CartesianArea area) : base(area)
            {
            }
 
            protected override void Initialize()
            {
                base.Initialize();
                for (int i = 0; i <= this.DrawParts.Count - 1; i++)
                {
                    CartesianGridLineAnnotationDrawPart annotationPart = this.DrawParts[i] as CartesianGridLineAnnotationDrawPart;
                    if (annotationPart != null)
                    {
                        this.DrawParts[i] = new CustomCartesianGridLineAnnotationDrawPart((CartesianGridLineAnnotation)annotationPart.Element, this);
                    }
                }
            }
        }

        public class CustomCartesianGridLineAnnotationDrawPart : CartesianGridLineAnnotationDrawPart
        {
            public CustomCartesianGridLineAnnotationDrawPart(CartesianGridLineAnnotation element, CartesianRenderer renderer) : base(element, renderer)
            {
            }

            public override void Draw()
            {
                FieldInfo fi = typeof(CartesianGridLineAnnotation).GetField("model", BindingFlags.NonPublic | BindingFlags.Instance);
                ChartAnnotationModel model = fi.GetValue(this.Element) as ChartAnnotationModel;
                RectangleF
                rect = ChartRenderer.ToRectangleF(model.LayoutSlot);
                rect.Offset(this.ViewportOffsetX, this.ViewportOffsetY);

                Graphics graphics = this.Renderer.Surface as Graphics;
                RadGdiGraphics radGraphics = new RadGdiGraphics(graphics);

                Rectangle clipRect = ChartRenderer.ToRectangle(this.Element.View.GetArea<CartesianArea>().AreaModel.PlotArea.LayoutSlot);
                clipRect.Offset((int)this.ViewportOffsetX, (int)this.ViewportOffsetY);
                graphics.SetClip(clipRect);

                GraphicsPath path = new GraphicsPath();
                path.AddLine(rect.Location, new PointF(rect.Right, rect.Bottom));

                BorderPrimitiveImpl border = new BorderPrimitiveImpl(this.Element, null);
                border.PaintBorder(radGraphics, null, path, rect);

                rect.Size = graphics.MeasureString(this.Element.Label, this.Element.Font);
                rect.Offset(this.Element.PositonOffset.Width + 1, this.Element.PositonOffset.Height + 1);

                TextParams tp = new TextParams();
                tp.font = this.Element.Font;
                tp.foreColor = this.Element.ForeColor;
                tp.paintingRectangle = rect;
                tp.text = this.Element.Label;

                FillPrimitiveImpl fill = new FillPrimitiveImpl(this.Element, null);
                fill.PaintFill(radGraphics, null, rect);
            
                TextPrimitiveHtmlImpl text = new TextPrimitiveHtmlImpl();
                text.PaintPrimitive(radGraphics, 0f, new SizeF(1f, 1f), tp);
            }
        }
Completed
Last Updated: 07 Nov 2018 14:13 by ADMIN
Note: similar to the axis, the series should also have ClipLabels property which will control whether the labels will be clipped or not.

How to reproduce: zoom and pan along the chart
public Form1()
{
    InitializeComponent();

    this.radChartView1.CreateRenderer += radChartView1_CreateRenderer;
    this.radChartView1.ShowPanZoom = true;

    BarSeries barSeries = new BarSeries();
    Random rand = new Random();
    for (int i = 1; i < 10; i++)
    {
        barSeries.DataPoints.Add(new CategoricalDataPoint(rand.Next(100), i));
    }

    barSeries.ShowLabels = true;
    this.radChartView1.Series.Add(barSeries);
}

Workaround:
 public partial class Form1 : Form
 {
     public Form1()
     {
         InitializeComponent();

         this.radChartView1.CreateRenderer += radChartView1_CreateRenderer;
         this.radChartView1.ShowPanZoom = true;

         BarSeries barSeries = new BarSeries();
         Random rand = new Random();
         for (int i = 1; i < 10; i++)
         {
             barSeries.DataPoints.Add(new CategoricalDataPoint(rand.Next(100), i));
         }

         barSeries.ShowLabels = true;
         this.radChartView1.Series.Add(barSeries);
     }

     private void radChartView1_CreateRenderer(object sender, ChartViewCreateRendererEventArgs e)
     {
         e.Renderer = new CustomCartesianRenderer(e.Area as CartesianArea);
     }
 }

 public class CustomCartesianRenderer : CartesianRenderer
 {
     public CustomCartesianRenderer(CartesianArea area)
         : base(area)
     { }
     protected override void Initialize()
     {
         base.Initialize();

         for (int i = 0; i < this.DrawParts.Count; i++)
         {
             BarLabelElementDrawPart labelPart = this.DrawParts[i] as BarLabelElementDrawPart;
             if (labelPart != null)
             {
                 this.DrawParts[i] = new CustomLabelElementDrawPart((BarSeries)labelPart.Element, this);
             }
         }
     }
 }

 public class CustomLabelElementDrawPart : BarLabelElementDrawPart
 {
     public CustomLabelElementDrawPart(ChartSeries owner, IChartRenderer renderer)
         : base(owner, renderer)
     { }
     
     public override void Draw()
     {
         Graphics graphics = this.Renderer.Surface as Graphics;
         CartesianSeries cartesianSeries = this.Element as CartesianSeries;
         if (cartesianSeries != null)
         {
             CartesianArea area = (CartesianArea)cartesianSeries.GetType().GetField("area", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(cartesianSeries);
             RectangleF clipRect = (RectangleF)area.GetType().GetMethod("GetCartesianClipRect", BindingFlags.Instance | BindingFlags.NonPublic).Invoke(area, new object[] { });//.GetCartesianClipRect();
             graphics.SetClip(clipRect);
         }

         base.Draw();

         graphics.ResetClip();
     }
 }
Approved
Last Updated: 06 Nov 2018 14:45 by Eric Moreau
ADMIN
Created by: Nikolay
Comments: 18
Category: ChartView
Type: Feature Request
14
3D Charts will be a nice addition to the WinForms suite
Declined
Last Updated: 06 Nov 2018 09:47 by ADMIN
To reproduce: please refer to the attached sample project  and gif file illustrating the behavior on my end. 

Note: similar to the axis, the series should also have ClipLabels property which will control whether the labels will be clipped or not.

Workaround: use custom renderer:

 Sub New()

        InitializeComponent() 

        AddHandler Me.RadChartView1.CreateRenderer, AddressOf RadChartView1_CreateRenderer

        Dim barSeries As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
        barSeries.Name = "Q1"
        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.Name = "Q2"
        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)


        Dim lassoZoomController As New ChartPanZoomController()
        RadChartView1.Controllers.Add(lassoZoomController)

    End Sub
    
    Public Class CustomLabelElementDrawPart
        Inherits BarLabelElementDrawPart
        Public Sub New(owner As ChartSeries, renderer As IChartRenderer)
            MyBase.New(owner, renderer)

        End Sub

        Public Overrides Sub Draw()
            If Not Me.Element.ShowLabels Then
                Return
            End If

            Dim graphics As Graphics = TryCast(Me.Renderer.Surface, Graphics)
            Dim radGraphics As RadGdiGraphics = New RadGdiGraphics(graphics)
            Dim isSmartLabelsEnabled As Boolean = Me.Element.View.ShowSmartLabels
            Dim isLineToLabelEnabled As Boolean = Me.Element.DrawLinesToLabels

            For Each dataPointElement As DataPointElement In Me.Element.Children
                Dim categoricalDataPoint As CategoricalDataPoint = TryCast(dataPointElement.DataPoint, CategoricalDataPoint)


                For i As Integer = 0 To dataPointElement.Children.Count - 1
                    Dim labelElement As LabelElement = TryCast(dataPointElement.Children(i), LabelElement)

                    If labelElement Is Nothing Then
                        Continue For
                    End If

                    labelElement.OnLabelFormatting(New ChartViewLabelFormattingEventArgs(labelElement))

                    If Not labelElement.IsVisible OrElse String.IsNullOrEmpty(labelElement.Text) Then
                        Continue For
                    End If

                    Dim rect As Rectangle
                    Dim slot As RadRect = labelElement.GetLayoutSlot()

                    If isSmartLabelsEnabled AndAlso labelElement.SmartRectangle <> Rectangle.Empty Then
                        rect = labelElement.SmartRectangle
                    Else
                        slot = AdjustLayoutSlot(slot, labelElement.DataPointElement)
                        rect = ChartRenderer.ToRectangle(slot)
                    End If

                    Dim state As Object = radGraphics.SaveState()
                    Dim horizontalTranslate As Integer = rect.X + rect.Width / 2
                    Dim verticalTranslate As Integer = rect.Y + rect.Height / 2
                    Dim clipRect As RectangleF
                    If TypeOf Me.Renderer Is CartesianRenderer Then
                        Dim size As SizeF = graphics.MeasureString("W", Me.Element.Font)
                        Dim plotRect As RadRect = Me.Element.Model.LayoutSlot
                        plotRect.X += Me.ViewportOffsetX
                        plotRect.Y += Me.ViewportOffsetY
                        clipRect = ChartRenderer.ToRectangleF(plotRect)
                        clipRect.Y -= size.Height / 2.0F
                        clipRect.Height += size.Height
                        clipRect.Width += size.Width * 2.0F
                        graphics.SetClip(clipRect)
                    End If

                    Dim angle As Single = CSng(Me.Element.LabelRotationAngle) Mod 360.0F

                    If angle <> 0 Then
                        radGraphics.TranslateTransform(horizontalTranslate, verticalTranslate)
                        radGraphics.RotateTransform(angle)
                        radGraphics.TranslateTransform(-horizontalTranslate, -verticalTranslate)
                    End If

                    If isLineToLabelEnabled Then
                        Me.DrawConnectingLine(radGraphics, labelElement, dataPointElement, isSmartLabelsEnabled AndAlso labelElement.SmartRectangle <> Rectangle.Empty)
                    End If

                    If labelElement.BackgroundShape IsNot Nothing Then
                        labelElement.BackgroundShape.Paint(CType(radGraphics.UnderlayGraphics, Graphics), rect)
                    End If

                    Dim fill As Telerik.WinControls.Primitives.FillPrimitiveImpl = New Telerik.WinControls.Primitives.FillPrimitiveImpl(labelElement, Nothing)
                    fill.PaintFill(radGraphics, 0, System.Drawing.Size.Empty, rect)
                    Dim border As Telerik.WinControls.Primitives.BorderPrimitiveImpl = New Telerik.WinControls.Primitives.BorderPrimitiveImpl(labelElement, Nothing)
                    border.PaintBorder(radGraphics, 0, System.Drawing.Size.Empty, rect)

                    Using brush As Brush = New SolidBrush(labelElement.ForeColor)
                        Dim drawRectangle As RectangleF = New RectangleF()
                        drawRectangle.X = rect.X + labelElement.Padding.Left
                        drawRectangle.Y = rect.Y + labelElement.Padding.Top
                        drawRectangle.Width = rect.Width - labelElement.Padding.Right
                        drawRectangle.Height = rect.Height - labelElement.Padding.Bottom
                        Dim format As StringFormat = New StringFormat()
                        format.Alignment = ContentAlignmentToHorizontalStringAlignment(labelElement.TextAlignment)
                        format.LineAlignment = Me.ContentAlignmentToVerticalStringAlignment(labelElement.TextAlignment)
                        graphics.DrawString(labelElement.Text, labelElement.Font, brush, drawRectangle, format)
                    End Using

                    If angle <> 0 Then
                        radGraphics.ResetTransform()
                        radGraphics.RestoreState(state)
                    End If

                    graphics.ResetClip()
                Next
            Next
        End Sub

        Public Function ContentAlignmentToVerticalStringAlignment(ByVal contentAlignment As ContentAlignment) As StringAlignment
            Dim result As StringAlignment

            Select Case contentAlignment
                Case contentAlignment.BottomCenter, contentAlignment.BottomLeft, contentAlignment.BottomRight
                    result = StringAlignment.Far
                Case contentAlignment.TopCenter, contentAlignment.TopLeft, contentAlignment.TopRight
                    result = StringAlignment.Near
                Case Else
                    result = StringAlignment.Center
            End Select

            Return result
        End Function

        Private Function ContentAlignmentToHorizontalStringAlignment(ByVal contentAlignment As ContentAlignment) As StringAlignment
            Dim result As StringAlignment

            Select Case contentAlignment
                Case contentAlignment.BottomLeft, contentAlignment.MiddleLeft, contentAlignment.TopLeft
                    result = StringAlignment.Near
                Case contentAlignment.BottomRight, contentAlignment.MiddleRight, contentAlignment.TopRight
                    result = StringAlignment.Far
                Case Else
                    result = StringAlignment.Center
            End Select

            Return result
        End Function

    End Class

    Private Sub RadChartView1_CreateRenderer(sender As Object, e As ChartViewCreateRendererEventArgs)
        e.Renderer = New CustomCartesianRenderer(e.Area)
    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 label As BarLabelElementDrawPart = TryCast(Me.DrawParts(i), BarLabelElementDrawPart)
                If (label IsNot Nothing) Then
                    Me.DrawParts(i) = New CustomLabelElementDrawPart(label.Element, Me)
                End If
            Next
        End Sub
    End Class
Approved
Last Updated: 06 Nov 2018 07:33 by ADMIN
When setting the border color of the axis the labels are showing a border with the same color. The color is inherited from the axis element. One should be able to easily disable this, or it should not happen.

How to reproduce: 
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    LineSeries lineSeries;

    public RadForm1()
    {
        InitializeComponent();

        this.lineSeries = new LineSeries();

        this.lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan"));
        this.lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr"));
        this.lineSeries.DataPoints.Add(new CategoricalDataPoint(25, "Jul"));
        this.lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct"));

        this.radChartView1.Series.Add(this.lineSeries);

        this.lineSeries.HorizontalAxis.BorderColor = Color.Green;
        this.lineSeries.VerticalAxis.BorderColor = Color.Blue;
    }
}

Workaround: iterate each of the axis labels and set their border color to Transparent
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    LineSeries lineSeries;

    public RadForm1()
    {
        InitializeComponent();

        this.lineSeries = new LineSeries();

        this.lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan"));
        this.lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr"));
        this.lineSeries.DataPoints.Add(new CategoricalDataPoint(25, "Jul"));
        this.lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct"));

        this.radChartView1.Series.Add(this.lineSeries);

        this.lineSeries.HorizontalAxis.BorderColor = Color.Green;
        this.lineSeries.VerticalAxis.BorderColor = Color.Blue;
    }

    protected override void OnShown(EventArgs e)
    {
        base.OnShown(e);

        foreach (var item in this.lineSeries.VerticalAxis.Children)
        {
            AxisLabelElement label = item as AxisLabelElement;
            if (label != null)
            {
                label.BorderColor = Color.Transparent;
            }
        }

        foreach (var item in this.lineSeries.HorizontalAxis.Children)
        {
            AxisLabelElement label = item as AxisLabelElement;
            if (label != null)
            {
                label.BorderColor = Color.Transparent;
            }
        }
    }
}
Completed
Last Updated: 19 Sep 2018 12:49 by Dimitar
How to reproduce:
private void UpdateChart()
{
    this.radChartView1.Series.Clear();

    // Create two series for the bar chart.
    BarSeries requiredBarSeries = new BarSeries
    {
        ShowLabels = true,
        CombineMode = ChartSeriesCombineMode.Cluster,
        NumberOfColors = 2,
    };

    BarSeries actualBarSeries = new BarSeries
    {
        ShowLabels = true,
        CombineMode = ChartSeriesCombineMode.Cluster,
        NumberOfColors = 2,
    };
    
    // Add the data. 
    AddDataPoint(requiredBarSeries, .0333d, "Germany", "Required");
    AddDataPoint(actualBarSeries, .050d, "Germany", "Actual");
    AddDataPoint(requiredBarSeries, .0333d, "United States", "Required");
    AddDataPoint(actualBarSeries, .050d, "United States", "Actual");
    AddDataPoint(requiredBarSeries, .00d, "France", "Required");
    AddDataPoint(actualBarSeries, .050d, "France", "Actual");

    AddDataPoint(requiredBarSeries, 0.0d, "United Kingdom", "Required");
    AddDataPoint(actualBarSeries, .050d, "United Kingdom", "Actual");


    AddDataPoint(requiredBarSeries, 0.955d, "Russia", "Required");
    // Change the following value to .95d to see 
    // the issue.
    AddDataPoint(actualBarSeries, .15d, "Russia", "Actual");

    this.radChartView1.Series.Add(requiredBarSeries);
    this.radChartView1.Series.Add(actualBarSeries);

    CategoricalAxis horizontalAxis = radChartView1.Axes[0] as CategoricalAxis;
    horizontalAxis.LabelFitMode = AxisLabelFitMode.MultiLine;
}

private void AddDataPoint(BarSeries series, double val, string category, string label)
{
    series.DataPoints.Add(new CategoricalDataPoint
    {
        Value       = val,
        Label       = String.Format("{0}\n{1:P2}", label, val),
        Category    = category
    });
}

Workaround: create a custom SmartLabelsController
public RadForm1()
        {
            InitializeComponent();


            SmartLabelsController labelsController = new CustomSmartLabelsController();
            this.radChartView1.Controllers.Add(labelsController);
     
            // Set up the chart
        }

public class CustomSmartLabelsController : SmartLabelsController
    {
        protected override SmartLabelsStrategyBase GetDefaultStrategy(ChartArea area)
        {
            SmartLabelsStrategyBase strategy = base.GetDefaultStrategy(area);

            if (strategy is VerticalAdjusmentLabelsStrategy)
            {
                strategy = new CustomVerticalAdjusmentLabelsStrategy();
                Dictionary<Type, List<Type>> strategies = typeof(SmartLabelsController).GetField("strategySeries", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(this) as Dictionary<Type, List<Type>>;
                strategies.Remove(typeof(VerticalAdjusmentLabelsStrategy));
                strategies.Add(typeof(CustomVerticalAdjusmentLabelsStrategy), new List<Type> { typeof(BarSeries), typeof(LineSeriesBase) });
            }

            return strategy;
        }
    }

    public class CustomVerticalAdjusmentLabelsStrategy : VerticalAdjusmentLabelsStrategy
    {
        public override void CalculateLocations(ChartSeriesCollection series, Rectangle plotArea)
        {
            if (series.Count == 0)
            {
                return;
            }

            List<LabelElement> labels = new List<LabelElement>();
            List<int> overlaps = new List<int>();

            foreach (ChartSeries chartSeries in series)
            {
                if (!chartSeries.ShowLabels || !chartSeries.IsVisible)
                {
                    continue;
                }

                foreach (DataPointElement point in chartSeries.Children)
                {
                    LabelElement label = (LabelElement)point.Children[0];
                    Rectangle labelRect = ChartRenderer.ToRectangle(label.GetLayoutSlot());
                    labelRect.X += (int)(series[0].View.Viewport.X + ((IChartView)series[0].View).PlotOriginX);
                    labelRect.Y += (int)(series[0].View.Viewport.Y + ((IChartView)series[0].View).PlotOriginY);

                    if (chartSeries.View.GetArea<CartesianArea>().Orientation == Orientation.Vertical)
                    {
                        labelRect.Y -= this.DistanceToLabel;
                    }
                    else
                    {
                        labelRect.X += this.DistanceToLabel;
                    }

                    labelRect.Inflate(0, this.DistanceBetweenLabels);

                    label.SmartRectangle = labelRect;
                    labels.Add(label);
                }
            }

            CartesianSeries cartesianSeries = (CartesianSeries)series[0];

            if (cartesianSeries != null)
            {
                this.RestrictWithinAxes(labels, cartesianSeries);
            }

            LabelElement labelToMove = this.GetElementWithMostOverlaps(labels, series);
            int counter = 0;

            while (labelToMove != null && counter < labels.Count)
            {
                Rectangle firstDirectionRect;
                Rectangle secondDirectionRect;
                int firstMoveCost;
                int secondMoveCost;

                Rectangle dataPointLayout = ChartRenderer.ToRectangle(labelToMove.DataPoint.LayoutSlot);
                dataPointLayout.X += (int)labelToMove.View.Viewport.X;
                dataPointLayout.Y += (int)labelToMove.View.Viewport.Y;

                if (cartesianSeries.View.GetArea<CartesianArea>().Orientation == System.Windows.Forms.Orientation.Vertical)
                {
                    firstDirectionRect = this.GetBestPositionInUpwardDirection(labels, labelToMove, cartesianSeries);
                    secondDirectionRect = this.GetBestPositionInDownwardDirection(labels, labelToMove, cartesianSeries);

                    firstMoveCost = Math.Abs(labelToMove.SmartRectangle.Y - firstDirectionRect.Y);
                    secondMoveCost = Math.Abs(labelToMove.SmartRectangle.Y - secondDirectionRect.Y);
                }
                else
                {
                    firstDirectionRect = this.GetBestPositionInLeftDirection(labels, labelToMove, cartesianSeries);
                    secondDirectionRect = this.GetBestPositionInRightDirection(labels, labelToMove, cartesianSeries);

                    firstMoveCost = Math.Abs(dataPointLayout.X - firstDirectionRect.X);
                    secondMoveCost = Math.Abs(dataPointLayout.X - secondDirectionRect.X);
                }

                if (!dataPointLayout.IntersectsWith(secondDirectionRect) && firstMoveCost > secondMoveCost)
                {
                    labelToMove.SmartRectangle = secondDirectionRect;
                }
                else
                {
                    labelToMove.SmartRectangle = firstDirectionRect;
                }

                labelToMove = this.GetElementWithMostOverlaps(labels, series);
                counter++;
            }

            this.FinalPositionsOptimization(labels);

            foreach (LabelElement label in labels)
            {
                Rectangle rect = label.SmartRectangle;
                rect.Inflate(0, -this.DistanceBetweenLabels);

                Rectangle dataPointLayout = ChartRenderer.ToRectangle(label.DataPoint.LayoutSlot);
                dataPointLayout.X += (int)cartesianSeries.View.Viewport.X;
                dataPointLayout.Y += (int)cartesianSeries.View.Viewport.Y;
                int delta = 1;

                if (dataPointLayout.Y > label.SmartRectangle.Y)
                {
                    delta = -1;
                }

                rect.Y += delta * this.DistanceToLabel;
                label.SmartRectangle = rect;
            }
        }
    }
Approved
Last Updated: 11 Sep 2018 12:04 by ADMIN
Use attached to reproduce (comment the custom strategy).

Workaround: in the attched project. 
  
Completed
Last Updated: 28 Aug 2018 12:33 by Dimitar
ADMIN
Created by: Hristo
Comments: 0
Category: ChartView
Type: Feature Request
0

			
Completed
Last Updated: 28 Aug 2018 07:59 by Dimitar
To reproduce: run the attached sample project and you will notice that the data points are not properly aligned.

Workaround: use equal number of data points for the series.
1 2 3 4 5 6