Page 1 of 2

Generally disable the new "hover" effect of 2014.12

Posted: Thu Oct 09, 2014 3:31 pm
by 16567885
Hi there.

The new 2014.12 release of TeeChart comes with a new "hover" effect (see: New and Improved Features). As cool as it is, it is a too drastic change in behaviour (and performance, for some type of charts). While I'll happily be using it for new stuff, I'd like to turn it off for existing projects - Thus keeping the current behaviour.

This way, I'm a bit unhappy the hover effect is on by default. How would I best go about turning it off, by default? Should I best crawl through all my TChart-objects and turn and set Hover.Visible to False? If yes, where? The OnFormCreate-event, the OnActive-event? The constructor of the TForm itself?
Or would it be better to edit the TeeChart source and recompile it?

Many thanks in advance.

Re: Generally disable the new "hover" effect of 2014.12

Posted: Fri Oct 10, 2014 9:20 am
by yeray
Hi Jens,

I've created a new ticket in the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=958

In the meanwhile you could call this at onCreate/onShow:

Code: Select all

Chart1.Hover.Visible := False;
Of course, modifying the TeeChart sources is also a valid option for those who own them.

Re: Generally disable the new "hover" effect of 2014.12

Posted: Mon Oct 27, 2014 6:35 pm
by 16567885
We can't consider this as a bug to be fixed. It's a new feature important enough to be enabled by default.
Although I can understand, I'm still not happy the way it is now. I will have to write code which targets the exact release of 2014.12- For every existing project in the company. For every chart that's already on a form, and for every chart that is dynamically generated.

Do you still have plans for introducing something like a "global" variable that let's me control whether Hover is enabled or not? This way, one would only have to set this variable once.

Re: Generally disable the new "hover" effect of 2014.12

Posted: Tue Oct 28, 2014 9:18 am
by yeray
Hi Jens,
jens.mertelmeyer wrote: Although I can understand, I'm still not happy the way it is now. I will have to write code which targets the exact release of 2014.12- For every existing project in the company. For every chart that's already on a form, and for every chart that is dynamically generated.

Do you still have plans for introducing something like a "global" variable that let's me control whether Hover is enabled or not? This way, one would only have to set this variable once.
I'm sorry for the inconvenience this change generates but we haven't found a way to include such a global variable/property. Note TeeChart VCL/FMX now targets systems that don't have a registry so we can't use it. Also, it would behave differently depending on the machine's registry where final application will run on.

Re: Generally disable the new "hover" effect of 2014.12

Posted: Tue Oct 28, 2014 9:38 am
by 16567885
I probably made it sound too complicated. I see there are already some "global" variables that seem very similar: TeEngine.TeeAxisClickCap: Integer, for example. It "Determines the amount in pixels that is allowed when clicking near an Axis to trigger selection of the axis."

I am now asking for something like TeeNewlyCreatedChartsHaveHoverEnabled: Boolean :wink:

So the only modification you'd have to make would be
  • introduce that variable somewhere
  • check this variable in the constructor of a TChart component. If it's True (default), then set Hover enabled. If it's false, set Hover to disabled.

This way, I could simply set that variable to False before creating my forms.

Re: Generally disable the new "hover" effect of 2014.12

Posted: Tue Oct 28, 2014 1:23 pm
by yeray
Hi Jens,

A private variable in TeEngine.pas could only be modified by SourceCode customers. And SourceCode customers already can modify the sources. Ie adding Visible:=False at TTeeHover.Create:

Code: Select all

Constructor TTeeHover.Create(const AOwner: TCustomTeePanel);
begin
  //...
  Visible:=false;
end;
And making this property public means users should still set it for each chart.

So I don't see where would be the gain.

Re: Generally disable the new "hover" effect of 2014.12

Posted: Tue Oct 28, 2014 4:37 pm
by 16567885
Yeray wrote:And making this property public means users should still set it for each chart.
No, why? Take the example you posted. Replace the hardcoded "False" with a public class variable "HoverGloballyEnabled". Done.

This way, annoying persons like me just need to set a single variable once. They now have their very own personal default value for hovering.

Re: Generally disable the new "hover" effect of 2014.12

Posted: Fri Oct 31, 2014 4:45 pm
by 10050769
Hello Jens,

We will consider the inclusion your request in future versions. Also, An alternative, as a possibility, could be for you to setup a Chart initialise routine that creates and returns your Chart with any Settings that you wish to assign to it at creation time; in this case hover-off.

Thanks in advance,

Re: Generally disable the new "hover" effect of 2014.12

Posted: Tue Feb 16, 2016 11:04 pm
by 16675240
... and how would I do that in c++ per chart? I didn't find any method to set the Hover option to FALSE.

Any help is appreciated. Thanks!

Re: Generally disable the new "hover" effect of 2014.12

Posted: Wed Feb 17, 2016 8:37 am
by yeray
Hello,
mch wrote:how would I do that in c++ per chart? I didn't find any method to set the Hover option to FALSE.
This works for me:

Code: Select all

Chart1->Hover->Visible=false;	

Re: Generally disable the new "hover" effect of 2014.12

Posted: Wed Feb 17, 2016 2:51 pm
by 16675240
Hi,
Thanks for the quick reply but there is no Hover() method nor Hover member in CTChart class...
In case you didn't catch it, I am using C++.
Thanks

Re: Generally disable the new "hover" effect of 2014.12

Posted: Wed Feb 17, 2016 6:16 pm
by 16576874
It works fine for me with 2014.12 in CPP Builder. The TChart has a member called "Hover".

Re: Generally disable the new "hover" effect of 2014.12

Posted: Wed Feb 17, 2016 11:15 pm
by 16675240
It's working now. I had to generate the CHover class file from the ocx, add the GetHover() method from the CTChart class.

Why weren't the hover.h file included in "Steema Software\TeeChart Pro v2015 ActiveX Control\Utilities\New VC Classes" folder originally? It would have saved me all the digging.

Thanks for all the help!

Re: Generally disable the new "hover" effect of 2014.12

Posted: Thu Feb 18, 2016 7:10 am
by 16673477
Hi,

Can u plz help me to generate CHover class in TeeChart2015?If possible please upload the chover class.

Re: Generally disable the new "hover" effect of 2014.12

Posted: Thu Feb 18, 2016 8:31 am
by yeray
Hello,
mch wrote:Thanks for the quick reply but there is no Hover() method nor Hover member in CTChart class...
In case you didn't catch it, I am using C++.
Please note this is the VCL forum. That's why I assumed you were using TeeChart VCL in C++Builder.
If you are using TeeChart ActiveX, I'd suggest you to post your questions in the ActiveX forum here.
mch wrote:It's working now. I had to generate the CHover class file from the ocx, add the GetHover() method from the CTChart class.

Why weren't the hover.h file included in "Steema Software\TeeChart Pro v2015 ActiveX Control\Utilities\New VC Classes" folder originally? It would have saved me all the digging.
It wasn't included in TeeChart ActiveX v2015.0.0.2 by mistake, but it was corrected and included with v2015.0.0.3.
star_it wrote:Can u plz help me to generate CHover class in TeeChart2015?If possible please upload the chover class.
Are you using TeeChart ActiveX v2015.0.0.3? Can you try it?