How to drag a bar vertically in Gantt Chart?
How to drag a bar vertically in Gantt Chart?
Now we met a problem when we were using the tool dragpoint to implement the vertical dragging function in Gantt chart:
If we drag a bar from one vertical axes to another one, the bar will automaticlly change its length. Is there any way to keep the bar's length not to be changed when dragging it.
Another thing is: is there any way to drag the bar directly into the vertical axes we defined by ourseleves not move little by little. For example, we defined 3 vertical axes, their value are: 1,2,3. Now I want to drag a bar from 1 to 3 directly, do you have any better way to implement this function.
[img]http://yfq003.blog.163.com/editPhoto.do ... 7084095065
[/img]
If we drag a bar from one vertical axes to another one, the bar will automaticlly change its length. Is there any way to keep the bar's length not to be changed when dragging it.
Another thing is: is there any way to drag the bar directly into the vertical axes we defined by ourseleves not move little by little. For example, we defined 3 vertical axes, their value are: 1,2,3. Now I want to drag a bar from 1 to 3 directly, do you have any better way to implement this function.
[img]http://yfq003.blog.163.com/editPhoto.do ... 7084095065
[/img]
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi kingken,
Yes, you can set DragPoint tool to just drag points vertically:
For changing the Y value of a gantt bar you can do this:
Or using ClickSeries event, for example:
Yes, you can set DragPoint tool to just drag points vertically:
Code: Select all
dragPoint1.Style = Steema.TeeChart.Tools.DragPointStyles.Y;
Code: Select all
gantt1.YValues[0] = 5;
Code: Select all
void tChart1_ClickSeries(object sender, Steema.TeeChart.Styles.Series s, int valueIndex, MouseEventArgs e)
{
s.YValues[valueIndex] = 5;
s.Repaint();
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
How to make the length of the bar not changed?
Thanks for your help.
But how to keep the length of the bar not be changed when it was dragged vertically. Because we found this problem, when we drag it from one Y axes to another one it will automatically change its length. You can find the pic in the URL I sent in the first post.
Please help us solve this problem as soon as possible, thank you.
But how to keep the length of the bar not be changed when it was dragged vertically. Because we found this problem, when we drag it from one Y axes to another one it will automatically change its length. You can find the pic in the URL I sent in the first post.
Please help us solve this problem as soon as possible, thank you.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi kingken,
Have you tried setting DragPoint.Style to DragPointStyles.Y as I told you in my previous reply?
Thanks in advance.
Have you tried setting DragPoint.Style to DragPointStyles.Y as I told you in my previous reply?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
another problem
Hello thanks for your help, I've solved these two problems :)
But I met another problem, when I drag the bar from one y axes to another one, the bar's y axes will also moved with the bar together.
for example, bar a is in y axes-->1, now I want to drag it into y axes-->2, when I drag it, y axes-->1 will split into two y axes-->1, one of them will move together with the bar.
I do not want to move the bar together with the y axes, do you have any better way to solve this problem, thank you :)
But I met another problem, when I drag the bar from one y axes to another one, the bar's y axes will also moved with the bar together.
for example, bar a is in y axes-->1, now I want to drag it into y axes-->2, when I drag it, y axes-->1 will split into two y axes-->1, one of them will move together with the bar.
I do not want to move the bar together with the y axes, do you have any better way to solve this problem, thank you :)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi kingken,
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Could you please send us a simple example project we can run "as-is" to reproduce the problem here?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
I've upload the example into your upload server
Inside is the example, when you try to drag the bar vertically, the y axes of the bar will move together with it, but we just want to move the bar only, is there any way to solve this problem?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi kingken,
Thanks for the example project. I'm not 100% sure about what do you mean. However, if you don't want left axis grid lines move when gantt bars are being dragged, the only solution I can think of is hidding them:
If this doesn't help please let us know.
Thanks for the example project. I'm not 100% sure about what do you mean. However, if you don't want left axis grid lines move when gantt bars are being dragged, the only solution I can think of is hidding them:
Code: Select all
this.ganttSeries1.GetVertAxis.Grid.Visible = false;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
How the eample emplement this function.
I found in the example, when we drag a dragpoint, it will move freely with no y axes moving.
So it should also work for gantt bar, please help us solve this problem. Thank you.
So it should also work for gantt bar, please help us solve this problem. Thank you.
reply for your last answer
If we hide the y axex, then we can not see all y axeses, that's not acceptable. We just want to hide the y axes of the bar when we moved it.
Please try to solve this problem, it's really urgent, thank you..
Please try to solve this problem, it's really urgent, thank you..
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi kingken,
I'm not 100% sure about what you mean here. However, y axis scale will only be modified if you drag the points outside the bounds of current axis scale. If this doesn't help please give us some more details about the exact problem.I found in the example, when we drag a dragpoint, it will move freely with no y axes moving.
Yes, it's only possible to hide the grid for the entire axis, it's not possible to hide one bar's gride line.If we hide the y axex, then we can not see all y axeses, that's not acceptable. We just want to hide the y axes of the bar when we moved it.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |