xaxis not overlapping on line chart

5 posts, 0 answers
  1. ben
    ben avatar
    10 posts
    Member since:
    Jun 2008

    Posted 03 Mar 2009 Link to this post

    I have created a line chart and add two series.  The series have differing Y values, but each of the two series have 1-12 X values.  The problem is that they are displayed on the X axis repeating, e.g. it shows 24 entries 1-12 and 1-12...why is this?  It displays the second series as a continuation of the first series.  It is like it is not recognizing that the X values accross the two series are the same.

    Thanks,
    Ben
  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 04 Mar 2009 Link to this post

    Hi ben,

    The described scenario should be working fine. We need ou to provide further details and/or the source code that creates the two series to be able to further assist you.

    Here is a sample code, that works as expected:
    public Form1() 
        Random r = new Random(); 
        InitializeComponent(); 
     
        // Create first series 
        ChartSeries series1 = new ChartSeries(); 
        series1.Type = ChartSeriesType.Line; 
        for (int i = 0; i < 12; i++) 
        { 
            series1.AddItem(new ChartSeriesItem(i, r.Next(0, 100))); 
        } 
     
        // Create second series 
        ChartSeries series2 = new ChartSeries(); 
        series2.Type = ChartSeriesType.Line; 
        for (int i = 0; i < 12; i++) 
        { 
            series2.AddItem(new ChartSeriesItem(i, r.Next(0, 100))); 
        } 
         
        // Add series to RadChart 
        this.radChart1.Series.Add(series1); 
        this.radChart1.Series.Add(series2); 

    Best,
    Evtim
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. ben
    ben avatar
    10 posts
    Member since:
    Jun 2008

    Posted 04 Mar 2009 Link to this post

    Well, using this method it works, but if I use a data set and set the bound columns it does not for some reason.  I think it is something funky with my date xaxis.
  5. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 05 Mar 2009 Link to this post

    Hi ben,

    Can you, please, provide a sample application, that we can locally analyze? That way we will be able to provide you with a solution to the problem.

    Regards,
    Evtim
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 05 Mar 2009 Link to this post

    Hi ben,

    Can you, please, provide a sample application, that we can locally analyze? That way we will be able to provide you with a solution to the problem.

    For that purpose, you need to open a support ticket (not in the forums) and attach the project.

    Regards,
    Evtim
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for WinForms is Visual Studio 2017 Ready