Skip to content

100_900_other_options

Francois Vancoppenolle edited this page Aug 24, 2015 · 10 revisions

Previous Chapter          Previous Page          Next Page          Table of content

Other options

Contents

endDrawDataFunction / endDrawScaleFunction / initFunction

Description : Animation in chart is generated by drawing successive images; Each time a new image is generated, the scales and the data are drawn; before the scale and data are drawn, the function specified as value for option initFunction is called; when the scale has been produced, the function associated to option endDrawScaleFunction is called; when the data are drawn, the function associated to option endDrawDataFunction is called.

Values : the name of a user defined function

Default value : null (<=> no function to be called)

Sample : endDrawDataFunction : myFunction

    function myFunction(area,ctx,data,statData,posi,posj,othervars) {
    (...)
    }

See also : Shapes-Text-Images_In_Chart

Parameters passed to the function : area,ctx,data,statData,posi,posj,othervars

  • area : parameter 'area' has value "INITFUNCTION" if the call comes from the initFunction parameter, has value "ENDDATAFUNCTION" if the calls comes from the endDrawDataFunction and has value "ENDSCALEFUNCTION" if the calls provides from the endDrawScaleFunction parameter;
  • ctx : the context
  • data : the data passed the chart function
  • statData : the statData values
  • posi : value is always -1
  • posj : value is always -1
  • othervars : othervars is an array of other variables :
    • cntiter : cntiter is incremented each time a new image is produced for the animation; cntIter will evoluate from 1 to the value of option animationSteps;
    • animationValue : animationValue is an evolutive variable : starting at 0 it will evoluate to 1; 1 means that the whole animation is terminated; the value of animationValue is equal to cntiter/animationSteps;
    • config : the options passed to the chart function
    • borderX : X position of the left of the chart in the context;
    • borderY : Y position of the top of the chart in the context;
    • midPosX : X potition of the middle of the chart;
    • midPosY : Y position of the middle of the chart;

zeroValue

Description : when you have to compate to value, it could happen that Javascript return that they are not equal even if they are because of the way they are stored in memory. In order to avoid this problem, you can set a level of comparaison : if the difference between the two compared values is lower that this level, they are considered as identical. The level is specified with option zeroValue.

Values : a positive value

Default value : 0.0000000001

Sample : zeroValue : 0.0000000000000001

See also :

Previous Chapter          Previous Page          Next Page          Top of Page