How to set a nvd3 axis to use strings instead of numerical values ?
Instead of numerical values on the x-axis, i want to set my attribute
names. I am no Javascript hero. I am using the scatter Chart.
I believe it should be something like :
chart.xAxis.tickFormat(d3.format(String));
and then i can set:
chart.xAxis
.axisLabel('Attributes').staggerLabels(true).tickValues(["A", "B", "C"]);;
and then set the values:
data[i].values.push({
x : "A" ,
y : 29.765957771107,
size: Math.random(),
shape: shapes[j % 6]
} , ..
How to see my attributes "A", "B", etc on the x-axis ? I browsed the nvd3
source code also but not finding the right API call.
No comments:
Post a Comment