nvd3.js - Custom order of x axis in D3.js -
i have these labels axis x:
1..2..3..4..5..6..etc
but need custom order:
3..2..5..1..6..4..etc
even if give array in such custom order d3, automatically orders in first example.
i'm using nv.models.linechart()
.
the exact dump of values:
[{"values":[{"label":18,"value":12},{"label":19,"value":412},{"label":20,"value":441},{"label":21,"value":920},{"label":22,"value":944},{"label":23,"value":144},{"label":0,"value":0},{"label":1,"value":18},{"label":2,"value":0},{"label":3,"value":7},{"label":4,"value":4},{"label":5,"value":12},{"label":6,"value":0},{"label":7,"value":0},{"label":8,"value":0},{"label":9,"value":9},{"label":10,"value":9},{"label":11,"value":32},{"label":12,"value":27},{"label":13,"value":31},{"label":14,"value":0},{"label":15,"value":30},{"label":16,"value":3},{"label":17,"value":844}],"key":"buyings count hourly","color":"#53d488"}]
Comments
Post a Comment