Closed parikhshiv closed 7 years ago
This only runs the function on initialization -- so if you ever call setData again you're basically stuck since there'll be no way to change the original values (for e.g. http://jsfiddle.net/a5L7x0c5/7)
The problem is worse if don't set initial data (http://jsfiddle.net/a5L7x0c5/8) -- in this case you'll never get tickvalues.
If we make this a function it'll need to be called at every render to be useful. What do you think?
The example in the fiddle can be done without a callback. Do you have an example use case for this that you couldn't do previously?
@drosen0 which fiddle? (and hi!)
Hi @narenranjit and @parikhshiv! I could see making tickValues
a callback if there were something about the data that could only be inferred at render-time. See these fiddles:
FYI I'm exploring a setup where any parameter in the config object can be a function and will be invoked just before rendering.
Closing in favor of a more general solution.
For issue #252 - allow user to pass in function to yAxis:tickValues parameter. See the following jsfiddle for usage - http://jsfiddle.net/a5L7x0c5/6/.