Commit d551192e authored by Masayuki Tanaka's avatar Masayuki Tanaka

Update c3.js c3.min.js

parent 9bf1f229
...@@ -3837,7 +3837,26 @@ ...@@ -3837,7 +3837,26 @@
titleFormat = config.tooltip_format_title || defaultTitleFormat, titleFormat = config.tooltip_format_title || defaultTitleFormat,
nameFormat = config.tooltip_format_name || function (name) { return name; }, nameFormat = config.tooltip_format_name || function (name) { return name; },
valueFormat = config.tooltip_format_value || defaultValueFormat, valueFormat = config.tooltip_format_value || defaultValueFormat,
text, i, title, value, name, bgcolor; text, i, title, value, name, bgcolor,
orderAsc = $$.isOrderAsc();
if (config.data_groups.length === 0) {
d.sort(function(a,b){
return orderAsc ? a.value - b.value : b.value - a.value;
});
} else {
var ids = $$.orderTargets($$.data.targets).map(function (i) {
return i.id;
});
d.sort(function(a, b) {
if (a.value > 0 && b.value > 0) {
return orderAsc ? ids.indexOf(a.id) - ids.indexOf(b.id) : ids.indexOf(b.id) - ids.indexOf(a.id);
} else {
return orderAsc ? a.value - b.value : b.value - a.value;
}
});
}
for (i = 0; i < d.length; i++) { for (i = 0; i < d.length; i++) {
if (! (d[i] && (d[i].value || d[i].value === 0))) { continue; } if (! (d[i] && (d[i].value || d[i].value === 0))) { continue; }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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