Completed
Last Updated: 18 Oct 2021 09:09 by ADMIN
Release R3 2021 SP1
Sandor
Created on: 15 Sep 2021 08:22
Category: ChartView
Type: Bug Report
0
RadChartView: The axis' label are difficult to read in VisualStudio2012DarkTheme
1 comment
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 15 Sep 2021 08:26

Hi, Sandor,

Feel free to use the following workaround and adjust the color:

        private void radButton1_Click(object sender, EventArgs e)
        {
            ThemeResolutionService.ApplicationThemeName = ThemeResolutionService.ApplicationThemeName == "VisualStudio2012Dark" ? "VisualStudio2012Light" : "VisualStudio2012Dark";
            BarSeries s = this.radChartView1.Series[0] as BarSeries;
            Color c = Color.Black;
            if (ThemeResolutionService.ApplicationThemeName == "VisualStudio2012Dark")
            {
                c = Color.White;
            }
            s.HorizontalAxis.ForeColor = c;
            s.HorizontalAxis.BorderColor = c;
            s.VerticalAxis.ForeColor = c;
            s.VerticalAxis.BorderColor = c;

            foreach (UIChartElement el in s.VerticalAxis.Children)
            {
                AxisLabelElement lbl = el as AxisLabelElement;
                if (lbl == null)
                {
                    continue;
                }
                lbl.BorderColor = Color.Transparent;
            }
            foreach (UIChartElement el in s.HorizontalAxis.Children)
            {
                AxisLabelElement lbl = el as AxisLabelElement;
                if (lbl == null)
                {
                    continue;
                }
                lbl.BorderColor = Color.Transparent;
            }
        }

I hope this information helps.

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.