Commit 9ee5464e authored by Masayuki Tanaka's avatar Masayuki Tanaka

Remove pie.sort and donut.sort options

parent 0bf66eef
...@@ -1011,7 +1011,6 @@ ...@@ -1011,7 +1011,6 @@
pie_label_show: true, pie_label_show: true,
pie_label_format: undefined, pie_label_format: undefined,
pie_label_threshold: 0.05, pie_label_threshold: 0.05,
pie_sort: true,
pie_expand: true, pie_expand: true,
// gauge // gauge
gauge_label_show: true, gauge_label_show: true,
...@@ -1026,7 +1025,6 @@ ...@@ -1026,7 +1025,6 @@
donut_label_format: undefined, donut_label_format: undefined,
donut_label_threshold: 0.05, donut_label_threshold: 0.05,
donut_width: undefined, donut_width: undefined,
donut_sort: true,
donut_expand: true, donut_expand: true,
donut_title: "", donut_title: "",
// region - region to change style // region - region to change style
...@@ -4153,7 +4151,7 @@ ...@@ -4153,7 +4151,7 @@
$$.pie = d3.layout.pie().value(function (d) { $$.pie = d3.layout.pie().value(function (d) {
return d.values.reduce(function (a, b) { return a + b.value; }, 0); return d.values.reduce(function (a, b) { return a + b.value; }, 0);
}); });
if (!config.data_order || !config.pie_sort || !config.donut_sort) { if (!config.data_order) {
$$.pie.sort(null); $$.pie.sort(null);
} }
}; };
...@@ -4177,7 +4175,7 @@ ...@@ -4177,7 +4175,7 @@
c3_chart_internal_fn.updateAngle = function (d) { c3_chart_internal_fn.updateAngle = function (d) {
var $$ = this, config = $$.config, var $$ = this, config = $$.config,
found = false, index = 0; found = false, index = 0;
$$.pie($$.filterTargetsToShow($$.data.targets)).sort($$.descByStartAngle).forEach(function (t) { $$.pie($$.filterTargetsToShow($$.data.targets)).forEach(function (t) {
if (! found && t.data.id === d.data.id) { if (! found && t.data.id === d.data.id) {
found = true; found = true;
d = t; d = t;
...@@ -4347,10 +4345,6 @@ ...@@ -4347,10 +4345,6 @@
return $$.hasType('donut') ? $$.config.donut_title : ""; return $$.hasType('donut') ? $$.config.donut_title : "";
}; };
c3_chart_internal_fn.descByStartAngle = function (a, b) {
return a.startAngle - b.startAngle;
};
c3_chart_internal_fn.updateTargetsForArc = function (targets) { c3_chart_internal_fn.updateTargetsForArc = function (targets) {
var $$ = this, main = $$.main, var $$ = this, main = $$.main,
mainPieUpdate, mainPieEnter, mainPieUpdate, mainPieEnter,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3,7 +3,7 @@ c3_chart_internal_fn.initPie = function () { ...@@ -3,7 +3,7 @@ c3_chart_internal_fn.initPie = function () {
$$.pie = d3.layout.pie().value(function (d) { $$.pie = d3.layout.pie().value(function (d) {
return d.values.reduce(function (a, b) { return a + b.value; }, 0); return d.values.reduce(function (a, b) { return a + b.value; }, 0);
}); });
if (!config.data_order || !config.pie_sort || !config.donut_sort) { if (!config.data_order) {
$$.pie.sort(null); $$.pie.sort(null);
} }
}; };
...@@ -27,7 +27,7 @@ c3_chart_internal_fn.updateArc = function () { ...@@ -27,7 +27,7 @@ c3_chart_internal_fn.updateArc = function () {
c3_chart_internal_fn.updateAngle = function (d) { c3_chart_internal_fn.updateAngle = function (d) {
var $$ = this, config = $$.config, var $$ = this, config = $$.config,
found = false, index = 0; found = false, index = 0;
$$.pie($$.filterTargetsToShow($$.data.targets)).sort($$.descByStartAngle).forEach(function (t) { $$.pie($$.filterTargetsToShow($$.data.targets)).forEach(function (t) {
if (! found && t.data.id === d.data.id) { if (! found && t.data.id === d.data.id) {
found = true; found = true;
d = t; d = t;
...@@ -197,10 +197,6 @@ c3_chart_internal_fn.getArcTitle = function () { ...@@ -197,10 +197,6 @@ c3_chart_internal_fn.getArcTitle = function () {
return $$.hasType('donut') ? $$.config.donut_title : ""; return $$.hasType('donut') ? $$.config.donut_title : "";
}; };
c3_chart_internal_fn.descByStartAngle = function (a, b) {
return a.startAngle - b.startAngle;
};
c3_chart_internal_fn.updateTargetsForArc = function (targets) { c3_chart_internal_fn.updateTargetsForArc = function (targets) {
var $$ = this, main = $$.main, var $$ = this, main = $$.main,
mainPieUpdate, mainPieEnter, mainPieUpdate, mainPieEnter,
......
...@@ -144,7 +144,6 @@ c3_chart_internal_fn.getDefaultConfig = function () { ...@@ -144,7 +144,6 @@ c3_chart_internal_fn.getDefaultConfig = function () {
pie_label_show: true, pie_label_show: true,
pie_label_format: undefined, pie_label_format: undefined,
pie_label_threshold: 0.05, pie_label_threshold: 0.05,
pie_sort: true,
pie_expand: true, pie_expand: true,
// gauge // gauge
gauge_label_show: true, gauge_label_show: true,
...@@ -159,7 +158,6 @@ c3_chart_internal_fn.getDefaultConfig = function () { ...@@ -159,7 +158,6 @@ c3_chart_internal_fn.getDefaultConfig = function () {
donut_label_format: undefined, donut_label_format: undefined,
donut_label_threshold: 0.05, donut_label_threshold: 0.05,
donut_width: undefined, donut_width: undefined,
donut_sort: true,
donut_expand: true, donut_expand: true,
donut_title: "", donut_title: "",
// region - region to change style // region - region to change style
......
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