Line graph, matching one comes sweeps

4 posts, 0 answers
  1. sumin park
    sumin park avatar
    10 posts
    Member since:
    Sep 2009

    Posted 07 Dec 2009 Link to this post

    In the next Code,
    When you run the program,
    Line graph, matching one comes sweeps.

    What's wrong?
    What can I change?



           public MainPage()
            {
                InitializeComponent();
                SeriesMapping sm1 = new SeriesMapping();
                BarSeriesDefinition d1 = new BarSeriesDefinition();
                sm1.SeriesDefinition = d1;
                sm1.LegendLabel = "Bar Series";
                sm1.CollectionIndex = 0;

                ItemMapping im1 = new ItemMapping();
                im1.DataPointMember = DataPointMember.YValue;
                sm1.ItemMappings.Add(im1);

                SeriesMapping sm2 = new SeriesMapping();
                SplineSeriesDefinition d2 = new SplineSeriesDefinition();
                sm2.SeriesDefinition = d2;
                sm2.LegendLabel = "Spline Series";
                sm2.CollectionIndex = 1;

                ItemMapping im2 = new ItemMapping();
                im2.DataPointMember = DataPointMember.YValue;
                sm2.ItemMappings.Add(im2);

                RadChart1.SeriesMappings.Add(sm1);
                RadChart1.SeriesMappings.Add(sm2);

                List<double[]> itemsSource = new List<double[]>
                {
                   
                    new double[]{10,11,12,13,14,15,16,17,18,19,10,11,12,13,14,15,16,17,18,19},
                    new double[]{0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9}
                };

               
                this.RadChart1.DefaultView.ChartArea.AxisX.AutoRange = false;

                //this.RadChart1.DefaultView.ChartArea.AxisX.AddRange(1, 5, 1);
                this.RadChart1.DefaultView.ChartArea.AxisX.MinValue = 1;
                this.RadChart1.DefaultView.ChartArea.AxisX.MaxValue = 21;
                this.RadChart1.DefaultView.ChartArea.AxisX.Step = 1;

                this.RadChart1.ItemsSource = itemsSource;

  2. Vladimir Milev
    Admin
    Vladimir Milev avatar
    1061 posts

    Posted 08 Dec 2009 Link to this post

    Hi sumin park,

    We're not really sure we understand what you are saying. Can you please show us a picture of the desired outcome of the chart and we will let you know if it can be achieved (and how) with RadChart.

    Regards,
    Vladimir Milev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. sumin park
    sumin park avatar
    10 posts
    Member since:
    Sep 2009

    Posted 08 Dec 2009 Link to this post

    I insert 40 point, but X Asix is 0~40 (41 points).
    Y Asix is 40 Points.
    X Asix Is one more point..
    I attach picture..








    total source code..
                SeriesMapping sm1 = new SeriesMapping();
                BarSeriesDefinition d1 = new BarSeriesDefinition();
                sm1.SeriesDefinition = d1;
                sm1.LegendLabel = "Bar Series";
                sm1.CollectionIndex = 0;

                ItemMapping im1 = new ItemMapping();
                im1.DataPointMember = DataPointMember.YValue;
                sm1.ItemMappings.Add(im1);

                SeriesMapping sm2 = new SeriesMapping();
                SplineSeriesDefinition d2 = new SplineSeriesDefinition();
                sm2.SeriesDefinition = d2;
                sm2.LegendLabel = "Spline Series";
                sm2.CollectionIndex = 1;

                ItemMapping im2 = new ItemMapping();
                im2.DataPointMember = DataPointMember.YValue;
                sm2.ItemMappings.Add(im2);

                RadChart1.SeriesMappings.Add(sm1);
                RadChart1.SeriesMappings.Add(sm2);

                List<double[]> itemsSource = new List<double[]>
                {
                    
                    new double[]{10,11,12,13,14,15,16,17,18,19,10,11,12,13,14,15,16,17,18,19,10,11,12,13,14,15,16,17,18,19,10,11,12,13,14,15,16,17,18,19},
                    new double[]{1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0}
                    //new double[]{10,11,12,13,14,15,16,17,18,19},
                    //new double[]{1,2,3,4,5,6,7,8,9,0}
                };

                
                this.RadChart1.DefaultView.ChartArea.AxisX.AutoRange = false;
                this.RadChart1.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Normal;

                //this.RadChart1.DefaultView.ChartArea.AxisX.AddRange(5, 11, 1);
                //this.RadChart1.DefaultView.ChartArea.AxisX.MinValue = 5;
                //this.RadChart1.DefaultView.ChartArea.AxisX.MinValue = 0;
                this.RadChart1.DefaultView.ChartArea.AxisX.MinValue = 0;
                this.RadChart1.DefaultView.ChartArea.AxisX.MaxValue = 40;
                this.RadChart1.DefaultView.ChartArea.AxisX.Step = 1;
                this.RadChart1.DefaultView.ChartArea.AxisX.LabelStep = 1;
                




                this.RadChart1.ItemsSource = itemsSource;

  4. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 11 Dec 2009 Link to this post

    Hi sumin park,

    This problem will be addressed in the latest internal build available for download in your Client.Net account later today.

    Hope this helps.

    All the best,
    Manuel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top