Browse Source

chore: resolve conflict of build files

pull/2246/head
Yoshiya Hinosawa 7 years ago
parent
commit
233a9c0bf3
  1. 2
      .bmp.yml
  2. 1247
      c3.js
  3. 4
      c3.min.js
  4. 2
      component.json
  5. 2
      package.json
  6. 22
      src/axis.js
  7. 1
      src/config.js
  8. 4
      src/core.js
  9. 2
      src/size.js

2
.bmp.yml

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

1247
c3.js

File diff suppressed because it is too large Load Diff

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.4.21", "version": "0.4.22",
"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.4.21", "version": "0.4.22",
"description": "D3-based reusable chart library", "description": "D3-based reusable chart library",
"main": "c3.js", "main": "c3.js",
"scripts": { "scripts": {

22
src/axis.js

@ -251,13 +251,16 @@ c3_axis_internal_fn.generateAxis = function () {
{ {
// TODO: rotated tick text // TODO: rotated tick text
tickTransform = internal.axisX; tickTransform = internal.axisX;
lineUpdate.attr("x2", 0) lineUpdate.attr("x1", tickX)
.attr("y2", -internal.innerTickSize); .attr("x2", tickX)
.attr("y2", function (d, i) { return -1 * internal.lineY2(d, i); });
textUpdate.attr("x", 0) textUpdate.attr("x", 0)
.attr("y", -internal.tickLength) .attr("y", function (d, i) { return -1 * internal.textY(d, i) - (params.isCategory ? 2 : (internal.tickLength - 2)); })
.style("text-anchor", "middle"); .attr("transform", function (d, i) { return internal.textTransform(d, i); })
.style("text-anchor", function (d, i) { return internal.textTextAnchor(d, i); });
tspanUpdate.attr('x', 0) tspanUpdate.attr('x', 0)
.attr("dy", "0em"); .attr("dy", function (d, i) { return internal.tspanDy(d, i); })
.attr('dx', function (d, i) { return internal.tspanDx(d, i); });
pathUpdate.attr("d", "M" + internal.range[0] + "," + -internal.outerTickSize + "V0H" + internal.range[1] + "V" + -internal.outerTickSize); pathUpdate.attr("d", "M" + internal.range[0] + "," + -internal.outerTickSize + "V0H" + internal.range[1] + "V" + -internal.outerTickSize);
break; break;
} }
@ -279,9 +282,10 @@ c3_axis_internal_fn.generateAxis = function () {
{ {
tickTransform = internal.axisY; tickTransform = internal.axisY;
lineUpdate.attr("x2", internal.innerTickSize) lineUpdate.attr("x2", internal.innerTickSize)
.attr("y2", 0); .attr("y1", tickY)
.attr("y2", tickY);
textUpdate.attr("x", internal.tickLength) textUpdate.attr("x", internal.tickLength)
.attr("y", 0) .attr("y", internal.tickOffset)
.style("text-anchor", "start"); .style("text-anchor", "start");
tspanUpdate.attr('x', internal.tickLength) tspanUpdate.attr('x', internal.tickLength)
.attr("dy", function (d, i) { return internal.tspanDy(d, i); }); .attr("dy", function (d, i) { return internal.tspanDy(d, i); });
@ -384,7 +388,7 @@ c3_axis_fn.init = function init() {
var $$ = this.owner, config = $$.config, main = $$.main; var $$ = this.owner, config = $$.config, main = $$.main;
$$.axes.x = main.append("g") $$.axes.x = main.append("g")
.attr("class", CLASS.axis + ' ' + CLASS.axisX) .attr("class", CLASS.axis + ' ' + CLASS.axisX)
.attr("clip-path", $$.clipPathForXAxis) .attr("clip-path", config.axis_x_inner ? "" : $$.clipPathForXAxis)
.attr("transform", $$.getTranslate('x')) .attr("transform", $$.getTranslate('x'))
.style("visibility", config.axis_x_show ? 'visible' : 'hidden'); .style("visibility", config.axis_x_show ? 'visible' : 'hidden');
$$.axes.x.append("text") $$.axes.x.append("text")
@ -605,7 +609,7 @@ c3_axis_fn.dyForXAxisLabel = function dyForXAxisLabel() {
var $$ = this.owner, config = $$.config, var $$ = this.owner, config = $$.config,
position = this.getXAxisLabelPosition(); position = this.getXAxisLabelPosition();
if (config.axis_rotated) { if (config.axis_rotated) {
return position.isInner ? "1.2em" : -25 - this.getMaxTickWidth('x'); return position.isInner ? "1.2em" : -25 - ($$.config.axis_x_inner ? 0 : this.getMaxTickWidth('x'));
} else { } else {
return position.isInner ? "-0.5em" : config.axis_x_height ? config.axis_x_height - 10 : "3em"; return position.isInner ? "-0.5em" : config.axis_x_height ? config.axis_x_height - 10 : "3em";
} }

1
src/config.js

@ -114,6 +114,7 @@ c3_chart_internal_fn.getDefaultConfig = function () {
axis_x_height: undefined, axis_x_height: undefined,
axis_x_selection: undefined, axis_x_selection: undefined,
axis_x_label: {}, axis_x_label: {},
axis_x_inner: undefined,
axis_y_show: true, axis_y_show: true,
axis_y_type: undefined, axis_y_type: undefined,
axis_y_max: undefined, axis_y_max: undefined,

4
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.4.21" }; export var c3 = { version: "0.4.22" };
export var c3_chart_fn; export var c3_chart_fn;
export var c3_chart_internal_fn; export var c3_chart_internal_fn;
@ -124,7 +124,7 @@ c3_chart_internal_fn.initParams = function () {
$$.focusedTargetIds = []; $$.focusedTargetIds = [];
$$.defocusedTargetIds = []; $$.defocusedTargetIds = [];
$$.xOrient = config.axis_rotated ? "left" : "bottom"; $$.xOrient = config.axis_rotated ? (config.axis_x_inner ? "right" : "left") : (config.axis_x_inner ? "top" : "bottom");
$$.yOrient = config.axis_rotated ? (config.axis_y_inner ? "top" : "bottom") : (config.axis_y_inner ? "right" : "left"); $$.yOrient = config.axis_rotated ? (config.axis_y_inner ? "top" : "bottom") : (config.axis_y_inner ? "right" : "left");
$$.y2Orient = config.axis_rotated ? (config.axis_y2_inner ? "bottom" : "top") : (config.axis_y2_inner ? "left" : "right"); $$.y2Orient = config.axis_rotated ? (config.axis_y2_inner ? "bottom" : "top") : (config.axis_y2_inner ? "left" : "right");
$$.subXOrient = config.axis_rotated ? "left" : "bottom"; $$.subXOrient = config.axis_rotated ? "left" : "bottom";

2
src/size.js

@ -29,7 +29,7 @@ c3_chart_internal_fn.getCurrentPaddingLeft = function (withoutRecompute) {
if (isValue(config.padding_left)) { if (isValue(config.padding_left)) {
return config.padding_left; return config.padding_left;
} else if (config.axis_rotated) { } else if (config.axis_rotated) {
return !config.axis_x_show ? 1 : Math.max(ceil10($$.getAxisWidthByAxisId('x', withoutRecompute)), 40); return (!config.axis_x_show || config.axis_x_inner) ? 1 : Math.max(ceil10($$.getAxisWidthByAxisId('x', withoutRecompute)), 40);
} else if (!config.axis_y_show || config.axis_y_inner) { // && !config.axis_rotated } else if (!config.axis_y_show || config.axis_y_inner) { // && !config.axis_rotated
return $$.axis.getYAxisLabelPosition().isOuter ? 30 : 1; return $$.axis.getYAxisLabelPosition().isOuter ? 30 : 1;
} else { } else {

Loading…
Cancel
Save