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.
Completed
Last Updated: 24 Jan 2015 16:03 by ADMIN
To reproduce use the following code:
public Form1()
{
    InitializeComponent();
   
    radChartView1.AreaType = Telerik.WinControls.UI.ChartAreaType.Pie;

    radChartView1.ShowLegend = true;
    series.ValueMember = "CategoryID";
    series.DisplayMember = "CategoryName";
    series.DataSource = this.nwindDataSet1.Categories;
    radChartView1.Series.Add(series);
}

private void radButton1_Click(object sender, EventArgs e)
{
    this.categoriesTableAdapter.Fill(this.nwindDataSet1.Categories);
}

private void Form1_Load(object sender, EventArgs e)
{
    // TODO: This line of code loads data into the 'nwindDataSet1.Categories' table. You can move, or remove it, as needed.
    this.categoriesTableAdapter.Fill(this.nwindDataSet1.Categories);
}

Workaround: 
- Clear the items manually:
    this.radChartView1.ChartElement.LegendElement.StackElement.Children.Clear();
Completed
Last Updated: 24 Jan 2015 07:13 by ADMIN
To reproduce use the following code to initialize the chart:

DataTable dt = new DataTable();
dt.Columns.Add("Category", typeof(string));
dt.Columns.Add("Value", typeof(int));
dt.Rows.Add("010010", 5);
dt.Rows.Add("000020", 6);
dt.Rows.Add("000030", 2);
dt.Rows.Add("000040", 11);
return dt;

BarSeries bs = new BarSeries("Value", "Category");
bs.Palette = new PaletteEntry(Color.BlanchedAlmond);
radChartView1.DataSource = dt;
radChartView1.Series.Clear();
radChartView1.Series.Add(bs);
radChartView1.GetArea<CartesianArea>().Orientation = Orientation.Horizontal;

Workaround:
CategoricalAxis Axis = radChartView1.Axes.Get<CategoricalAxis>(1);
Axis.LabelFormat = "{0:000000}";

Completed
Last Updated: 09 Oct 2014 07:27 by ADMIN
To reproduce:

Create a RadChartView, add a ZoomController and set the ShowGrid property to true:

ScatterSeries series = new ScatterSeries();
series.DataPoints.Add(new ScatterDataPoint(5, 5));
series.DataPoints.Add(new ScatterDataPoint(4, 2));
series.DataPoints.Add(new ScatterDataPoint(-1, 3));
series.DataPoints.Add(new ScatterDataPoint(11, 4));
chart.Series.Add(series);


chart.Controllers.Add(new LassoZoomController());
chart.ShowGrid = true;

You will see that the grid is painted outside of the chart area where the points are

Completed
Last Updated: 26 Jun 2015 07:34 by ADMIN
To reproduce:

Create a RadChartView with LineSeries. Subscribe to the CreatePointElement event and use the following code:

void Chart_CreatePointElement(object sender, ChartViewCreatePointElementEventArgs e)
{
    e.DataPointElement = new DataPointElement(e.DataPoint);
    e.DataPointElement.GradientStyle = GradientStyles.Solid;
    e.DataPointElement.GradientAngle = 270;
    e.DataPointElement.Shape = new DiamondShape();
    e.DataPointElement.BackColor = Color.Red;
    e.DataPointElement.BackColor2 = Color.Blue;
    e.DataPointElement.BackColor3 = Color.Blue;
    e.DataPointElement.BackColor4 = Color.Blue;
}

The elements paint when you use ChamferedRectShape.

Workaround 
class MyDiamondShape : ElementShape
{
    public override GraphicsPath CreatePath(Rectangle bounds)
    {
        GraphicsPath path = new GraphicsPath();
        
        path.AddPolygon(new PointF[]
        {
            new PointF(bounds.X + 0.5f * bounds.Width, bounds.Top),
            new PointF(bounds.Right, bounds.Y + 0.5f * bounds.Height),
            new PointF(bounds.X + 0.5f * bounds.Width, bounds.Bottom),
            new PointF(bounds.Left, bounds.Y + 0.5f * bounds.Height)
        });
    
        return path;
    }
}

class MyStarShape : ElementShape
{
    private int arms;
    private float innerRadiusRatio;
    
    public MyStarShape()
    {
        this.arms = 8;
        this.innerRadiusRatio = 0.2f;
    }
    
    /// <summary>
    /// Creates Star like shape. Overrides CreatePath method in the base class
    /// ElementShape.
    /// </summary>
    public override GraphicsPath CreatePath(Rectangle bounds)
    {
        GraphicsPath path = new GraphicsPath();
        
        double angle = Math.PI / arms;
        double offset = Math.PI / 2d;
        PointF center = new PointF(bounds.X + bounds.Width / 2f, bounds.Y + bounds.Height / 2f);
        PointF[] points = new PointF[arms * 2];
        
        for (int i = 0; i < 2 * arms; i++)
        {
            float r = (i & 1) == 0 ? bounds.Width / 2f : bounds.Width / 2f * innerRadiusRatio;
            
            float currX = center.X + (float)Math.Cos(i * angle - offset) * r;
            float currY = center.Y + (float)Math.Sin(i * angle - offset) * r;
        
            points[i] = new PointF(currX, currY);
        }
        
        path.AddPolygon(points);
        return path;
    }
}

class MyHeartShape : ElementShape
{
    public override GraphicsPath CreatePath(Rectangle bounds)
    {
        GraphicsPath path = new GraphicsPath();
        
        path.AddArc(new Rectangle(bounds.X, bounds.Y, bounds.Width / 2, bounds.Height / 2), 150, 210);
        path.AddArc(new Rectangle(bounds.X + bounds.Width / 2, bounds.Y, bounds.Width / 2, bounds.Height / 2), 180, 210);
        path.AddLine(path.GetLastPoint(), new Point(bounds.X + bounds.Width / 2, bounds.Bottom));
        path.CloseFigure();
    
        return path;
    }
    
}
Completed
Last Updated: 11 Feb 2015 07:37 by ADMIN
ADMIN
Created by: Dimitar
Comments: 2
Category: ChartView
Type: Feature Request
0
ADD. RadChartView - add waterfall series type.
Completed
Last Updated: 24 Jan 2015 12:04 by ADMIN
To reproduce:
Add a RadChartView and use the following code:

public Form1()
{
    InitializeComponent();

    this.radChartView1.ShowTrackBall = true;
    this.radChartView1.ShowLegend = true;
    Random rand = new Random();
    var lineSeries = new LineSeries();
    for (int i = 0; i < 1000; i++)
    {
        lineSeries.DataPoints.Add(new CategoricalDataPoint(i, rand.Next(0, rand.Next(5, 20))));
    }
    radChartView1.Series.Add(lineSeries);
}

Workaround: change the LegendPosition:
this.radChartView1.ChartElement.LegendPosition = LegendPosition.Bottom;


Completed
Last Updated: 12 Jun 2014 11:35 by Chris Ward
To reproduce:

Have a RadButton and a RadChartView on a form. On button click use the following code:
private void GenerateSeries()
{
    LineSeries lineSeries = new LineSeries();
    lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan") { Label = "January" });
    lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr"));
    lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul"));
    lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct"));
    lineSeries.LegendTitle = "Line 1 ";
    this.Chart.Series.Add(lineSeries);
    lineSeries.BackColor = Color.Black;
    lineSeries.PointSize = new SizeF(15, 15);

    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"));

    lineSeries2.LegendTitle = "Line 2 ";
    this.Chart.Series.Add(lineSeries2);
}

void RadButton_Click(object sender, EventArgs e)
{
    this.Chart.Series.Clear();
    this.GenerateSeries();
}


You will notice that the memory will not decrease after a few presses of the button.

Workaround:

Set the Provider of the LegendElement to null:

private void GenerateSeries()
{
    this.Chart.ChartElement.LegendElement.Provider = null;


    LineSeries lineSeries = new LineSeries();
    lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan") { Label = "January" });
    lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr"));
    lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul"));
    lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct"));
    lineSeries.LegendTitle = "Line 1 ";
    this.Chart.Series.Add(lineSeries);
    lineSeries.BackColor = Color.Black;
    lineSeries.PointSize = new SizeF(15, 15);

    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"));

    lineSeries2.LegendTitle = "Line 2 ";
    this.Chart.Series.Add(lineSeries2);
}

void Button_Click(object sender, EventArgs e)
{
    this.Chart.Series.Clear();
    this.GenerateSeries();
}
Completed
Last Updated: 08 May 2014 10:06 by ADMIN
To reproduce: use the following code snippet
public Form1()
{
    InitializeComponent();

    ScatterLineSeries scatterSeries = new ScatterLineSeries();
    scatterSeries.DataPoints.Add(new ScatterDataPoint(15, 19));
    scatterSeries.DataPoints.Add(new ScatterDataPoint(18, 10));
    scatterSeries.DataPoints.Add(new ScatterDataPoint(13, 15));
    scatterSeries.DataPoints.Add(new ScatterDataPoint(10, 8));
    scatterSeries.DataPoints.Add(new ScatterDataPoint(5, 2));
    scatterSeries.PointSize = new SizeF(8, 8);
    this.radChartView1.Series.Add(scatterSeries);

    ScatterLineSeries scatterSeries2 = new ScatterLineSeries();
    scatterSeries2.DataPoints.Add(new ScatterDataPoint(2, 24));
    scatterSeries2.DataPoints.Add(new ScatterDataPoint(7, 12));
    scatterSeries2.DataPoints.Add(new ScatterDataPoint(15, 10));
    scatterSeries2.DataPoints.Add(new ScatterDataPoint(18, 22));
    scatterSeries2.DataPoints.Add(new ScatterDataPoint(20, 20));
    scatterSeries2.Shape = new RoundRectShape(1);
    scatterSeries2.PointSize = new SizeF(8, 8);
    this.radChartView1.Series.Add(scatterSeries2);
    
    ChartTooltipController toolTipController = new ChartTooltipController();
   
    radChartView1.Controllers.Add(toolTipController); 
}

Workaround: use custom renderer

public Form1()
{
    InitializeComponent();

    this.radChartView1.CreateRenderer += radChartView1_CreateRenderer;
}
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++)
        {
            ScatterSeriesDrawPart scatterPart = this.DrawParts[i] as ScatterSeriesDrawPart;
            if (scatterPart != null)
            {
                this.DrawParts[i] = new CustomScatterSeriesDrawPart((ScatterLineSeries)scatterPart.Element, this);
            }
        }
    }
}

public class CustomScatterSeriesDrawPart : ScatterLineSeriesDrawPart
{
    public CustomScatterSeriesDrawPart(ScatterLineSeries series, IChartRenderer renderer) 
        : base(series, renderer)
    {
    }

    public override DataPoint HitTest(Point location)
    {
        for (int i = 0; i < this.Element.DataPoints.Count; i++)
        {
            RadRect slot = this.Element.DataPoints[i].LayoutSlot;
            float pointHalfWidth = this.Element.PointSize.Width / 2;
            float pointHalfHeight = this.Element.PointSize.Height / 2;

            RectangleF scatterBounds = new RectangleF((float)(this.OffsetX + slot.X - pointHalfWidth),
                (float)(this.OffsetY + slot.Y - pointHalfHeight), this.Element.PointSize.Width, this.Element.PointSize.Height);

            if (scatterBounds.Contains(location.X, location.Y))
            {
                return this.Element.DataPoints[i];
            }
        }

        return null;
    }
}
Completed
Last Updated: 12 May 2014 15:45 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: ChartView
Type: Feature Request
0

			
Completed
Last Updated: 28 Jan 2015 16:21 by ADMIN
To reproduce:


You need a RadChartView with some series. You need to add a new View - 


radChartView1.Views.AddNew("Bigger");


You also need to add a DrillDownController:


DrillDownController drillcontrol = new DrillDownController();
radChartView1.Controllers.Add(drillcontrol);
radChartView1.ShowDrillNavigation = true;


On the Drill event of RadChartView you need to reload the chart. This must clear the axes on the current view (determined by the drill level) and add new ones. You will see that the legend will not update. 


Additional details can be found in the attached project.


Workaround:


Re-add the legend items manually:


private void radChartView1_Drill(object sender, DrillEventArgs e)
{
    if (e.Level == 0)
        BiggerView = false;
    else
        BiggerView = true;


    ReloadChart();

    this.radChartView1.ChartElement.LegendElement.StackElement.Children.Clear();
    ChartView currentView = this.radChartView1.Views[BiggerView ? 1 : 0];
    foreach (ChartSeries series in currentView.Series)
    {
        LegendItem item = new LegendItem(series)
        {
            Title = series.Name
        };


        LegendItemElement element = new LegendItemElement(item);
        this.radChartView1.ChartElement.LegendElement.StackElement.Children.Add(element);
    }
}


Completed
Last Updated: 20 Oct 2014 13:59 by ADMIN
With significant number of points in pie series and with very small values as data points, the default chart strategy for positioning smart labels overlaps the values.

Note: the smart labels overlapping can be reproduced with DonutSeries as well.
Completed
Last Updated: 01 Oct 2014 12:13 by ADMIN
To reproduce:

Use the following code with RadChartView: 

this.Chart.Series.Add(new LineSeries());


for (int i = 0; i < 50; i++)
{
    if (i == 10)
    {
        this.Chart.Series[0].DataPoints.Add(new CategoricalDataPoint(1));
        continue;
    }


    this.Chart.Series[0].DataPoints.Add(new CategoricalDataPoint(0));
}

this.Chart.ShowGrid = true;

You will see that the point will not be rendered correctly and will be taller than 1.

Completed
Last Updated: 16 Mar 2015 07:49 by ADMIN
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
Completed
Last Updated: 29 May 2014 13:17 by ADMIN
To reproduce:

Setup the following RadChartView:

this.Chart.ShowLegend = true;
this.Chart.Series.Add(new LineSeries() { LegendTitle = "DDDD" });
this.Chart.ChartElement.LegendElement.Items[0].Element.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;


for (int i = 0; i < 10; i++)
{
    this.Chart.Series[0].DataPoints.Add(i);
}


You will see that although that you have changed the BorderDashStyle of the Element, the LineSerie will be drawn normally.
Completed
Last Updated: 30 Jan 2015 17:50 by ADMIN
When one adds data points with negative and positive values, the negative ones should go below the 0, for example, with the following data:

AreaSeries areaSeries = new AreaSeries();
areaSeries.DataPoints.Add(new CategoricalDataPoint(5, "Jan"));
areaSeries.DataPoints.Add(new CategoricalDataPoint(-10, "Apr"));

Resolution: 
To use the functionality one should set the StartPositionAxis and StartPositionValue properties of an axis. The first property is the axis along which the current axis will be aligned. The second is the value where the current axis should be positioned.
Here is a sample code: 
AreaSeries areaSeries = new AreaSeries();
areaSeries.DataPoints.Add(new CategoricalDataPoint(13, "Jan"));
areaSeries.DataPoints.Add(new CategoricalDataPoint(20, "Apr"));
areaSeries.DataPoints.Add(new CategoricalDataPoint(-15, "Jul"));
areaSeries.DataPoints.Add(new CategoricalDataPoint(16, "Oct"));
this.radChartView1.Series.Add(areaSeries);

areaSeries.HorizontalAxis.StartPositionAxis = areaSeries.VerticalAxis;
areaSeries.HorizontalAxis.StartPositionValue = 0; 
Completed
Last Updated: 30 Jan 2015 13:18 by ADMIN
To reproduce:

Add a RadChartView to a Form. Use the following code:

this.Chart.AreaType = ChartAreaType.Pie;
this.Chart.ShowLegend = true;
PieSeries series = new PieSeries();
series.DataPoints.Add(new PieDataPoint(50, "Germany"));
series.DataPoints.Add(new PieDataPoint(70, "United States"));
series.DataPoints.Add(new PieDataPoint(40, "France"));
series.DataPoints.Add(new PieDataPoint(25, "United Kingdom"));
series.ShowLabels = true;
this.Chart.Series.Add(series);

Workaround:

Private Sub LegendElement_VisualItemCreating(sender As Object, e As LegendItemElementCreatingEventArgs)
    Dim pieElement As PiePointElement = DirectCast(e.LegendItem.Element, PiePointElement)
    Dim dataPoint As PieDataPoint = DirectCast(pieElement.DataPoint, PieDataPoint)
    e.LegendItem.Title = dataPoint.Name
End Sub
Completed
Last Updated: 30 Jan 2015 13:03 by ADMIN
Add BarSeries with several CategoricalDataPoint with some long category text. 
Change the chart's area orientation, then you will notice that the AxisLabelElements overlaps the axis
Completed
Last Updated: 20 Feb 2014 15:04 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: ChartView
Type: Feature Request
0
The Step Line chart type is similar to the Line chart type, but it does not use the shortest distance to connect two data points. Instead, this chart type uses vertical and horizontal lines to connect the data points in a series forming a step-like progression.
Completed
Last Updated: 31 Mar 2014 09:05 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: ChartView
Type: Bug Report
0
To reproduce: -add RadChartView and use the following code: this.radChartView1.AreaType = ChartAreaType.Pie; PieSeries series = new PieSeries(); series.DataPoints.Add(new PieDataPoint(50, "Germany")); series.DataPoints.Add(new PieDataPoint(70, "United States")); series.DataPoints.Add(new PieDataPoint(40, "France")); series.DataPoints.Add(new PieDataPoint(25, "United Kingdom")); series.ShowLabels = true; this.radChartView1.Series.Add(series);

Workaround: recreate the ChartDataPointElementController: this.radChartView1.AreaType = ChartAreaType.Pie; this.radChartView1.Controllers.RemoveAt(0); this.radChartView1.Controllers.Add(new ChartDataPointElementController()); PieSeries series = new PieSeries(); series.DataPoints.Add(new PieDataPoint(50, "Germany")); series.DataPoints.Add(new PieDataPoint(70, "United States")); series.DataPoints.Add(new PieDataPoint(40, "France")); series.DataPoints.Add(new PieDataPoint(25, "United Kingdom")); series.ShowLabels = true; this.radChartView1.Series.Add(series);