Hi all,
I'm new to data visualization and I've been using d3 since a few months. I really start to enjoy using all the possibilities it offers.
I encountered a problem when defining a scale with the d3.extent method.I have a simple key:value array and i want to define a scale.domain based on the max and min value of this array, so i use d3.extent(d3.values(myarray))
When i use it in the console, all is well and i get my [min,max]
But in the script itself, when i write var myscale=d3.scale.sqrt().domain(d3.extent(d3.values(myarray)))
myscale.domain() returns[NaN,NaN].
Am i doing something wrong ?
Thanks a lot!
--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Can you post a sample of your data? Is it coming from CSV? Might need to parse out the numbers before calling extent. Also you may need to pass a function to extent to tell it where to find the values.
--
--
You received this message because you are subscribed to a topic in the Google Groups "d3-js" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/d3-js/INRV7dDj7pg/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to d3-js+un...@googlegroups.com.