Browse Source

chore(version): bump to v0.5.1

pull/2323/head v0.5.1
Yoshiya Hinosawa 7 years ago
parent
commit
3d6037ee21
  1. 2
      .bmp.yml
  2. 28
      c3.js
  3. 4
      c3.min.js
  4. 2
      component.json
  5. 2
      package.json
  6. 2
      src/core.js

2
.bmp.yml

@ -1,5 +1,5 @@
--- ---
version: 0.5.0 version: 0.5.1
commit: 'chore(version): bump to v%.%.%' commit: 'chore(version): bump to v%.%.%'
files: files:
src/core.js: 'version: "%.%.%"' src/core.js: 'version: "%.%.%"'

28
c3.js

@ -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) { (function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) : typeof define === 'function' && define.amd ? define(factory) :
@ -978,7 +978,7 @@
$$.axes.subx.style("opacity", isHidden ? 0 : 1).call($$.subXAxis, transition); $$.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_fn;
var c3_chart_internal_fn; var c3_chart_internal_fn;
@ -4319,7 +4319,18 @@
return a + b.value; return a + b.value;
}, 0); }, 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 () { c3_chart_internal_fn.updateRadius = function () {
@ -5826,13 +5837,13 @@
orderAsc = $$.isOrderAsc(), orderAsc = $$.isOrderAsc(),
orderDesc = $$.isOrderDesc(); orderDesc = $$.isOrderDesc();
if (orderAsc || orderDesc) { if (orderAsc || orderDesc) {
return function (t1, t2) {
var reducer = function reducer(p, c) { var reducer = function reducer(p, c) {
return p + Math.abs(c.value); return p + Math.abs(c.value);
}; };
return function (t1, t2) {
var t1Sum = t1.values.reduce(reducer, 0), var t1Sum = t1.values.reduce(reducer, 0),
t2Sum = t2.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)) { } else if (isFunction(config.data_order)) {
return config.data_order; return config.data_order;
@ -5847,9 +5858,6 @@
var fct = this.getOrderFunction(); var fct = this.getOrderFunction();
if (fct) { if (fct) {
targets.sort(fct); targets.sort(fct);
if (this.isOrderAsc() || this.isOrderDesc()) {
targets.reverse();
}
} }
return targets; return targets;
}; };
@ -8312,11 +8320,11 @@
} }
// Calculate x axis height when tick rotated // Calculate x axis height when tick rotated
if (axisId === 'x' && !config.axis_rotated && config.axis_x_tick_rotate) { 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 // Calculate y axis height when tick rotated
if (axisId === 'y' && config.axis_rotated && config.axis_y_tick_rotate) { 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); return h + ($$.axis.getLabelPositionById(axisId).isInner ? 0 : 10) + (axisId === 'y2' ? -10 : 0);
}; };

4
c3.min.js vendored

File diff suppressed because one or more lines are too long

2
component.json

@ -2,7 +2,7 @@
"name": "c3", "name": "c3",
"repo": "masayuki0812/c3", "repo": "masayuki0812/c3",
"description": "A D3-based reusable chart library", "description": "A D3-based reusable chart library",
"version": "0.5.0", "version": "0.5.1",
"keywords": [], "keywords": [],
"dependencies": { "dependencies": {
"mbostock/d3": "v3.5.6" "mbostock/d3": "v3.5.6"

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "c3", "name": "c3",
"version": "0.5.0", "version": "0.5.1",
"description": "D3-based reusable chart library", "description": "D3-based reusable chart library",
"main": "c3.js", "main": "c3.js",
"scripts": { "scripts": {

2
src/core.js

@ -2,7 +2,7 @@ import Axis from './axis';
import CLASS from './class'; import CLASS from './class';
import { isValue, isFunction, isString, isUndefined, isDefined, ceil10, asHalfPixel, diffDomain, isEmpty, notEmpty, getOption, hasValue, sanitise, getPathBox } from './util'; 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_fn;
export var c3_chart_internal_fn; export var c3_chart_internal_fn;

Loading…
Cancel
Save