Chart with custom X Axis like Pivot Chart in Excel

4 posts, 0 answers
  1. Waqas
    Waqas avatar
    9 posts
    Member since:
    Oct 2011

    Posted 18 Oct 2012 Link to this post

    Hi, i want to achieve some thing like "Pivot chart in Excel". i need to design custom x axis as shown in image. can you please give me any idea how to achieve it in RadChart.
  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 22 Oct 2012 Link to this post

    Hello Waqas,

    Thank you for the attachment.

    What I immediately see is the axis. It seems that this chart has some sort of double grouping on the horizontal axis - first it is grouped by the Date and then it is grouped by (what I guess is) the Name. Unfortunately the RadChart does not have such grouping capabilities. However I have attached a simple project to demonstrate one possible work-around for this.

    Apart from this, I think that you can get everything else you need from the RadChart. You can control the appearance and set a different color for the line, set different point marks, set horizontal grid lines and more.

    References:
    Point Marks
    Grid Lines
    Strip Lines

    If you have not yet started integrating the RadChart into your actual app then I would suggest you consider using the RadChartView instead. The ChartView is a newer control with a higher performance rate and it is generally more flexible then the RadChart.

    Regards,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Sayid
    Sayid avatar
    1 posts
    Member since:
    Jan 2013

    Posted 04 Jan 2013 Link to this post

    Hello Petar,

    The solution you proposed for the problem is really a good one, if we know total number of series. As you added date under second series name "obj2" which makes it look like pivot chart as per requirement. But if total number of series is dynamic and unknown in start then I think that will be really nuisance  to adjust the location of second label. Also your solution may not look that good for even number of series.

    It will be really a pleasure if we could see an actual support of these kind of charts in coming versions.

    PS. I hope I understood your implementation correctly 

    Regards,
    Sayid
  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 08 Jan 2013 Link to this post

    Hello Sayid,

    In the attached project there is only one series. The project was based on the picture you had provided, in which again there is only one series - line series. This being the case - there should be no problems to add new series. I have attached a modified version of the previous attachment to demonstrate this.

    However, the proposed work-around is tightly coupled to the fact that there is a double grouping on the X axis. I hope that you will be able to adjust this code to fit your requirements. 

    All the best,
    Petar Marchev
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top