Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2161

Re: How to obtain object name?

$
0
0

Hi Alejandro,

 

Yes, hardcoding is not a recommended practice.  You are actually on the right track using the reference to "me".  When passing parameters to a global script function, you do not need the name of the component but just the object that represents the component.  "me" serves this purpose.  So if you want to create a centralised script function to process the "On Select" event of any chart, you can define one as shown below:

 

ObjectNameScript.png

Above, pChart is defined as an input parameter of type "InfoChart".  In the body of the function you can perform any supported action on the chart by referencing the pChart parameter.

 

You can then call the function from the "On Select" event of any chart using a script such as this:

 

GLOBAL_SCRIPTS_1.CHART_ONSELECT(me);

 

 

Regards,

 

Mustafa.


Viewing all articles
Browse latest Browse all 2161

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>