Migrating from RadChart

4 posts, 1 answers
  1. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 31 Dec 2012 Link to this post


    I'm about to migrate from RadChart to ChartView.
    Really like the clean design and as I think more .net like API of the new ChartView.
    However, a couple of questions arise:

    Pie Charts:

    When I add PieData Points to a Series specifing value/name, I'd expect the name to be used in the legend by default. Using the forum I found a work-around, but what's the reasoning behind not displaying the name in the Legend?

    foreach(LegendItem li in this.groupingChartView.ChartElement.LegendElement.Items)
       PiePointElement ppe = li.Element as PiePointElement;
       PieDataPoint pdp = ppe.DataPoint as PieDataPoint;
       li.Title = pdp.Name;

    The Pies do not always seem to paint correctly in the center of the Pie

    Bar Chart

    Is there a way to use Timespan  Values on the Y Axis and format them correctly?
    I have days on X Axis and Timespan on Y. Currently I display duration is in minutes, I would like to format the labels on the Y axes as "hh:mm",  Is that possible?

    When I use a DateTimeCategoricalAxis for X, and there are no data points for a particular day, the day is left out. I worked around this by generating empty Datapoints with the Value 0, but that requires additional iteration over the data. Is there a more elegant way?

    Is there a way to display bars for several series slightly overlapping on the same category?

    I have attached the pictures of the same Graph in RadChart and ChartView. Currently the smaller area of bars in the chartview version gives a wrong impression.

    For all Charts: "smart" Labels would help a lot.

    Kind regards and Happy New Year everyone!

  2. Answer
    Ivan Petrov
    Ivan Petrov avatar
    701 posts

    Posted 04 Jan 2013 Link to this post

    Hi Erwin,

    Thank you for writing.

    There are people who want to show the value as well as people who want to show the name of a pie segment in the legend. We had to choose one option knowing that there would be people wanting the other. 

    In regards to the visual glitch, this is caused by the small values of the segments. Because the tip of the segment is practically the crossing point of two lines, when the size of the segments is small and their border is more than 1 pixel in width the outer lines of the border cross further than the inner lines making the segment longer and overlapping other segments. To work around this issue you can set the border width of the segments to 1 or 0 pixel(s):
    foreach (UIChartElement element in this.radChartView1.Series[0].Children)
      element.BorderWidth = 1.0f;
    About the bar chart:
    To format time span value you can use a custom IFormatProvider for the labels. 
    For the horizontal axis you can use a DateTimeContinuousAxis which does not skip missing days. However in order for bar series combine mode to work properly you should fill the missing series points with 0 values. I have attached an example project which demonstrates the above.

    Intelligent labels are on our roadmap for the next release.

    I hope this is useful. Should you have further questions, I would be glad to help.

    Ivan Petrov
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. DevCraft R3 2016 release webinar banner
  4. Travis
    Travis avatar
    49 posts
    Member since:
    Dec 2012

    Posted 24 Apr 2013 Link to this post

    I don't know about the labels, but I just got done with a round of reporting (int)TimeSpan.TotalSeconds from a milliseconds-accurate X-axis. What ended up displaying was about what you'd expect: 0, 1, 2, 3, and so on through 60 (in our case). To facilitate that I did need to pass that in to CategoricalDataPoint() for the object parameter. Seems to work well enough. HTH.
  5. Ivan Petrov
    Ivan Petrov avatar
    701 posts

    Posted 29 Apr 2013 Link to this post

    Hello Michael,

    Thank you for writing and thank you for taking the time to share your solution with the community. 

    Should you need assistance with RadChartView or any other control, we will be happy to help.

    All the best,
    Ivan Petrov
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Back to Top