Approved
Last Updated: 06 Nov 2018 07:33 by ADMIN
ADMIN
Dimitar
Created on: 14 Sep 2017 08:15
Category: ChartView
Type: Feature Request
1
ADD. RadChartView - add property of the axis that allows you to disable the label borders.
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;
            }
        }
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
2 comments
ADMIN
Hristo
Posted on: 06 Nov 2018 07:33
Hi Carlo, 

The issue is still present and I will try to increase its priority. At the moment I cannot confirm a possible date for the fix. Please subscribe to the item so that you can be updated when its status changes.

I have also updated the item description with a possible workaround solution.
TestTeam
Posted on: 23 Oct 2018 13:54
Any news?