TOC : Script API > JavaScript > JavaScript API > ChartObject > ChartLabel > Method >

 

GetUserValue

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

TOC : Script API > JavaScript > JavaScript API > ChartObject > ChartLabel > Method >

 

GetUserValue

 

 

Get the user defined value.

 

 

 

Prototype :

 

var GetUserValue

(

       No Arguments

)

 

 

 

Reference :

 

Returns the value and  type (numeric or character) assigned by SetUserValue function.

 

In OnBind event, to reference a value set in OnInitialize event, the user value would be useful than the global variable. Set a value at OnInitialize using SetUserValue and get it into OnBind using GetUserValue.

 

 

 

Example :

 

//set text from user value - create script for OnEndBind event

 This.SetText(This.GetUserValue());

 

 

 

Available Events :

 

OnBind, OnPostChartBuild

For the object returned by GetChartLabel function of a chart, the function can be called only in OnBind event, and for the object returned by GetLabel function of a ChartPiece, the function can be called only in OnPostChartBuild event.