Commit a51bb847 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Apply data.order to donut/pie chart

parent fb345909
......@@ -1020,7 +1020,7 @@
pie = d3.layout.pie().value(function (d) {
return d.values.reduce(function (a, b) { return a + b.value; }, 0);
});
if (!__pie_sort || !__donut_sort) { // TODO: this needs to be called by each type
if (!__data_order || !__pie_sort || !__donut_sort) {
pie.sort(null);
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -22,6 +22,7 @@
onmouseover: function (d, i) { console.log("onmouseover", d, i, this); },
onmouseout: function (d, i) { console.log("onmouseout", d, i, this); },
onclick: function (d, i) { console.log("onclick", d, i, this); },
order: null // set null to disable sort of data.
},
axis: {
x: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment