Horizontal Zooming - Drawing issue
-
- Newbie
- Posts: 19
- Joined: Mon Mar 07, 2011 12:00 am
Horizontal Zooming - Drawing issue
TChart Version : 4.1.2014.2242
Hi !
I think there is a problem in the Zooming functions ... Just use the attached sample projekt and run it. Open the Editor and go to the General/Zoom tab.
Set the Direction to Horizontal and press close to end the editor.
Now just zoom within the chart. I got this rectangles on different computers: This is on windows XP (32 Bit)
This is on my developement system with Win7 64Bit.
And I asked one of our users to test it, too. He has the same behaviour on a XP 32Bit system.
Can you confirm this issue and tell me a quick workaround or a new Tchart.dll with a fix?
We want to bring out our new software, soon. But this issue is a real blocking point for us.
Best regards
Dominik
Hi !
I think there is a problem in the Zooming functions ... Just use the attached sample projekt and run it. Open the Editor and go to the General/Zoom tab.
Set the Direction to Horizontal and press close to end the editor.
Now just zoom within the chart. I got this rectangles on different computers: This is on windows XP (32 Bit)
This is on my developement system with Win7 64Bit.
And I asked one of our users to test it, too. He has the same behaviour on a XP 32Bit system.
Can you confirm this issue and tell me a quick workaround or a new Tchart.dll with a fix?
We want to bring out our new software, soon. But this issue is a real blocking point for us.
Best regards
Dominik
- Attachments
-
- CursorTest.zip
- Testapp for reproducing the problem
- (12.05 KiB) Downloaded 661 times
-
- Newbie
- Posts: 19
- Joined: Mon Mar 07, 2011 12:00 am
Re: Horizontal Zooming - Drawing issue
Oh I forgot this:
IDE : VS 2012
Language : C#
Dominik
IDE : VS 2012
Language : C#
Dominik
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Horizontal Zooming - Drawing issue
Hello Dominik,
You will also be able to see that this issue is now fixed and will be available in the next maintenance release, due out within the next two working days.
Yes, I've been able to reproduce this issue here and have added it to our bug database with ID=760. As you can read there, there is a temporary workaround to this issue:moelski.net wrote:Oh I forgot this:
IDE : VS 2012
Language : C#
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
this.editor1.CloseEditor += editor1_CloseEditor;
this.editor1.ShowModal();
}
void editor1_CloseEditor(object sender, EventArgs e)
{
tChart1.Zoom.Pen.Visible = false;
}
Best Regards,
Christopher Ireland / 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 |
-
- Newbie
- Posts: 19
- Joined: Mon Mar 07, 2011 12:00 am
Re: Horizontal Zooming - Drawing issue
Hi Christopher,
ok I think I can wait for the next release.
Thx for your help !
Dominik
ok I think I can wait for the next release.
Thx for your help !
Dominik
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Horizontal Zooming - Drawing issue
Hello Dominik,
You're very welcome
That's good.moelski.net wrote: ok I think I can wait for the next release.
Thx for your help !
You're very welcome
Best Regards,
Christopher Ireland / 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 |
-
- Newbie
- Posts: 19
- Joined: Mon Mar 07, 2011 12:00 am
Re: Horizontal Zooming - Drawing issue
Hi Christopher,
I think there is another issue on this zoom topic. I use this code to detect STRG and SHIFT key to set vertical or horizontal zooming:
But if I run this code the zoom rectangle is not drawn at the correct position:
I have placed some red marks. That would be what I would expect from the rectangle to be drawn.
You can test this with my sample application above.
Hope this can be fixed, too.
I think there is another issue on this zoom topic. I use this code to detect STRG and SHIFT key to set vertical or horizontal zooming:
Code: Select all
private void tChart1_MouseDown(object sender, MouseEventArgs e)
{
var strgPressed = ModifierKeys == Keys.Control;
var shiftPressed = ModifierKeys == Keys.Shift;
var bothPressed = ModifierKeys == (Keys.Shift | Keys.Control);
if (e.Button == MouseButtons.Left)
{
if (!strgPressed & !shiftPressed) { this.tChart1.Zoom.Direction = ZoomDirections.Both; }
if (strgPressed) { this.tChart1.Zoom.Direction = ZoomDirections.Horizontal; }
if (shiftPressed) { this.tChart1.Zoom.Direction = ZoomDirections.Vertical; }
}
}
You can test this with my sample application above.
Hope this can be fixed, too.
-
- Newbie
- Posts: 19
- Joined: Mon Mar 07, 2011 12:00 am
Re: Horizontal Zooming - Drawing issue
Oh and one additional thing if missing (which is important for zooming, too). The MouseWheel event is not visible in the IDE:
But I think this is not a big deal ... -
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Horizontal Zooming - Drawing issue
Hello,
This is happening because the TeeChart code in the OnMouseDown event is being called before your code in this tChart1_MouseDown event. This is inevitable. To correct for this we can copy a little of the necessary functionality, which includes the call to Zoom.Activate.
Not so much fixed, but a technique that can be deployed:moelski.net wrote:Hope this can be fixed, too.
Code: Select all
private void tChart1_MouseDown(object sender, MouseEventArgs e)
{
var strgPressed = ModifierKeys == Keys.Control;
var shiftPressed = ModifierKeys == Keys.Shift;
var bothPressed = ModifierKeys == (Keys.Shift | Keys.Control);
int x = e.X;
int y = e.Y;
Rectangle rect = tChart1.Chart.ChartRect;
if (e.Button == MouseButtons.Left)
{
if (!strgPressed & !shiftPressed)
{
this.tChart1.Zoom.Direction = ZoomDirections.Both;
}
if (strgPressed)
{
this.tChart1.Zoom.Direction = ZoomDirections.Horizontal;
y = rect.Top;
tChart1.Zoom.Activate(x, y);
}
if (shiftPressed)
{
this.tChart1.Zoom.Direction = ZoomDirections.Vertical;
x = rect.Left;
tChart1.Zoom.Activate(x, y);
}
}
}
Best Regards,
Christopher Ireland / 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 |
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Horizontal Zooming - Drawing issue
Hello,
This is strange, but as you can see from the documentation for the System.Windows.Forms.Control MouseWheel event, the BrowsableAttribute is set to false. I'm not sure why.moelski.net wrote:But I think this is not a big deal ...
Best Regards,
Christopher Ireland / 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 |
-
- Newbie
- Posts: 19
- Joined: Mon Mar 07, 2011 12:00 am
Re: Horizontal Zooming - Drawing issue
Hi !
Can´t you change it so that it is visible for tchart?the BrowsableAttribute is set to false
Hope to see a new version todaywill be available in the next maintenance release, due out within the next two working days
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Horizontal Zooming - Drawing issue
No, I cannot.moelski.net wrote:Can´t you change it so that it is visible for tchart?
That will depend on how many questions I am asked todaymoelski.net wrote: Hope to see a new version today
Best Regards,
Christopher Ireland / 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 |