Create Gantt Chart

3 posts, 0 answers
  1. Hannes
    Hannes avatar
    3 posts
    Member since:
    Jun 2012

    Posted 31 Aug 2011 Link to this post

    I want to create a Gantt Chart. And the Datastructure is like this:
    maschine 1   from 01.08.2011 19:00 to 01.08.2011 22:15
    maschine 1   from 02.08.2011 12:00 to 02.08.2011 14:00
    maschine 2 from 1.08.2011 11:00 to 01.08.2011 13:00
    maschine 2 from 2.08.2011 13:00 to 02.08.2011 14:00
    and so on.
    I want that the x axis include the maschine and on the y- axis are this timeareas.  I bind my datatable to the radchart. But  i have over 400 rows in this (but only 100 machines) . So in my chart i  get over 400 x-axis labels. I want to group my data for one machine . I hope you could understand. thanks a lot!
    edit: i attached an example from my radchart. (but only with 5 machines)

  2. Hannes
    Hannes avatar
    3 posts
    Member since:
    Jun 2012

    Posted 05 Sep 2011 Link to this post

    no idea?
    shall i post sourcecode?
  3. DevCraft R3 2016 release webinar banner
  4. Ves
    Ves avatar
    2870 posts

    Posted 05 Sep 2011 Link to this post

    Hi Hannes,

    This happens beacuse RadChart will create a new item in the X axis for each item in the datasource. In order to achieve the desired result, you will need to populate the chart and create the X axis items manually. I have attached a small example showing this. Some notes on it:
    • The datasource should be sorted by the field that provides the values for X axis
    • There is an artificial numeric field added -- it is used for the correct positioning of the ChartSeriesItems along the X axis.

    Kind regards,
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top