Scroll with Mouse Wheel TChart 2021

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Luca
Newbie
Newbie
Posts: 4
Joined: Thu Jun 10, 2021 12:00 am

Scroll with Mouse Wheel TChart 2021

Post by Luca » Tue Jun 15, 2021 12:21 pm

Hi,
i've installed TeeChart Pro VCL/FMX v2021 [30 APR 2021] and i'm working with C++ Builder 10.4. I've created a 32 bit VCL application and added a TChart with a TLineSeries to the main form. Can't scroll the Serie with the mouse wheel. I tried this options:

Code: Select all

Chart1->AllowPanning = pmHorizontal;
Chart1->Panning->MouseWheel = pmwNormal;
Chart1->Zoom->Allow = false;
Chart1->ZoomWheel = pmwNone;
Chart1->TabStop = true;
Chart1->SetFocus();
The OnMouseWheel event triggers correctly when i try scrolling, but OnScroll event doesn't.
I've already checked the example in TeeNew(Miscellaneous -> Mouse wheel scrolling), StackOverflow and this forum. Can't find a solution that works. Please help me

EDIT: i want to scroll with the mouse wheel only Horizontally. Vertical scroll is disabled

Yeray
Site Admin
Site Admin
Posts: 9023
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Scroll with Mouse Wheel TChart 2021

Post by Yeray » Mon Jun 21, 2021 8:30 am

Hello,

Chart1->AllowPanning = pmHorizontal; should be enough.
Here a simple example that works for me:

Code: Select all

  TChart *Chart1 = new TChart(this);
  Chart1->Parent = this;
  Chart1->Align = alClient;

  Chart1->Canvas = new TGDIPlusCanvas();
  Chart1->View3D = false;
  Chart1->Legend->Hide();
  Chart1->AllowPanning = pmHorizontal;

  TLineSeries *line = new TLineSeries(this);
  Chart1->AddSeries(line);
  line->FillSampleValues();
With the code above I'm creating a chart with a line series and I can horizontally scroll with the right mouse button.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9023
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Scroll with Mouse Wheel TChart 2021

Post by Yeray » Mon Jun 21, 2021 8:36 am

Sorry, I missed the "wheel" part.
I'm checking it now.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Yeray
Site Admin
Site Admin
Posts: 9023
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Scroll with Mouse Wheel TChart 2021

Post by Yeray » Mon Jun 21, 2021 9:04 am

I've added it tot he public tracker (#2433) and already implemented the fix for it so it should be available with the next maintenance release.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Luca
Newbie
Newbie
Posts: 4
Joined: Thu Jun 10, 2021 12:00 am

Re: Scroll with Mouse Wheel TChart 2021

Post by Luca » Tue Jun 22, 2021 1:13 pm

Thank you for replying

Post Reply