Presently, I am engrossed in a project involving the creation of a Box and Whisker Plot. The data for this task is being sourced from a PHP file and then passed on to a JavaScript function for the actual Box and Whisker Plot generation. In my possession, there exists a method outlining how random numbers ranging between 0-15 can be utilized to generate the required data:
var offset = Math.random()*3/4;
var data = pv.range(0,15).map(function(i) {
return offset + Math.random()/4;}).sort();
My query pertains to outputting the JSON converted data into this JavaScript file. My initial thought was to modify the 'var data' section as follows:
var data = [[1,2,3,4,5],[2,3,4,5,6],[0,1,2,3,4]]
However, this alteration did not yield the desired outcome. Could you guide me on how to accomplish this? Your assistance will be greatly appreciated.