Browse Source

chore(version): bump to v0.6.1

pull/2368/head v0.6.1
Yoshiya Hinosawa 7 years ago
parent
commit
e685efe711
  1. 2
      .bmp.yml
  2. 52
      c3.js
  3. 4
      c3.min.js
  4. 2
      component.json
  5. 4
      docs/index.html.haml
  6. 4
      docs/js/c3.min.js
  7. 2
      package.json
  8. 2
      src/core.js

2
.bmp.yml

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

52
c3.js

@ -1,4 +1,4 @@
/* @license C3.js v0.6.0 | (c) C3 Team and other contributors | http://c3js.org/ */ /* @license C3.js v0.6.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) :
@ -303,6 +303,11 @@
c3_axis_internal_fn.tspanData = function (d, i, scale) { c3_axis_internal_fn.tspanData = function (d, i, scale) {
var internal = this; var internal = this;
var splitted = internal.params.tickMultiline ? internal.splitTickText(d, scale) : [].concat(internal.textFormatted(d)); var splitted = internal.params.tickMultiline ? internal.splitTickText(d, scale) : [].concat(internal.textFormatted(d));
if (internal.params.tickMultiline && internal.params.tickMultilineMax > 0) {
splitted = internal.ellipsify(splitted, internal.params.tickMultilineMax);
}
return splitted.map(function (s) { return splitted.map(function (s) {
return { index: i, splitted: s, length: splitted.length }; return { index: i, splitted: s, length: splitted.length };
}); });
@ -342,6 +347,27 @@
return split(splitted, tickText + ""); return split(splitted, tickText + "");
}; };
c3_axis_internal_fn.ellipsify = function (splitted, max) {
if (splitted.length <= max) {
return splitted;
}
var ellipsified = splitted.slice(0, max);
var remaining = 3;
for (var i = max - 1; i >= 0; i--) {
var available = ellipsified[i].length;
ellipsified[i] = ellipsified[i].substr(0, available - remaining).padEnd(available, '.');
remaining -= available;
if (remaining <= 0) {
break;
}
}
return ellipsified;
};
c3_axis_internal_fn.updateTickLength = function () { c3_axis_internal_fn.updateTickLength = function () {
var internal = this; var internal = this;
internal.tickLength = Math.max(internal.innerTickSize, 0) + internal.tickPadding; internal.tickLength = Math.max(internal.innerTickSize, 0) + internal.tickPadding;
@ -635,6 +661,7 @@
isCategory: $$.isCategorized(), isCategory: $$.isCategorized(),
withOuterTick: withOuterTick, withOuterTick: withOuterTick,
tickMultiline: config.axis_x_tick_multiline, tickMultiline: config.axis_x_tick_multiline,
tickMultilineMax: config.axis_x_tick_multiline ? Number(config.axis_x_tick_multilineMax) : 0,
tickWidth: config.axis_x_tick_width, tickWidth: config.axis_x_tick_width,
tickTextRotate: withoutRotateTickText ? 0 : config.axis_x_tick_rotate, tickTextRotate: withoutRotateTickText ? 0 : config.axis_x_tick_rotate,
withoutTransition: withoutTransition withoutTransition: withoutTransition
@ -996,7 +1023,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.6.0" }; var c3 = { version: "0.6.1" };
var c3_chart_fn; var c3_chart_fn;
var c3_chart_internal_fn; var c3_chart_internal_fn;
@ -3355,6 +3382,26 @@
} }
})(); })();
// String.padEnd polyfill for IE11
//
// https://github.com/uxitten/polyfill/blob/master/string.polyfill.js
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/padEnd
if (!String.prototype.padEnd) {
String.prototype.padEnd = function padEnd(targetLength, padString) {
targetLength = targetLength >> 0; //floor if number or convert non-number to 0;
padString = String(typeof padString !== 'undefined' ? padString : ' ');
if (this.length > targetLength) {
return String(this);
} else {
targetLength = targetLength - this.length;
if (targetLength > padString.length) {
padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed
}
return String(this) + padString.slice(0, targetLength);
}
};
}
/* jshint ignore:end */ /* jshint ignore:end */
c3_chart_fn.axis = function () {}; c3_chart_fn.axis = function () {};
@ -5213,6 +5260,7 @@
axis_x_tick_rotate: 0, axis_x_tick_rotate: 0,
axis_x_tick_outer: true, axis_x_tick_outer: true,
axis_x_tick_multiline: true, axis_x_tick_multiline: true,
axis_x_tick_multilineMax: 0,
axis_x_tick_width: null, axis_x_tick_width: null,
axis_x_max: undefined, axis_x_max: undefined,
axis_x_min: undefined, axis_x_min: undefined,

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.6.0", "version": "0.6.1",
"keywords": [], "keywords": [],
"dependencies": { "dependencies": {
"mbostock/d3": "v5.0.0" "mbostock/d3": "v5.0.0"

4
docs/index.html.haml

@ -38,6 +38,10 @@
%h3 Change Log %h3 Change Log
%ul %ul
%li
<a href="https://github.com/c3js/c3/releases/tag/v0.6.1">v0.6.1</a><span class="gray">&nbsp;-&nbsp;2018-05-17</span>
%ul
%li Add axis.x.tick.multilineMax option.
%li %li
<a href="https://github.com/c3js/c3/releases/tag/v0.6.0">v0.6.0</a><span class="gray">&nbsp;-&nbsp;2018-05-14</span> <a href="https://github.com/c3js/c3/releases/tag/v0.6.0">v0.6.0</a><span class="gray">&nbsp;-&nbsp;2018-05-14</span>
%ul %ul

4
docs/js/c3.min.js vendored

File diff suppressed because one or more lines are too long

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "c3", "name": "c3",
"version": "0.6.0", "version": "0.6.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.6.0" }; export var c3 = { version: "0.6.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