User (Legacy) Posted June 23, 2005 Report Share Posted June 23, 2005 I am new to ChartFX and am trying to create a (.Net) Windows Forms application where one part of it mimmics the Microsoft Project Gantt chart. The data lends itself to that style very well. However, I was unable to find any sample code or examples, either on the ChartFX website nor in the resource center on how to do this. Any help and/or code samples would be greatly appreciated. Thanks, Jim Link to comment Share on other sites More sharing options...
Software FX Posted June 24, 2005 Report Share Posted June 24, 2005 MS Project Gantt charts can get pretty complicated with milestones, activity progress and many many things. Can you be more specific as to what chart do you want, maybe a screenshot of the chart you want is MS project indicating how your data is stored. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted June 24, 2005 Author Report Share Posted June 24, 2005 Francisco, Thank you for responding to my post and taking the time to help me out. The attachment Image1.jpg shows an older application we developed using VB6 and a TrueGrid (v5.0) control. As you can see, it looks very much like MS Project with a data grid on the left and the Gantt chart on the right. The attachment Image2.jpg shows what I have so far using VB.Net and the ChartFX DevStudio (v6.2.1342.0) control. I am using the standard VB.Net data grid on the top and for now your Gantt chart control is along the bottom. The issues I am having are: 1) The same SQL statement is being used for both the data grid and the Gantt chart. Note that order number 0000001614 is at the top on the data grid and it's at the bottom on the Gantt chart (note scroll bar on the Gantt chart) 2) The horizontal axis is numeric. Your documentation states you can set the Min and Max values for the X and Y axis using something like Chart1.AxisY.Min = DateTime.Today.ToOADate. Even when I use this, I still get numbers since the Min and Max values are numeric values and not date values. I must be missing some other setting. 3) Note that orders 0000001614 and 0000005632 have very different start and end dates. The Gantt chart does not reflect this like the original app. Perhaps if I could get the correct settings for the Gantt chart, it would but I don't know what those settings have to be. The code behind the "Show Gantt Chart" button is as follows: Dim mySelectQuery As String = "Select ORD_NBR, PLAN_START_DT, PLN_DUE_DT from SOPN where WCTR_ID = '" & txtWorkCenter.Text & "'" Dim myConnString As String = SQL_CONNECTION_STRING Dim myConnection As New SqlConnection myConnection.ConnectionString = ConnectionString.ToString Dim myCommand As New SqlCommand(mySelectQuery, myConnection) myConnection.Open() Dim myReader As SqlDataReader myReader = myCommand.ExecuteReader() 'Chart1.AxisY.Min = DateTime.Today.ToOADate 'Chart1.AxisY.Max = DateTime.Today.AddDays(120).ToOADate '3 months Chart1.DataSourceSettings.DataType(0) = SoftwareFX.ChartFX.DataType.Label Chart1.DataSourceSettings.DataType(1) = SoftwareFX.ChartFX.DataType.Value Chart1.DataSourceSettings.DataType(2) = SoftwareFX.ChartFX.DataType.Value Chart1.DataSourceSettings.DataSource = myReader myReader.Close() myConnection.Close() I guess my final question is whether your product can duplicate the same functionality of the TrueGrid control showing a data grid along with the Gantt chart side-by-side so that when you scroll through the grid, you also scroll through the Gantt chart as well, having the same look and feel as MSProject. Thanks and regards, Jim "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:Wkc2WbMeFHA.208@webserver3.softwarefx.com... > MS Project Gantt charts can get pretty complicated with milestones, activity > progress and many many things. > > Can you be more specific as to what chart do you want, maybe a screenshot of > the chart you want is MS project indicating how your data is stored. > > -- > Francisco Padron > www.chartfx.com > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.