Browse Source

Apply data.order to donut/pie chart

pull/452/head
Masayuki Tanaka 11 years ago
parent
commit
a51bb8474b
  1. 2
      c3.js
  2. 2
      c3.min.js
  3. 1
      htdocs/samples/chart_donut.html

2
c3.js

@ -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);
}

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

1
htdocs/samples/chart_donut.html

@ -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: {

Loading…
Cancel
Save