If your data is an array, your original code will work, if you get rid of the brackets around data:
var data = [32710,20280,18002];
console.log(data);
console.log(d3.min(data));
console.log(d3.max(data));
If you need to identify the array values with the keys "01","02", "03", create an array of objects, and operate on the values to get min/max:
//data as key/value pairs
var data = [
{key: "01", value: 32710},
{key: "02", value: 20280},
{key: "03", value: 18002}
];
console.log(data);
console.log(d3.min(data, function(d) { return d.value; }));
console.log(d3.max(data, function(d) { return d.value; }));
// AND IF YOU WANT THE min/max of the KEYS:
console.log(d3.min(data, function(d) { return d.key; }));
console.log(d3.max(data, function(d) { return d.key; }));
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…