Skip to content

Commit

Permalink
skip: 3.14.2-nightly-20241127004701 build [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
netil committed Nov 27, 2024
1 parent e076319 commit 5a0d227
Show file tree
Hide file tree
Showing 42 changed files with 210 additions and 156 deletions.
74 changes: 47 additions & 27 deletions dist-esm/billboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* billboard.js, JavaScript chart library
* https://naver.github.io/billboard.js/
*
* @version 3.14.1-nightly-20241120004710
* @version 3.14.2-nightly-20241127004701
*/
import { pointer, select, namespaces, selectAll } from 'd3-selection';
import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
Expand Down Expand Up @@ -13396,6 +13396,26 @@ var Axis = /** @class */ (function () {
}
return type;
};
/**
* Get extent value
* @returns {Array} default extent
* @private
*/
Axis.prototype.getExtent = function () {
var $$ = this.owner;
var config = $$.config, scale = $$.scale;
var extent = config.axis_x_extent;
if (extent) {
if (isFunction(extent)) {
extent = extent.bind($$.api)($$.getXDomain($$.data.targets), scale.subX);
}
else if (this.isTimeSeries() && extent.every(isNaN)) {
var fn_1 = parseDate.bind($$);
extent = extent.map(function (v) { return scale.subX(fn_1(v)); });
}
}
return extent;
};
Axis.prototype.init = function () {
var _this = this;
var $$ = this.owner;
Expand Down Expand Up @@ -13577,8 +13597,8 @@ var Axis = /** @class */ (function () {
.scale((isX && $$.scale.zoom) || scale)
.orient(orient);
if (isX && this.isTimeSeries() && tickValues && !isFunction(tickValues)) {
var fn_1 = parseDate.bind($$);
tickValues = tickValues.map(function (v) { return fn_1(v); });
var fn_2 = parseDate.bind($$);
tickValues = tickValues.map(function (v) { return fn_2(v); });
}
else if (!isX && this.isTimeSeriesY()) {
// https://github.com/d3/d3/blob/master/CHANGES.md#time-intervals-d3-time
Expand Down Expand Up @@ -16400,7 +16420,8 @@ var x = {
*/
axis_x_height: undefined,
/**
* Set default extent for subchart and zoom. This can be an array or function that returns an array.
* Set extent for subchart and zoom(drag only). This can be an array or function that returns an array.
* - **NOTE:** Specifying value, will limit the zoom scope selection within.
* @name axis․x․extent
* @memberof Options
* @type {Array|Function}
Expand Down Expand Up @@ -23440,7 +23461,7 @@ var subchart = {
// set the brush extent
$$.brush.scale = function (scale) {
var h = config.subchart_size_height;
var extent = $$.getExtent();
var extent = $$.axis.getExtent();
if (!extent && scale.range) {
extent = [[0, 0], [scale.range()[1], h]];
}
Expand Down Expand Up @@ -23667,26 +23688,6 @@ var subchart = {
$T(subchart.main.select(".".concat(CLASS.axisX)), withTransition);
subchart.main.attr("transform", $$.getTranslate("context"));
subXAxis.attr("transform", $$.getTranslate("subX"));
},
/**
* Get extent value
* @returns {Array} default extent
* @private
*/
getExtent: function () {
var $$ = this;
var config = $$.config, scale = $$.scale;
var extent = config.axis_x_extent;
if (extent) {
if (isFunction(extent)) {
extent = extent.bind($$.api)($$.getXDomain($$.data.targets), scale.subX);
}
else if ($$.axis.isTimeSeries() && extent.every(isNaN)) {
var fn_1 = parseDate.bind($$);
extent = extent.map(function (v) { return scale.subX(fn_1(v)); });
}
}
return extent;
}
};

Expand Down Expand Up @@ -23967,6 +23968,7 @@ var zoom = {
var start = 0;
var end = 0;
var zoomRect;
var extent;
var prop = {
axis: isRotated ? "y" : "x",
attr: isRotated ? "height" : "width",
Expand All @@ -23975,6 +23977,8 @@ var zoom = {
$$.zoomBehaviour = drag$1()
.clickDistance(4)
.on("start", function (event) {
// get extent at first zooming, when is zoomed do not consider
extent = $$.scale.zoom ? null : $$.axis.getExtent();
state.event = event;
$$.setDragStatus(true);
$$.unselectRect();
Expand All @@ -23986,6 +23990,14 @@ var zoom = {
.attr("height", isRotated ? 0 : state.height);
}
start = getPointer(event, this)[prop.index];
if (extent) {
if (start < extent[0]) {
start = extent[0];
}
else if (start > extent[1]) {
start = extent[1];
}
}
end = start;
zoomRect
.attr(prop.axis, start)
Expand All @@ -23994,6 +24006,14 @@ var zoom = {
})
.on("drag", function (event) {
end = getPointer(event, this)[prop.index];
if (extent) {
if (end > extent[1]) {
end = extent[1];
}
else if (end < extent[0]) {
end = extent[0];
}
}
zoomRect
.attr(prop.axis, Math.min(start, end))
.attr(prop.attr, Math.abs(end - start));
Expand Down Expand Up @@ -24626,7 +24646,7 @@ var zoomModule = function () {
var defaults = {};
/**
* @namespace bb
* @version 3.14.1-nightly-20241120004710
* @version 3.14.2-nightly-20241127004701
*/
var bb = {
/**
Expand All @@ -24636,7 +24656,7 @@ var bb = {
* bb.version; // "1.0.0"
* @memberof bb
*/
version: "3.14.1-nightly-20241120004710",
version: "3.14.2-nightly-20241127004701",
/**
* Generate chart
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
Expand Down
4 changes: 2 additions & 2 deletions dist-esm/plugin/billboardjs-plugin-bubblecompare.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* billboard.js, JavaScript chart library
* https://naver.github.io/billboard.js/
*
* @version 3.14.1-nightly-20241120004710
* @version 3.14.2-nightly-20241127004701
* @requires billboard.js
* @summary billboard.js plugin
*/
Expand Down Expand Up @@ -100,7 +100,7 @@ var Plugin = /** @class */ (function () {
delete _this[key];
});
};
Plugin.version = "3.14.1-nightly-20241120004710";
Plugin.version = "3.14.2-nightly-20241127004701";
return Plugin;
}());

Expand Down
4 changes: 2 additions & 2 deletions dist-esm/plugin/billboardjs-plugin-sparkline.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* billboard.js, JavaScript chart library
* https://naver.github.io/billboard.js/
*
* @version 3.14.1-nightly-20241120004710
* @version 3.14.2-nightly-20241127004701
* @requires billboard.js
* @summary billboard.js plugin
*/
Expand Down Expand Up @@ -443,7 +443,7 @@ var Plugin = /** @class */ (function () {
delete _this[key];
});
};
Plugin.version = "3.14.1-nightly-20241120004710";
Plugin.version = "3.14.2-nightly-20241127004701";
return Plugin;
}());

Expand Down
4 changes: 2 additions & 2 deletions dist-esm/plugin/billboardjs-plugin-stanford.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* billboard.js, JavaScript chart library
* https://naver.github.io/billboard.js/
*
* @version 3.14.1-nightly-20241120004710
* @version 3.14.2-nightly-20241127004701
* @requires billboard.js
* @summary billboard.js plugin
*/
Expand Down Expand Up @@ -501,7 +501,7 @@ var Plugin = /** @class */ (function () {
delete _this[key];
});
};
Plugin.version = "3.14.1-nightly-20241120004710";
Plugin.version = "3.14.2-nightly-20241127004701";
return Plugin;
}());

Expand Down
4 changes: 2 additions & 2 deletions dist-esm/plugin/billboardjs-plugin-tableview.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* billboard.js, JavaScript chart library
* https://naver.github.io/billboard.js/
*
* @version 3.14.1-nightly-20241120004710
* @version 3.14.2-nightly-20241127004701
* @requires billboard.js
* @summary billboard.js plugin
*/
Expand Down Expand Up @@ -290,7 +290,7 @@ var Plugin = /** @class */ (function () {
delete _this[key];
});
};
Plugin.version = "3.14.1-nightly-20241120004710";
Plugin.version = "3.14.2-nightly-20241127004701";
return Plugin;
}());

Expand Down
4 changes: 2 additions & 2 deletions dist-esm/plugin/billboardjs-plugin-textoverlap.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* billboard.js, JavaScript chart library
* https://naver.github.io/billboard.js/
*
* @version 3.14.1-nightly-20241120004710
* @version 3.14.2-nightly-20241127004701
* @requires billboard.js
* @summary billboard.js plugin
*/
Expand Down Expand Up @@ -267,7 +267,7 @@ var Plugin = /** @class */ (function () {
delete _this[key];
});
};
Plugin.version = "3.14.1-nightly-20241120004710";
Plugin.version = "3.14.2-nightly-20241127004701";
return Plugin;
}());

Expand Down
2 changes: 1 addition & 1 deletion dist/billboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* billboard.js, JavaScript chart library
* https://naver.github.io/billboard.js/
*
* @version 3.14.1-nightly-20241120004710
* @version 3.14.2-nightly-20241127004701
*/
/*-- Chart --*/
.bb svg {
Expand Down
63 changes: 40 additions & 23 deletions dist/billboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* billboard.js, JavaScript chart library
* https://naver.github.io/billboard.js/
*
* @version 3.14.1-nightly-20241120004710
* @version 3.14.2-nightly-20241127004701
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
Expand Down Expand Up @@ -10927,7 +10927,7 @@ extend(zoom, {
};
$$.brush.scale = function(scale2) {
const h = config.subchart_size_height;
let extent = $$.getExtent();
let extent = $$.axis.getExtent();
if (!extent && scale2.range) {
extent = [[0, 0], [scale2.range()[1], h]];
} else if (isArray(extent)) {
Expand Down Expand Up @@ -11108,25 +11108,6 @@ extend(zoom, {
const subXAxis = (transitions == null ? void 0 : transitions.axisSubX) ? transitions.axisSubX : $T(subchart.main.select(`.${classes.axisX}`), withTransition);
subchart.main.attr("transform", $$.getTranslate("context"));
subXAxis.attr("transform", $$.getTranslate("subX"));
},
/**
* Get extent value
* @returns {Array} default extent
* @private
*/
getExtent() {
const $$ = this;
const { config, scale } = $$;
let extent = config.axis_x_extent;
if (extent) {
if (isFunction(extent)) {
extent = extent.bind($$.api)($$.getXDomain($$.data.targets), scale.subX);
} else if ($$.axis.isTimeSeries() && extent.every(isNaN)) {
const fn = parseDate.bind($$);
extent = extent.map((v) => scale.subX(fn(v)));
}
}
return extent;
}
});

Expand Down Expand Up @@ -11368,24 +11349,40 @@ extend(zoom, {
let start = 0;
let end = 0;
let zoomRect;
let extent;
const prop = {
axis: isRotated ? "y" : "x",
attr: isRotated ? "height" : "width",
index: isRotated ? 1 : 0
};
$$.zoomBehaviour = (0,external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_.drag)().clickDistance(4).on("start", function(event) {
extent = $$.scale.zoom ? null : $$.axis.getExtent();
state.event = event;
$$.setDragStatus(true);
$$.unselectRect();
if (!zoomRect) {
zoomRect = $$.$el.main.append("rect").attr("clip-path", state.clip.path).attr("class", $ZOOM.zoomBrush).attr("width", isRotated ? state.width : 0).attr("height", isRotated ? 0 : state.height);
}
start = getPointer(event, this)[prop.index];
if (extent) {
if (start < extent[0]) {
start = extent[0];
} else if (start > extent[1]) {
start = extent[1];
}
}
end = start;
zoomRect.attr(prop.axis, start).attr(prop.attr, 0);
$$.onZoomStart(event);
}).on("drag", function(event) {
end = getPointer(event, this)[prop.index];
if (extent) {
if (end > extent[1]) {
end = extent[1];
} else if (end < extent[0]) {
end = extent[0];
}
}
zoomRect.attr(prop.axis, Math.min(start, end)).attr(prop.attr, Math.abs(end - start));
}).on("end", (event) => {
const scale = $$.scale.zoom || $$.scale.x;
Expand Down Expand Up @@ -13311,6 +13308,25 @@ class Axis_Axis {
}
return type;
}
/**
* Get extent value
* @returns {Array} default extent
* @private
*/
getExtent() {
const $$ = this.owner;
const { config, scale } = $$;
let extent = config.axis_x_extent;
if (extent) {
if (isFunction(extent)) {
extent = extent.bind($$.api)($$.getXDomain($$.data.targets), scale.subX);
} else if (this.isTimeSeries() && extent.every(isNaN)) {
const fn = parseDate.bind($$);
extent = extent.map((v) => scale.subX(fn(v)));
}
}
return extent;
}
init() {
const $$ = this.owner;
const { config, $el: { main, axis }, state: { clip } } = $$;
Expand Down Expand Up @@ -15959,7 +15975,8 @@ function smoothLines(el, type) {
*/
axis_x_height: void 0,
/**
* Set default extent for subchart and zoom. This can be an array or function that returns an array.
* Set extent for subchart and zoom(drag only). This can be an array or function that returns an array.
* - **NOTE:** Specifying value, will limit the zoom scope selection within.
* @name axis․x․extent
* @memberof Options
* @type {Array|Function}
Expand Down Expand Up @@ -21845,7 +21862,7 @@ const bb = {
* bb.version; // "1.0.0"
* @memberof bb
*/
version: "3.14.1-nightly-20241120004710",
version: "3.14.2-nightly-20241127004701",
/**
* Generate chart
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
Expand Down
2 changes: 1 addition & 1 deletion dist/billboard.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5a0d227

Please sign in to comment.