We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Chart AxisX problem

To technical support team hello. 1) I want to create gantt like graph ( like tasks graph in Microsoft Project ) 2) Axis X will be ranges of values lets say miliseconds ( int ). 3) Axis Y will be tasks numbers. 4) Certain input have to be like this : ( ( 200, 248 ), 2 ) . It seems that task number two will continue from milisecond 200 to milisecond 248 ( see picture ) | | | | | | | | | | _____ |______________________________________________ | | 200 248 I''ve read your examples carefully but it seems like impossible to do such thing. Can you help me. PS By the way, your HELP manual has to be repaired, there is realy not enough information about properties, methods and classes. Thanks in advance

3 Replies

DJ Davis Jebaraj Syncfusion Team March 31, 2005 09:33 PM UTC

Hi Dima, Please try the code shown below: protected void InitializeChartData() { ChartSeries series = this.chartControl1.Model.NewSeries("Tasks"); series.Name = "Tasks"; series.Text = series.Name; series.Points.Add(1, new double[]{200,248}); series.Points.Add(2, new double[]{248,298}); series.Points.Add(3, new double[]{298,348}); series.Points.Add(4, new double[]{348,408}); series.Points.Add(5, new double[]{408,488}); series.Type = ChartSeriesType.Gantt; this.chartControl1.Series.Add(series); } Each point takes a Y value and a array of 2 X values (The start and end for each Gantt Bar) We are working on the documentation and we will making it available within the next few weeks. Thank you for your patience. Regards, Davis

DI Dima April 3, 2005 10:56 AM UTC

Hi, Davis. Thanks for quick and highly proficient response. Your example realy works. One more question how can I control size of gantt grpah pieces. Lets take your example, if there where only two Points in the series then chart control just streches the graph to fit the whole screen and you get two big ( as half of screen ) and ugly pieces of gantt graph. I would like to have something with contsinat size. Thanks, Dima. P.S. Pay attention to your example. There is BUG in chart control it does not insert the last point ( never ).

DJ Davis Jebaraj Syncfusion Team April 4, 2005 11:00 PM UTC

Hi Dima, The size of the Gantt Bars can be controlled through the PointWidth property of the style property: series.Style.PointWidth = 0.2f; seriesCompletion.Style.PointWidth = 0.1f; Thanks for bringing the issue with the last point not being displayed to our attention. We have a defect report open and the issue should be resolved at the earliest. Thanks, Davis

Live Chat Icon For mobile
Up arrow icon