This is a migrated thread and some comments may be shown as answers.

Using Range Bar Graph as Gantt view

3 Answers 190 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 21 Nov 2013, 11:59 AM
Hi,
I want to graphically show a simple project schedule on a report (i.e simple Gantt). I think the Range Bar graph may be suitable but can't get it to work and can't find any examples or documentation, is there anything available?
I want to list each job on the Y axis with dates on the X axis. with a Bar between start and end dates for each job.
Here is an example of the object data-source I'm using:
public class ProjectSchedule
{
    public ProjectSchedule() { }
    public string JobName { get; set; }
    public DateTime Start { get; set; }
    public DateTime End { get; set; }
    public static List<ProjectSchedule> GetSchedule()
    {
        return new List<ProjectSchedule>(){
            new ProjectSchedule(){ JobName="JOB1", Start=DateTime.Now.AddDays(5), End=DateTime.Now.AddDays(10)},
            new ProjectSchedule(){ JobName="JOB2", Start=DateTime.Now.AddDays(5), End=DateTime.Now.AddDays(15)},
            new ProjectSchedule(){ JobName="JOB3", Start=DateTime.Now.AddDays(3), End=DateTime.Now.AddDays(7)},
            new ProjectSchedule(){ JobName="JOB3", Start=DateTime.Now.AddDays(10), End=DateTime.Now.AddDays(18)}
        };
    }
}

Any help greatly appreciated.

3 Answers, 1 is accepted

Sort by
0
Accepted
Stef
Telerik team
answered on 22 Nov 2013, 03:45 PM
Hi Simon,

The attached sample report definition is created based on the one provided in your support ticket on the same question. The change is we have set the BarSeries.DataPointStyle.Visible to true. If you want a single bar to take the whole space, remove the grouping from the SeriesGroups and use the DataPointConditionalFormatting option to color the data points.

Let us know if you need any further help.

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

0
Marius
Top achievements
Rank 1
answered on 28 Jul 2015, 02:04 AM

Hi,

Do you have a range chart similar to the one attached (google timeline) wherein the bars are side by side?

 

Thanks.

0
Stef
Telerik team
answered on 28 Jul 2015, 09:39 AM
Hi Marius,

Please test if using a Stacked Bar chart suits your requirements - How to: Create Bar Chart.

Regards,
Stef
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Simon
Top achievements
Rank 1
Answers by
Stef
Telerik team
Marius
Top achievements
Rank 1
Share this question
or