Unplanned
Last Updated: 31 Jul 2023 16:44 by ADMIN

Hello Telerik Support,

after taking my first steps with RangeSelector and ChartView controls I found an issue with a simple bar chart. The length of some bars in the chart of the RangeSelector doesn't match with the bars in the ChartView. The relation is wrong.I provided a screenshot and marked the bars. I could provide a sample application, but I can't attach a zip file, so here's the code of the main form:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
using Telerik.WinControls.UI;
 
namespace TelerikChartView
{
    public partial class MainForm : Telerik.WinControls.UI.RadForm
    {
        private List<Kapazitaetspunkt> _BackListPunkte;
        private BindingList<Kapazitaetspunkt> Punkte;
 
        public MainForm()
        {
            InitializeComponent();
        }
 
        private void MainForm_Load(object sender, EventArgs e)
        {
            _BackListPunkte = new List<Kapazitaetspunkt>();
            Punkte = new BindingList<Kapazitaetspunkt>(_BackListPunkte);
            //Punkte = new BindingList<Kapazitaetspunkt>();
            rngTimeSelector.AssociatedControl = cvChart;
            rngTimeSelector.RangeSelectorElement.ScrollSelectorElement.Visibility = ElementVisibility.Collapsed;
 
            BarSeries bars = new BarSeries();
            bars.DataSource = Punkte;
            bars.ValueMember = nameof(Kapazitaetspunkt.Percentage);
            bars.CategoryMember = nameof(Kapazitaetspunkt.Date);
            cvChart.Series.Add(bars);
        }
 
        private void GenerateTestData(int addMonths = 0)
        {
            Punkte.Clear();
            const int count = 25;
            const int step = 4;
            var von = DateTime.Today.AddMonths(addMonths);
            var bis = von.AddDays(count);
            double percentage = 0;
            //_BackListPunkte.Add(new Kapazitaetspunkt(von.AddDays(-1), null));
            Punkte.Add(new Kapazitaetspunkt(von.AddDays(-1), null));
 
            while (von < bis)
            {
                //_BackListPunkte.Add(new Kapazitaetspunkt(von, percentage));
                Punkte.Add(new Kapazitaetspunkt(von, percentage));
                percentage += step;
                von = von.AddDays(1);
            }
 
            //_BackListPunkte.Add(new Kapazitaetspunkt(von.AddDays(1), null));
            Punkte.Add(new Kapazitaetspunkt(von.AddDays(1), null));
        }
 
        private void btnGenerateData_Click(object sender, EventArgs e)
        {
            GenerateTestData();
 
            rngTimeSelector.RangeSelectorElement.InitializeElements();
            rngTimeSelector.RangeSelectorElement.ResetLayout(true);
        }
 
        private void btnGenerateData2_Click(object sender, EventArgs e)
        {
            GenerateTestData(2);
 
            rngTimeSelector.RangeSelectorElement.InitializeElements();
            rngTimeSelector.RangeSelectorElement.ResetLayout(true);
 
        }
 
        private void rngTimeSelector_ScaleInitializing(object sender, ScaleInitializingEventArgs e)
        {
            e.Cancel = true;
        }
    }
 
    public class Kapazitaetspunkt : INotifyPropertyChanged
    {
        private DateTime _Date;
 
        public DateTime Date
        {
            get => _Date;
            set
            {
                if (value != Date)
                {
                    _Date = value;
                    OnPropertyChanged();
                }
            }
        }
 
 
        public double? _Percentage;
 
        public double? Percentage
        {
            get => _Percentage;
            set
            {
                if (value != Percentage)
                {
                    _Percentage = value;
                    OnPropertyChanged();
                }
            }
        }
 
 
        public Kapazitaetspunkt(DateTime date, double? percentage)
        {
            Date = date;
            Percentage = percentage;
        }
 
 
        public event PropertyChangedEventHandler PropertyChanged;
        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}

Regards,

Stephan

Unplanned
Last Updated: 16 Mar 2022 16:01 by ADMIN

Please use the following code snippet and click the button to print the chart: 

        public RadForm1()
        {
            InitializeComponent();

            Random rand = new Random();
            for (int i = 0; i < 50; i++)
            {
                LineSeries lineSeries = new LineSeries();
                lineSeries.LegendTitle = "Series" + i;
                lineSeries.DataPoints.Add(new CategoricalDataPoint(rand.Next(0,20), "Jan"));
                lineSeries.DataPoints.Add(new CategoricalDataPoint(rand.Next(0,20), "Apr"));
                lineSeries.DataPoints.Add(new CategoricalDataPoint(rand.Next(0,20), "Jul"));
                lineSeries.DataPoints.Add(new CategoricalDataPoint(rand.Next(0,20), "Oct"));
                this.radChartView1.Series.Add(lineSeries);
            }
            this.radChartView1.ShowLegend = true;
            this.radChartView1.ChartElement.LegendPosition = LegendPosition.Bottom;
        }

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

Expected:

Actual:

Workaround: 

https://docs.telerik.com/devtools/winforms/knowledge-base/chartview-wrap-legend-items

         internal class MyChart : RadChartView
        {
            protected override RadChartElement CreateChartElement()
            {
                return new MyChartElement();
            }
        }

        internal class MyChartElement : RadChartElement
        {
            protected override ChartLegendElement CreateChartLegendElement()
            {
                return new MyLegendElement(this);
            }

            protected override Type ThemeEffectiveType
            {
                get
                {
                    return typeof(RadChartElement);
                }
            }
        }

        internal class MyLegendElement : ChartLegendElement
        {
            private RadListViewElement panel;

            public MyLegendElement(RadChartElement chartElement) : base(chartElement)
            {
            }

            protected override void OnLegendInfosCollectionChanged(Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e, bool providerChange)
            {
                base.OnLegendInfosCollectionChanged(e, providerChange);
                if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Add)
                {
                    LegendItem li = e.NewItems[0] as LegendItem;
                    panel.Items.Add(li.Title);
                    panel.Items.Last().Tag = li.Element;
                }
                panel.SelectedIndex = -1;
            }

            protected override void CreateChildElements()
            {
                base.CreateChildElements();
                panel = new RadListViewElement();
                panel.VisualItemFormatting += ListView_VisualItemFormatting;
                panel.ShowCheckBoxes = true;
                panel.StretchHorizontally = true;
                panel.StretchVertically = false;
                panel.ViewType = ListViewType.IconsView;
                panel.ItemSize = new System.Drawing.Size(100, 20);
                panel.ShouldHandleMouseInput = true;
                panel.NotifyParentOnMouseInput = false;
                panel.MaxSize = new System.Drawing.Size(int.MaxValue, 200);
                this.StackElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
                this.Children.Add(panel);
            }

            protected override Type ThemeEffectiveType
            {
                get
                {
                    return typeof(ChartLegendElement);
                }
            }

            private void ListView_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e)
            {
                ListViewItemCheckbox checkBox = e.VisualItem.ToggleElement as ListViewItemCheckbox;
                if (checkBox != null)
                {
                    e.VisualItem.ToggleElement.ShouldHandleMouseInput = false;
                    e.VisualItem.ToggleElement.NotifyParentOnMouseInput = false;
                    checkBox.CheckMarkPrimitive.Fill.BackColor = ((LineSeries)(e.VisualItem.Data.Tag)).BorderColor;
                    checkBox.CheckMarkPrimitive.Fill.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
                    checkBox.CheckMarkPrimitive.Border.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
                }
            }
        }

 

 

 

Unplanned
Last Updated: 25 Jun 2021 08:14 by ADMIN
As you can see in the video, the trackball gets flickering and sometimes disappearing on the mouse move.

To Reproduce, make sure to keep the mouse over the trackball text box.
Unplanned
Last Updated: 16 Jun 2021 08:51 by ADMIN

Please use the following code snippet:

        public RadForm1()
        {
            InitializeComponent();

            this.radChartView1.View.AreaType = ChartAreaType.Cartesian;
            RangeBarSeries rangeBarSeries = new RangeBarSeries();

            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/17/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/17/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 4, DateTime.Now.TimeOfDay.TotalMinutes + 2, "5/17/2021"));

            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 30, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/18/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/18/2021"));

            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 4, DateTime.Now.TimeOfDay.TotalMinutes + 2, "5/19/2021"));

            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes - 89, DateTime.Now.TimeOfDay.TotalMinutes - 100, "5/20/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/20/2021"));

            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes - 79, DateTime.Now.TimeOfDay.TotalMinutes - 90, "5/21/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/21/2021"));

            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/22/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/22/2021"));

            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/23/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/23/2021"));

            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/25/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/24/2021"));

            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 14, DateTime.Now.TimeOfDay.TotalMinutes + 10, "5/26/2021"));
            rangeBarSeries.DataPoints.Add(new RangeDataPoint(DateTime.Now.TimeOfDay.TotalMinutes + 7, DateTime.Now.TimeOfDay.TotalMinutes + 5, "5/26/2021"));

            this.radChartView1.View.Series.Add(rangeBarSeries); 
            rangeBarSeries.VerticalAxis.LabelRotationAngle = -45;
            rangeBarSeries.VerticalAxis.LabelFitMode = AxisLabelFitMode.Rotate;

            LinearAxis verticalAxis = this.radChartView1.View.Axes.Get<LinearAxis>(1);
            verticalAxis.Minimum = 0; //Minutes 0:00
            verticalAxis.Maximum = 1440; //Minutes 23:00
            verticalAxis.MajorStep = 60; //60 minutes in an hour
            verticalAxis.LastLabelVisibility = AxisLastLabelVisibility.Hidden; 
        
        }

When the labels are not rotated:

When rotated:

Unplanned
Last Updated: 16 Jun 2021 05:10 by ADMIN
Created by: chandrasekhar
Comments: 0
Category: ChartView
Type: Bug Report
0

Please use the following code snippet. You will notice that for very long text in the trackball, the fill rectangle doesn't fit the text.

PS. If the legend items occupy enough width of the chart, there wouldn't be sufficient space for the trackball.

        public RadForm1()
        {
            InitializeComponent();

            BarSeries barSeries = new BarSeries("Performance", "RepresentativeName");
            barSeries.LegendTitle = "Q1 This is some sample very long text";
            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")); 
            this.radChartView1.Series.Add(barSeries);
            BarSeries barSeries2 = new BarSeries("Performance", "RepresentativeName");
            barSeries2.LegendTitle = "Q2 This is some sample very long text";
            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"));
            this.radChartView1.Series.Add(barSeries2);

            this.radChartView1.ShowLegend = true;
      
            ChartTrackballController trackballController = new ChartTrackballController();
            trackballController.TextNeeded += trackballController_TextNeeded;
            radChartView1.Controllers.Add(trackballController);
        }

        string text = "<html><color=200,200,200,200>This is some sample very long text that wouldn't fit in " +
                      "the default size of the RadChartView from the Telerik UI for WinForms suite</html>";

        private void trackballController_TextNeeded(object sender, TextNeededEventArgs e)
        { 
            e.Text = text;
        }

Workaround: 

            ChartTrackballController trackballController = new ChartTrackballController();
            trackballController.IsFixedSize = true;
            trackballController.FixedSize = new Size(700, 40);
            trackballController.TextNeeded += trackballController_TextNeeded;
            radChartView1.Controllers.Add(trackballController);

Unplanned
Last Updated: 01 May 2020 07:56 by ADMIN

I need to draw a series of graphs and show the legend. When the legend does not fit in the RadChartView, a scroll bar appears - this is acceptable, you can quickly see the whole legend. But the title of the legend is cut off.

Unplanned
Last Updated: 20 Apr 2020 06:15 by ADMIN

Please refer to the attached sample project. Select a range from RadRangeSelector and print the chart. You will notice that the preview chart is shifted. Even if the the default margin is reduced to 0, the preview chart is not the same as the one displayed on the form.

Workaround: export the chart to a file which file can be printed: https://docs.telerik.com/devtools/winforms/controls/chartview/features/export

 
Unplanned
Last Updated: 11 Sep 2018 12:04 by ADMIN
Use attached to reproduce (comment the custom strategy).

Workaround: in the attched project. 
  
Unplanned
Last Updated: 04 Jul 2018 11:48 by ADMIN
Use attached to reproduce. 
If you add 163 points the axis will start from 3. There should be an option to start from 0.
Unplanned
Last Updated: 30 Apr 2018 11:33 by ADMIN
To reproduce:
        public RadForm1()
        {
            InitializeComponent(); 

            this.radChartView1.AreaType = ChartAreaType.Polar;
            PolarAreaSeries polarAreaSeries = new PolarAreaSeries();
            PolarDataPoint polarPoint = new PolarDataPoint();
            polarPoint.Value = 35;
            polarPoint.Angle = 50;
            polarAreaSeries.DataPoints.Add(polarPoint);
            polarPoint = new PolarDataPoint();
            polarPoint.Value = 40;
            polarPoint.Angle = 200;
            polarAreaSeries.DataPoints.Add(polarPoint);
            polarPoint = new PolarDataPoint();
            polarPoint.Value = 55;
            polarPoint.Angle = 320;
            polarAreaSeries.DataPoints.Add(polarPoint);

            this.radChartView1.Series.Add(polarAreaSeries);
            
            this.radChartView1.Axes[0].LabelFitMode = AxisLabelFitMode.Rotate;
            AxisLabelElement gauche = this.radChartView1.Axes[0].Children[1] as AxisLabelElement;
            gauche.Text = "IV Gestion des ressources" + Environment.NewLine + "humaines";
            
          
              this.radChartView1.View.AxisLabelFormatting+=View_AxisLabelFormatting;
        }

        Font f = new Font("Arial", 10, FontStyle.Bold);

        private void View_AxisLabelFormatting(object sender, ChartAxisLabelFormattingEventArgs e)
        {
            if (e.LabelElement.Text.Contains("IV"))
            {
                e.LabelElement.Font = f;
            }
        }
Unplanned
Last Updated: 05 Jan 2018 14:31 by ADMIN
To reproduce:
            BarSeries barSeries = new BarSeries("Performance", "RepresentativeName");
            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")); 
            this.radChartView1.Series.Add(barSeries);

            LinearAxis verticalAxis = radChartView1.Axes.Get<LinearAxis>(1);
            verticalAxis.MajorStep = 5;
            LinearAxisModel axisModel = verticalAxis.Model as LinearAxisModel;
            
            AxisScaleBreak scaleBreakItem = new AxisScaleBreak();
            scaleBreakItem.Name = "Item1";
            scaleBreakItem.From = 80d;
            scaleBreakItem.To = 120d;
            verticalAxis.ScaleBreaks.Add(scaleBreakItem);
Unplanned
Last Updated: 07 Nov 2017 15:19 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: ChartView
Type: Bug Report
0

			
Unplanned
Last Updated: 19 Jun 2017 06:21 by ADMIN
To reproduce:
- Use HTML- like text formatting in the chart title.
- Export the chart to image.
- The tags are shown in the text.

Workaround:
private void radButton1_Click(object sender, EventArgs e)
{
    radChartView1.ShowTitle = false;

    TextPrimitiveHtmlImpl impl = new TextPrimitiveHtmlImpl();
    TextParams textParams = this.radChartView1.ChartElement.TitleElement.TextParams;
    SizeF size = impl.MeasureOverride(new SizeF(500f, 200), textParams);

    using (MemoryStream stream = new MemoryStream())
    {
        radChartView1.ExportToImage(stream, new Size(500, 500 - (int)size.Height));

        Bitmap bmp = new Bitmap(500, 500);

        using (Graphics g = Graphics.FromImage(bmp))
        {
            g.Clear(Color.White);
            textParams.paintingRectangle = new RectangleF(Point.Empty, size);
            impl.PaintPrimitive(new RadGdiGraphics(g), textParams);
            g.DrawImage(Image.FromStream(stream), 0, size.Height, 500, 500 - size.Height);
        }

        bmp.Save(@"D:\xfile.bmp");
    }

    radChartView1.ShowTitle = true;
}
Unplanned
Last Updated: 22 May 2017 05:57 by ADMIN
How to reproduce: create a drill down chart with different area types on the different levels. 
The issue seems to be related to some series not implementing the ILegendInfoProvider interface.

Workaround:
A similar result as having a drill-down chart with series having different area types can be achieved manually using the ChartSelectionController. Please check the attached project and video file.
Unplanned
Last Updated: 06 Feb 2017 11:33 by ADMIN
To reproduce:

public RadForm1()
{
    InitializeComponent();
    Random rand = new Random(); 
    
    LineSeries lineSeria = new LineSeries();
    lineSeria.ValueMember = "WorkingHours";
    lineSeria.CategoryMember = "Date";
    lineSeria.ShowLabels = true;
    lineSeria.PointSize = new System.Drawing.SizeF(10, 10);
    lineSeria.BackColor = Color.Red;
    LinearAxis verticalAxis2 = new LinearAxis();
    verticalAxis2.AxisType = AxisType.Second;
    verticalAxis2.HorizontalLocation = AxisHorizontalLocation.Right ;
    lineSeria.VerticalAxis = verticalAxis2;
    DataTable table = new DataTable();
    table.Columns.Add("Value", typeof(double));
    table.Columns.Add("Name", typeof(string));
    table.Rows.Add(rand.Next(1, 20), "John");
    table.Rows.Add(rand.Next(1, 20), "Adam");
    table.Rows.Add(rand.Next(1, 20), "Peter");
    table.Rows.Add(rand.Next(1, 20), "Sam");
    table.Rows.Add(rand.Next(1, 20), "Paul");
    lineSeria.ValueMember = "Value";
    lineSeria.CategoryMember = "Name";
    lineSeria.DataSource = table;

    BarSeries barSeria = new BarSeries();
   
    barSeria.ValueMember = "Finished";
    barSeria.CategoryMember = "Date";
    barSeria.ShowLabels = true;
    barSeria.BackColor = Color.Aqua;
    LinearAxis verticalAxis1 = new LinearAxis();
    verticalAxis1.AxisType = AxisType.Second;
    verticalAxis1.HorizontalLocation = AxisHorizontalLocation.Left;
    barSeria.VerticalAxis = verticalAxis1;

    table = new DataTable();
    table.Columns.Add("Value", typeof(double));
    table.Columns.Add("Name", typeof(string));
    table.Rows.Add(rand.Next(1, 20), "John");
    table.Rows.Add(rand.Next(1, 20), "Adam");
    table.Rows.Add(rand.Next(1, 20), "Peter");
    table.Rows.Add(rand.Next(1, 20), "Sam");
    table.Rows.Add(rand.Next(1, 20), "Paul");
    barSeria.ValueMember = "Value";
    barSeria.CategoryMember = "Name";
    barSeria.DataSource = table;

    this.radChartView1.ChartElement.View.Series.Add(lineSeria);
    this.radChartView1.ChartElement.View.Series.Add(barSeria);
    this.radChartView1.ChartElement.Margin = new System.Windows.Forms.Padding(10);
    (this.radChartView1.ChartElement.View.Axes[0] as CategoricalAxis).LabelFitMode =
        Telerik.Charting.AxisLabelFitMode.MultiLine; 
     
    SmartLabelsController c = new SmartLabelsController();

    this.radChartView1.ChartElement.View.Controllers.Add(c);
}

Workaround: change the strategy: 
SmartLabelsController c = new SmartLabelsController();
c.Strategy = new FourPositionsLabelsStrategy();
this.radChartView1.ChartElement.View.Controllers.Add(c);
Unplanned
Last Updated: 06 Feb 2017 11:16 by ADMIN
How to reproduce:

Public Class Form1

    Sub New()

        InitializeComponent()

        Me.SetupLineSeries()

    End Sub

    Private Sub SetupLineSeries()
        Dim splitContainer = New RadSplitContainer()
        splitContainer.SplitPanels.Add(New SplitPanel())
        splitContainer.SplitPanels.Add(New SplitPanel())
        splitContainer.SplitPanels(0).Controls.Add(Me.RadChartView1)
        Me.RadChartView1.Dock = DockStyle.Fill

        splitContainer.Orientation = Orientation.Horizontal
        splitContainer.Parent = Me
        splitContainer.Dock = DockStyle.Fill


        Dim lineSeries As New Telerik.WinControls.UI.LineSeries("2014")
        lineSeries.LegendTitle = "2014"
        lineSeries.ShowLabels = True

        lineSeries.DataPoints.Add(New CategoricalDataPoint(8000, "Jan"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8700, "Feb"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8500, "Mar"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8900, "Apr"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8400, "May"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8300, "Jun"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8600, "Jul"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8800, "Aug"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8400, "Sep"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8300, "Oct"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8500, "Nov"))
        lineSeries.DataPoints.Add(New CategoricalDataPoint(8100, "Dec"))

        Me.RadChartView1.Series.Add(lineSeries)
        Dim lineSeries2 As New Telerik.WinControls.UI.LineSeries("2015")
        lineSeries2.LegendTitle = "2015"
        lineSeries2.ShowLabels = True

        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5800, "Jan"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5900, "Feb"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5700, "Mar"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5500, "Apr"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5300, "May"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5600, "Jun"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5800, "Jul"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5800, "Aug"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(5900, "Sep"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(6100, "Oct"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(7900, "Nov"))
        lineSeries2.DataPoints.Add(New CategoricalDataPoint(7600, "Dec"))
        Me.RadChartView1.Series.Add(lineSeries2)

        Me.RadChartView1.ShowSmartLabels = True
        Me.RadChartView1.ShowTitle = True
        Me.RadChartView1.ShowLegend = True
        Me.RadChartView1.LegendTitle = "Legend"

        Dim verticalAxis As LinearAxis = RadChartView1.Axes.[Get](Of LinearAxis)(1)
        verticalAxis.Minimum = 4000
        verticalAxis.Maximum = 20000
        verticalAxis.MajorStep = 4000

        Me.RadChartView1.ShowPanZoom = True
    End Sub

End Class
Unplanned
Last Updated: 06 Feb 2017 10:44 by ADMIN
How to reproduce: 
Public Class Form1

    Sub New()

        InitializeComponent()

        Dim barSeries As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
        barSeries.Name = "Q1"
        barSeries.LegendTitle = "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "Leg

        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.LegendTitle = "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "Le

        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)

        Me.RadChartView1.ShowTitle = True
        Me.RadChartView1.ShowLegend = True
        Me.RadChartView1.LegendTitle = "Legend"

        Me.RadChartView1.Size = New Size(500, 150)
        Me.RadChartView1.ShowPanZoom = True

        'Me.SetupLineSeries()

    End Sub

    Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
        Dim filePath As String = "..\..\exprotedChart2.png"
        Me.RadChartView1.ExportToImage(filePath, New Size(1000, 800), System.Drawing.Imaging.ImageFormat.Png)

    End Sub
End Class

Workaround: increase the size of the chart
Public Class Form1

    Sub New()

        InitializeComponent()

        Dim barSeries As New Telerik.WinControls.UI.BarSeries("Performance", "RepresentativeName")
        barSeries.Name = "Q1"
        barSeries.LegendTitle = "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1"

        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.LegendTitle = "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1" + vbCrLf + "LegendTitle1"

        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)

        Me.RadChartView1.ShowTitle = True
        Me.RadChartView1.ShowLegend = True
        Me.RadChartView1.LegendTitle = "Legend"

        Me.RadChartView1.Size = New Size(500, 150)
        Me.RadChartView1.ShowPanZoom = True

        'Me.SetupLineSeries()

    End Sub

    Dim size As Size
    Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
        AddHandler Me.RadChartView1.SizeChanged, AddressOf RadChartView1_SizeChanged
        size = Me.RadChartView1.Size
        Me.RadChartView1.Size = New Size(1000, 800)

    End Sub

    Private Sub RadChartView1_SizeChanged(sender As Object, e As EventArgs)
        RemoveHandler Me.RadChartView1.SizeChanged, AddressOf RadChartView1_SizeChanged

        Dim filePath As String = "..\..\exprotedChart2.png"
        Me.RadChartView1.ExportToImage(filePath, Me.RadChartView1.Size, System.Drawing.Imaging.ImageFormat.Png)
        Me.RadChartView1.Size = size
    End Sub
End Class
Unplanned
Last Updated: 06 Feb 2017 09:45 by ADMIN
To reproduce:
- Set the position like this:
this.radChartView1.ChartElement.LegendElement.Alignment = ContentAlignment.TopCenter;

- Export the chart to an image, the position is not the same as in the application.

Workaround:
- Set the position manually:

this.radChartView1.ChartElement.LegendPosition = LegendPosition.Float;
this.radChartView1.ChartElement.LegendOffset = new Point(400, 0);


Unplanned
Last Updated: 31 Aug 2016 11:00 by ADMIN
The event should not be triggered when moving the mouse over the same data point, as we already asked for data for it. We can cache it and reuse it.
Unplanned
Last Updated: 19 Aug 2016 11:55 by ADMIN
Steps to reproduce: 
1. Add RadChartView with two BarSeries 
2. Set the Name property of series 
3. Set the SelectionMode property to SingleDataPoint
4. Subscribe to the SelectedPointChanging/SelectedPointChanged events. 
5. Run the form and select points from different series. The OldSelectedSeries/NewSelectedSeries properties always return the name of the first series now matter which series is selected. 

Workaround: 
void radChartView1_SelectedPointChanged(object sender, ChartViewSelectedPointChangedEventArgs e)
{
    BarSeries series = (e.NewSelectedPoint).Presenter as BarSeries;

    if (series.Name == "Q1")
    {
        Console.WriteLine(series.Name);
    }
    else if (series.Name == "Q2")
    {
        Console.WriteLine(series.Name);
    }
}
1 2