Page 1 of 1

Scroll with Mouse Wheel TChart 2021

Posted: Tue Jun 15, 2021 12:21 pm
by 16591355
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

Re: Scroll with Mouse Wheel TChart 2021

Posted: Mon Jun 21, 2021 8:30 am
by yeray
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.

Re: Scroll with Mouse Wheel TChart 2021

Posted: Mon Jun 21, 2021 8:36 am
by yeray
Sorry, I missed the "wheel" part.
I'm checking it now.

Re: Scroll with Mouse Wheel TChart 2021

Posted: Mon Jun 21, 2021 9:04 am
by yeray
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.

Re: Scroll with Mouse Wheel TChart 2021

Posted: Tue Jun 22, 2021 1:13 pm
by 16591355
Thank you for replying