Skip to content

Commit

Permalink
chore(version): bump to v0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k committed Mar 24, 2018
1 parent 9904867 commit 3d6037e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .bmp.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 0.5.0
version: 0.5.1
commit: 'chore(version): bump to v%.%.%'
files:
src/core.js: 'version: "%.%.%"'
Expand Down
32 changes: 20 additions & 12 deletions c3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* @license C3.js v0.5.0 | (c) C3 Team and other contributors | http://c3js.org/ */
/* @license C3.js v0.5.1 | (c) C3 Team and other contributors | http://c3js.org/ */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
Expand Down Expand Up @@ -978,7 +978,7 @@
$$.axes.subx.style("opacity", isHidden ? 0 : 1).call($$.subXAxis, transition);
};

var c3 = { version: "0.5.0" };
var c3 = { version: "0.5.1" };

var c3_chart_fn;
var c3_chart_internal_fn;
Expand Down Expand Up @@ -4319,7 +4319,18 @@
return a + b.value;
}, 0);
});
$$.pie.sort($$.getOrderFunction() || null);

var orderFct = $$.getOrderFunction();

// we need to reverse the returned order if asc or desc to have the slice in expected order.
if (orderFct && ($$.isOrderAsc() || $$.isOrderDesc())) {
var defaultSort = orderFct;
orderFct = function orderFct(t1, t2) {
return defaultSort(t1, t2) * -1;
};
}

$$.pie.sort(orderFct || null);
};

c3_chart_internal_fn.updateRadius = function () {
Expand Down Expand Up @@ -5826,13 +5837,13 @@
orderAsc = $$.isOrderAsc(),
orderDesc = $$.isOrderDesc();
if (orderAsc || orderDesc) {
var reducer = function reducer(p, c) {
return p + Math.abs(c.value);
};
return function (t1, t2) {
var reducer = function reducer(p, c) {
return p + Math.abs(c.value);
};
var t1Sum = t1.values.reduce(reducer, 0),
t2Sum = t2.values.reduce(reducer, 0);
return orderDesc ? t2Sum - t1Sum : t1Sum - t2Sum;
return orderAsc ? t2Sum - t1Sum : t1Sum - t2Sum;
};
} else if (isFunction(config.data_order)) {
return config.data_order;
Expand All @@ -5847,9 +5858,6 @@
var fct = this.getOrderFunction();
if (fct) {
targets.sort(fct);
if (this.isOrderAsc() || this.isOrderDesc()) {
targets.reverse();
}
}
return targets;
};
Expand Down Expand Up @@ -8312,11 +8320,11 @@
}
// Calculate x axis height when tick rotated
if (axisId === 'x' && !config.axis_rotated && config.axis_x_tick_rotate) {
h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_x_tick_rotate) / 180);
h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - Math.abs(config.axis_x_tick_rotate)) / 180);
}
// Calculate y axis height when tick rotated
if (axisId === 'y' && config.axis_rotated && config.axis_y_tick_rotate) {
h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_y_tick_rotate) / 180);
h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - Math.abs(config.axis_y_tick_rotate)) / 180);
}
return h + ($$.axis.getLabelPositionById(axisId).isInner ? 0 : 10) + (axisId === 'y2' ? -10 : 0);
};
Expand Down
4 changes: 2 additions & 2 deletions c3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "c3",
"repo": "masayuki0812/c3",
"description": "A D3-based reusable chart library",
"version": "0.5.0",
"version": "0.5.1",
"keywords": [],
"dependencies": {
"mbostock/d3": "v3.5.6"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c3",
"version": "0.5.0",
"version": "0.5.1",
"description": "D3-based reusable chart library",
"main": "c3.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Axis from './axis';
import CLASS from './class';
import { isValue, isFunction, isString, isUndefined, isDefined, ceil10, asHalfPixel, diffDomain, isEmpty, notEmpty, getOption, hasValue, sanitise, getPathBox } from './util';

export var c3 = { version: "0.5.0" };
export var c3 = { version: "0.5.1" };

export var c3_chart_fn;
export var c3_chart_internal_fn;
Expand Down

0 comments on commit 3d6037e

Please sign in to comment.