Facing a lot of issues in line series

Thread is closed for posting
2 posts, 0 answers
  1. Rohit Banerjee
    Rohit Banerjee avatar
    4 posts
    Member since:
    Dec 2009

    Posted 24 Feb 2010 Link to this post

    Hi,
     I was trying to work with silverlight line series and i am facing with the following issues:
    1. I have 349 records in my list. I have 4 line series and i am trying to attach each one of them individually. But it is extremely slow and sometimes it hangs. I am not using any animation. Just at my xaml i have declared:

    <

     

    telerikChart:RadChart x:Name="RadChart2" Background="Transparent" UseDefaultLayout="False" Grid.Row="1">

     

     

     

     

    <telerikCharting:ChartArea x:Name="webChartHPI"

     

     

     

    Margin="0,0,0,1"

     

     

     

    HorizontalAlignment="Stretch"

     

     

     

    VerticalAlignment="Top"

     

     

     

    FontFamily="Calibri"

     

     

     

    FontSize="10"

     

     

     

    >

     

     

     

     

    </telerikCharting:ChartArea>

     

     

     

     

    </telerikChart:RadChart>

    and my code says ( for each individual series):

     

    foreach

     

    (xxx.myclass sr in e.Result)

     

    {

     

     

    DataPoint dataPoint = new DataPoint();

     

    dataPoint.XValue =

     

    Convert.ToDouble(sr.Year);

     

    dataPoint.YValue =

     

    Convert.ToDouble(sr.Percent);

     

    mySeries.Add(dataPoint);

    }

    mySeries.Definition =

     

    new LineSeriesDefinition();

     

    mySeries.Definition.ShowItemLabels =

     

    false;

     

    mySeries.Definition.Appearance.Stroke = (

     

    new SolidColorBrush(Color.FromArgb(255, 252, 237, 64))) as Brush;

     

    mySeries.Definition.Appearance.Fill = (

     

    new SolidColorBrush(Color.FromArgb(255, 252, 237, 64))) as Brush;

     

    mySeries.LegendLabel =

     

    "CBSA Level HPI";

     

    webChartHPI.DataSeries.Add(mySeries);

     

     

    All series have 349 records with the same X axis but the Y axis varies

    2. I am not able to display Legends. Do i have to put <telerikcharting: legends > separately to achive this? Also i want the legend to display on the top left of the chart like in excel but not able to do so.

    3. My third problem is i am not able to display negative values in a line series. This chart is completely different from that mentioned in 1. It has some 200 values having both +ve and -ve values for Y axis. But it is not displaying the -ve region. The chart was not even displaying and was hanging my machine. But when i put 

     

    loanChartControl.AxisY.AutoRange =

     

    false;

     

     

     

    it started displaying but then again i think this stopped it from displaying the -ve axis.

    4. My final problem is with the chart size. I cannot shrink the size of the chart. It is taking the entire cell space. Also does the values displayed in the x axis depend on the space it gets ? I am not able to reduce the line series thickness as well.


    The version i am using is 2009.2.812.1030 for Telerik.Windows.Controls.Charting.

    Please help me asap.

     

  2. Velin
    Admin
    Velin avatar
    391 posts

    Posted 01 Mar 2010 Link to this post

    Hello Rohit Banerjee,

    1.     First of all we would suggest you to upgrade your control libraries to the latest version available as there is a number of performance improvements added. We would also like to point your attention to this forum thread containing some useful tips about performance in RadChart.

    2.     "I am not able to display Legends. Do i have to put <telerikcharting: legends > separately to achive this? Also i want the legend to display on the top left of the chart like in excel but not able to do so." - RadChart provides automatic chart layout including ChartLegend, but unfortunately this feature is turned off in your code. To turn it on you should either set the UseDefaultLayout property of RadChart to true or add manually a ChartLegend instance like shown in this example and this blog post.

    3.     Upgrading to the latest binaries should fix the problem.

    4.     "My final problem is with the chart size. I cannot shrink the size of the chart. It is taking the entire cell space" - with the upcoming Q1 release(expected in the midst of march) there will be a property that will allow you to reduce the size of the Pie chart.


    Hope this helps.

    Kind regards,
    Velin
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top