EJSC.StringFormatter.onNeedsFormat

See Also

Top  Previous  Next

 

Definition

 

string onNeedsFormat(number value, EJSC.StringFormatter formatter)

 

Description

 

This event (when assigned) will fire every time the formatter needs to process a value.  The string returned from this event will be displayed in place of the value in the chart.

 

Example

 

>> Adjust all values by 100

 

var chart = new EJSC.Chart("myChart");

   chart.x_axis_formatter = new EJSC.StringFormatter({

               onNeedsFormat: function(value, formatter) {

                               return value + 100;

               }

   });