|
how to set 8 hours per day
|
|
|
|
|
How can i have databind? like this GanttChart1.DataSource = ObjDS.Tables(0)
dttable = ObjDS.Tables(0)
For Each dr As DataRow In dttable.Rows
Devfullname = IIf(IsDBNull(dr.Item("qa")), "", dr.Item("qa"))
Randomize()
With GanttChart1
.FromDate = New Date(2017, 10, 21, 0, 0, 0)
.ToDate = New Date(2017, 10, 25, 0, 0, 0)
Dim lst As New List(Of BarInformation)
lst.Add(New BarInformation(Devfullname, New Date(2017, 10, 21), New Date(2017, 10, 25), Color.Aqua, Color.Khaki, 0))
For Each bar As BarInformation In lst
.AddChartBar(bar.RowText, bar, bar.FromTime, bar.ToTime, bar.Color, bar.HoverColor, bar.Index)
|
|
|
|
|
Very nice control, I was devellopping something similar but your code is really great, I'm going to use it in my project Thank you for sharing this dude !
|
|
|
|
|
Hi,
I ran into the same problem as you. I have to create a GanttChart. Your example is very helpful on this. Now, I wonder how you added the GanttChart(1 to 3) boxes to your form, or did you write the entire code in the form.designer?
Thanks for your help
|
|
|
|
|
Hello everybody.
I am looking for a horizontal scrollbar for this control. Is there anybody who can help me with this ?
I was playing a little bit around with this control and found out, that the bars are shown, even if the starting and ending time of the bar does not fit to the start and ending time of the ganttchart.
Please have a look at the following snippet:
ganttChart1.FromDate = new DateTime(2015, 12, 12, 0, 0, 0);
ganttChart1.ToDate = new DateTime(2015, 12, 24, 0, 0, 0);
lst1.Add(new BarInformation("Row 1", new DateTime(1980, 12, 1), new DateTime(1980, 12, 2), Color.Aqua, Color.Khaki, 0));
lst1.Add(new BarInformation("Row 2", new DateTime(2015, 12, 13), new DateTime(2015, 12, 20), Color.AliceBlue, Color.Khaki, 1));
The bar is shown although the time of the bar does not fit to the time of the ganttchart. How can I hide this ?
modified 13-May-17 12:20pm.
|
|
|
|
|
Hello,
I think i miss something... I do not succeed in getting the control in my own project.
Which of the included files is the control itself (some .dll?)
Any help will be appriciated.
|
|
|
|
|
Is it possible to use this library in a C# (WPF) project?
|
|
|
|
|
Hello everyone!
First i would like to congrats the author for the excellent job.
My question is related to how do I add a real-time vertical bar into the gantt chart??
I was abble to add an static vertical bar adding this code:
grfx.DrawLine(Pens.Red, barStartLeft + index, 0, barStartLeft + index, lastLineStop)
into the GanttChart.vb - ''' Draws the vertical lines
But the moving bar is being a real trouble for me...
Could anyone help me into that solution?
|
|
|
|
|
After changing the value of the bar with the mouse (the barChanged event)
How do I get the new start time value
|
|
|
|
|
After changing the value of the bar with the mouse (the barChanged event)
How do I get the new start time value
|
|
|
|
|
Hello,
What a nice work ! Really big thanks for your code.
I have a question regarding refreshment of the ChartGantt.
I populate ChartGantt with SQL data and when changing an endDate of a row I would like to refresh ChartGantt (repaint it totally). Does any possibility without close my app ?
Thank's
Sylvain
Sorry for my bad English.
|
|
|
|
|
If you just mean to refresh the visible screen, you can simply call Invalidate, or call the PaintChart method which does that for you.
If you mean that you want to reload the entire set of bars based on new data, you would need to manage your own set of bars and re-add them to the chart. You can call the RemoveBars method to remove the bars, and the AddChartBar method for each bar you wish to add back into the chart.
|
|
|
|
|
Hello and thank's for your last answer.
Sorry I didn't work on the project since last time.
RemoveBars is okay but text on the left side of chart isn't removed.
If I redraw the bars with AddBar, I've the old text beyond the new.
Does any possibility to remove this old text ?
Regards,
Sylvain
|
|
|
|
|
Just found what's happend !
I forgot to clear the "
Public lst As New List(Of BarInformation) " before to refresh the gantt.
Everything's now okay.
Sylvain
|
|
|
|
|
When i compile/debug this project F-Secure flags the exe file as Gen:Variant.Barys.53655
Why?
|
|
|
|
|
When the start date is like '2016-01-10', the bar ends at 2016-01-09.How to make it end at 2016-01-10 and change similarly for hour chart?
|
|
|
|
|
It's unclear to me how to add this control to my project.
|
|
|
|
|
Two choices:
1) Download the dll, and reference it in your project
2) Download the source, build it, and reference it in your project
You can add the control to your Toolbox which will enable you to drag and drop it onto a form. Otherwise you can easily create a chart in code, something like this (off the top of my head and untested):
var chart = new GanttChart();
MyForm.Controls.Add(chart);
Although a late response, I hope that this is helpful to anyone confused over how to use the control.
|
|
|
|
|
Dear Sir
I am using gantt chart control but tool tip event ToolTipText_Draw is not working on. I have used the same code as provided by in article.
|
|
|
|
|
Hi
Thanks for the script. Yours seems to be main VB.net script on the planet. It is well written and quite easy to use. I have an urgent requirement to make a gantt chart for a set of activities which occur in less than 59 seconds.. May be ten to 15 activites.
Can you pl give me a hint on how to modify this script to make it work for a tim of 59 secs? I think it is possible, but just cannot figure out how to go about it !
Pl help..
Thanks very much for the script.
Renga
|
|
|
|
|
Hi Adagio.81,
Have you update your control with Horizzontal scrollbar?
Thanks.
|
|
|
|
|
Hi Adagio.81,
How can we add Horizontal Scroll Bar to Gantt Chart.
Thanks.
|
|
|
|
|
As you said EASY to use, no pain to get running. Solves simple problems without all added complexities of other controls.
|
|
|
|
|
I have been playing with this for a while. I think this is great (Some limitations, but with everyones help it could be a good tool. So here is my change. I hope you like it.
Change (In DrawBars)
grfx.FillRectangle(obBrush, obRect)
grfx.DrawRectangle(Pens.Black, obRect)
To
Dim Radius As Integer = d / 2
Dim gp As GraphicsPath = New GraphicsPath()
If c <= 0 Then
Else
If c < Radius * 2 Then
If c < Radius Then
gp.AddLine(a, b, (a + c), b)
gp.AddLine(a + c, b, a + c, (b + d))
gp.AddLine((a + c), b + d, a, b + d)
gp.AddLine(a, (b + d), a, b)
gp.CloseFigure()
Else
gp.AddLine(a, b, (a + c) - Radius, b)
gp.AddArc((a + c) - Radius, b, Radius, Radius, 270, 90)
gp.AddLine(a + c, b + Radius, a + c, (b + d) - Radius)
gp.AddArc((a + c) - Radius, (b + d) - Radius, Radius, Radius, 0, 90)
gp.AddLine((a + c) - Radius, b + d, a, b + d)
gp.AddLine(a, (b + d) - Radius, a, b)
gp.CloseFigure()
End If
Else
gp.AddLine(a + Radius, b, (a + c) - Radius, b)
gp.AddArc((a + c) - Radius, b, Radius, Radius, 270, 90)
gp.AddLine(a + c, b + Radius, a + c, (b + d) - Radius)
gp.AddArc((a + c) - Radius, (b + d) - Radius, Radius, Radius, 0, 90)
gp.AddLine((a + c) - Radius, b + d, a + Radius, b + d)
gp.AddArc(a, (b + d) - Radius, Radius, Radius, 90, 90)
gp.AddLine(a, (b + d) - Radius, a, b + Radius)
gp.AddArc(a, b, Radius, Radius, 180, 90)
gp.CloseFigure()
End If
End If
grfx.SmoothingMode = SmoothingMode.AntiAlias
grfx.FillPath(obBrush, gp)
grfx.DrawPath(obPen, gp)
|
|
|
|
|
Hi,
I've downloaded the source code and tried to compile it. But gives error that control is missing. Do you have any DLL files separately to run the code?
Thanks,
Arun
|
|
|
|
|