billboard.js 4.1.0-next.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +268 -107
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +16 -16
- package/dist/billboard.pkgd.js +3198 -1755
- package/dist/billboard.pkgd.min.js +23 -23
- package/dist/billboard.react.js +28 -49
- package/dist/billboard.react.min.js +2 -2
- package/dist/billboard.worker.js +1 -1
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +14 -31
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +14 -31
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +21 -35
- package/dist/plugin/billboardjs-plugin-stanford.min.js +7 -7
- package/dist/plugin/billboardjs-plugin-tableview.js +15 -30
- package/dist/plugin/billboardjs-plugin-tableview.min.js +5 -5
- package/dist/plugin/billboardjs-plugin-textoverlap.js +15 -30
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2959 -1684
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +8 -8
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2960 -1685
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2961 -1686
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -18
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2962 -1687
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +11 -11
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2963 -1688
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +8 -8
- package/dist/theme/dark.css +1 -1
- package/dist/theme/dark.min.css +1 -1
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +1 -1
- package/dist/theme/modern.css +1 -1
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/Chart/Chart.js +1 -1
- package/dist-esm/Chart/api/axis.js +1 -1
- package/dist-esm/Chart/api/category.js +1 -1
- package/dist-esm/Chart/api/chart.js +9 -7
- package/dist-esm/Chart/api/color.js +1 -1
- package/dist-esm/Chart/api/data.js +3 -3
- package/dist-esm/Chart/api/export.js +1 -1
- package/dist-esm/Chart/api/flow.js +1 -1
- package/dist-esm/Chart/api/focus.js +1 -1
- package/dist-esm/Chart/api/grid.js +1 -1
- package/dist-esm/Chart/api/group.js +1 -1
- package/dist-esm/Chart/api/legend.js +1 -1
- package/dist-esm/Chart/api/load.js +1 -1
- package/dist-esm/Chart/api/regions.js +1 -1
- package/dist-esm/Chart/api/selection.js +1 -1
- package/dist-esm/Chart/api/show.js +1 -1
- package/dist-esm/Chart/api/stubs.js +1 -1
- package/dist-esm/Chart/api/subchart.js +1 -1
- package/dist-esm/Chart/api/tooltip.js +1 -1
- package/dist-esm/Chart/api/x.js +11 -9
- package/dist-esm/Chart/api/zoom.js +8 -7
- package/dist-esm/ChartInternal/Axis/Axis.js +7 -6
- package/dist-esm/ChartInternal/Axis/AxisRenderer.js +1 -1
- package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +1 -1
- package/dist-esm/ChartInternal/ChartInternal.js +32 -8
- package/dist-esm/ChartInternal/data/convert.helper.js +7 -5
- package/dist-esm/ChartInternal/data/convert.js +1 -1
- package/dist-esm/ChartInternal/data/data.js +64 -33
- package/dist-esm/ChartInternal/data/load.js +1 -1
- package/dist-esm/ChartInternal/interactions/drag.js +1 -1
- package/dist-esm/ChartInternal/interactions/eventrect.js +1 -1
- package/dist-esm/ChartInternal/interactions/flow.js +17 -15
- package/dist-esm/ChartInternal/interactions/interaction.js +1 -1
- package/dist-esm/ChartInternal/interactions/subchart.js +8 -6
- package/dist-esm/ChartInternal/interactions/zoom.js +8 -6
- package/dist-esm/ChartInternal/internals/category.js +1 -1
- package/dist-esm/ChartInternal/internals/class.js +1 -1
- package/dist-esm/ChartInternal/internals/clip.js +1 -1
- package/dist-esm/ChartInternal/internals/color.js +1 -1
- package/dist-esm/ChartInternal/internals/domain.js +13 -9
- package/dist-esm/ChartInternal/internals/format.js +5 -3
- package/dist-esm/ChartInternal/internals/grid.js +5 -4
- package/dist-esm/ChartInternal/internals/legend.js +8 -7
- package/dist-esm/ChartInternal/internals/redraw.js +2 -2
- package/dist-esm/ChartInternal/internals/region.js +1 -1
- package/dist-esm/ChartInternal/internals/scale.js +1 -1
- package/dist-esm/ChartInternal/internals/selection.js +1 -1
- package/dist-esm/ChartInternal/internals/size.axis.js +1 -1
- package/dist-esm/ChartInternal/internals/size.js +56 -10
- package/dist-esm/ChartInternal/internals/style.js +1 -1
- package/dist-esm/ChartInternal/internals/subchart.util.js +1 -1
- package/dist-esm/ChartInternal/internals/text.arc.js +1 -1
- package/dist-esm/ChartInternal/internals/text.js +12 -9
- package/dist-esm/ChartInternal/internals/text.util.js +4 -4
- package/dist-esm/ChartInternal/internals/title.js +3 -2
- package/dist-esm/ChartInternal/internals/tooltip.js +25 -20
- package/dist-esm/ChartInternal/internals/transform.js +1 -1
- package/dist-esm/ChartInternal/internals/type.js +1 -1
- package/dist-esm/ChartInternal/shape/arc.js +3 -2
- package/dist-esm/ChartInternal/shape/area.js +3 -2
- package/dist-esm/ChartInternal/shape/bar.js +1 -1
- package/dist-esm/ChartInternal/shape/bubble.js +1 -1
- package/dist-esm/ChartInternal/shape/candlestick.js +1 -1
- package/dist-esm/ChartInternal/shape/core/barRadius.js +1 -1
- package/dist-esm/ChartInternal/shape/core/bubble.js +1 -1
- package/dist-esm/ChartInternal/shape/core/candlestick.js +1 -1
- package/dist-esm/ChartInternal/shape/core/dataRegion.js +1 -1
- package/dist-esm/ChartInternal/shape/core/geometry.js +1 -1
- package/dist-esm/ChartInternal/shape/core/path.js +1 -1
- package/dist-esm/ChartInternal/shape/core/point.js +1 -1
- package/dist-esm/ChartInternal/shape/core/treemap.js +3 -2
- package/dist-esm/ChartInternal/shape/funnel.js +1 -1
- package/dist-esm/ChartInternal/shape/gauge.js +1 -1
- package/dist-esm/ChartInternal/shape/line.js +3 -2
- package/dist-esm/ChartInternal/shape/point.js +1 -1
- package/dist-esm/ChartInternal/shape/polar.js +1 -1
- package/dist-esm/ChartInternal/shape/radar.js +1 -1
- package/dist-esm/ChartInternal/shape/shape.js +3 -2
- package/dist-esm/ChartInternal/shape/treemap.js +1 -1
- package/dist-esm/canvas/CanvasAxisRenderer.js +27 -21
- package/dist-esm/canvas/CanvasEngine.js +1 -1
- package/dist-esm/canvas/CanvasPainter.js +1 -1
- package/dist-esm/canvas/CanvasRenderer.js +1 -1
- package/dist-esm/canvas/CanvasTheme.js +7 -8
- package/dist-esm/canvas/HitDetector.js +1 -1
- package/dist-esm/canvas/axisTicks.js +3 -2
- package/dist-esm/canvas/classes.js +1 -1
- package/dist-esm/canvas/color.js +1 -1
- package/dist-esm/canvas/geometry.js +1 -1
- package/dist-esm/canvas/labels.js +4 -4
- package/dist-esm/canvas/pointPattern.js +1 -1
- package/dist-esm/canvas/util.js +1 -1
- package/dist-esm/config/Options/Options.js +1 -1
- package/dist-esm/config/Options/axis/axis.js +1 -1
- package/dist-esm/config/Options/axis/x.js +1 -1
- package/dist-esm/config/Options/axis/y.js +1 -1
- package/dist-esm/config/Options/axis/y2.js +1 -13
- package/dist-esm/config/Options/common/boost.js +1 -1
- package/dist-esm/config/Options/common/color.js +1 -1
- package/dist-esm/config/Options/common/grid.js +1 -1
- package/dist-esm/config/Options/common/legend.js +1 -1
- package/dist-esm/config/Options/common/main.js +44 -2
- package/dist-esm/config/Options/common/point.js +1 -1
- package/dist-esm/config/Options/common/title.js +1 -1
- package/dist-esm/config/Options/common/tooltip.js +1 -1
- package/dist-esm/config/Options/data/axis.js +1 -1
- package/dist-esm/config/Options/data/data.js +1 -1
- package/dist-esm/config/Options/data/selection.js +1 -1
- package/dist-esm/config/Options/interaction/interaction.js +1 -1
- package/dist-esm/config/Options/interaction/subchart.js +1 -1
- package/dist-esm/config/Options/interaction/zoom.js +1 -1
- package/dist-esm/config/Options/shape/arc.js +1 -1
- package/dist-esm/config/Options/shape/area.js +1 -1
- package/dist-esm/config/Options/shape/bar.js +1 -1
- package/dist-esm/config/Options/shape/bubble.js +1 -1
- package/dist-esm/config/Options/shape/candlestick.js +1 -1
- package/dist-esm/config/Options/shape/donut.js +1 -1
- package/dist-esm/config/Options/shape/funnel.js +1 -1
- package/dist-esm/config/Options/shape/gauge.js +1 -1
- package/dist-esm/config/Options/shape/line.js +1 -1
- package/dist-esm/config/Options/shape/pie.js +1 -1
- package/dist-esm/config/Options/shape/polar.js +1 -1
- package/dist-esm/config/Options/shape/radar.js +1 -1
- package/dist-esm/config/Options/shape/scatter.js +1 -1
- package/dist-esm/config/Options/shape/spline.js +1 -1
- package/dist-esm/config/Options/shape/treemap.js +1 -1
- package/dist-esm/config/Store/Element.js +1 -1
- package/dist-esm/config/Store/State.js +4 -1
- package/dist-esm/config/Store/Store.js +1 -1
- package/dist-esm/config/classes.js +1 -1
- package/dist-esm/config/config.js +1 -1
- package/dist-esm/config/const.js +1 -1
- package/dist-esm/config/resolver/axis.core.js +1 -1
- package/dist-esm/config/resolver/axis.js +1 -1
- package/dist-esm/config/resolver/canvas.js +17 -12
- package/dist-esm/config/resolver/canvasShape.js +1 -1
- package/dist-esm/config/resolver/category.js +1 -1
- package/dist-esm/config/resolver/export.js +1 -1
- package/dist-esm/config/resolver/flow.js +1 -1
- package/dist-esm/config/resolver/grid.js +1 -1
- package/dist-esm/config/resolver/interaction/selection.js +1 -1
- package/dist-esm/config/resolver/interaction/subchart.js +1 -1
- package/dist-esm/config/resolver/interaction/zoom.js +1 -1
- package/dist-esm/config/resolver/regions.js +1 -1
- package/dist-esm/config/resolver/shape/arc.helpers.js +1 -1
- package/dist-esm/config/resolver/shape/area.js +1 -1
- package/dist-esm/config/resolver/shape/axis.helpers.js +1 -1
- package/dist-esm/config/resolver/shape/bar.js +1 -1
- package/dist-esm/config/resolver/shape/bubble.js +1 -1
- package/dist-esm/config/resolver/shape/candlestick.js +1 -1
- package/dist-esm/config/resolver/shape/donut.js +1 -1
- package/dist-esm/config/resolver/shape/funnel.js +1 -1
- package/dist-esm/config/resolver/shape/gauge.js +1 -1
- package/dist-esm/config/resolver/shape/line.js +1 -1
- package/dist-esm/config/resolver/shape/pie.js +1 -1
- package/dist-esm/config/resolver/shape/polar.js +1 -1
- package/dist-esm/config/resolver/shape/radar.js +1 -1
- package/dist-esm/config/resolver/shape/scatter.js +1 -1
- package/dist-esm/config/resolver/shape/treemap.js +1 -1
- package/dist-esm/core.js +5 -4
- package/dist-esm/index.canvas.js +1 -1
- package/dist-esm/index.esm.js +1 -1
- package/dist-esm/module/Cache.js +2 -2
- package/dist-esm/module/browser.js +2 -2
- package/dist-esm/module/dsv.js +1 -1
- package/dist-esm/module/error.js +1 -1
- package/dist-esm/module/generator.js +16 -3
- package/dist-esm/module/sanitize.js +1 -1
- package/dist-esm/module/util/brush.js +1 -1
- package/dist-esm/module/util/dom.js +9 -7
- package/dist-esm/module/util/object.js +1 -1
- package/dist-esm/module/util/type-checks.js +1 -1
- package/dist-esm/module/worker.js +1 -1
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -40
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +4 -41
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/dist-esm/react/index.js +1 -1
- package/package.json +36 -36
- package/src/Chart/api/chart.ts +1 -0
- package/src/Chart/api/data.ts +5 -3
- package/src/ChartInternal/ChartInternal.ts +72 -25
- package/src/ChartInternal/data/data.ts +68 -34
- package/src/ChartInternal/internals/redraw.ts +8 -1
- package/src/ChartInternal/internals/size.ts +99 -2
- package/src/config/Options/axis/y2.ts +0 -13
- package/src/config/Options/common/main.ts +43 -1
- package/src/config/Store/State.ts +4 -0
- package/src/config/const.ts +4 -0
- package/src/config/resolver/canvas.ts +3 -0
- package/src/module/Cache.ts +1 -1
- package/src/module/generator.ts +27 -2
- package/types/options.d.ts +38 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1.0
|
|
8
|
+
* @version 4.1.0
|
|
9
9
|
*/
|
|
10
10
|
import { parseDate } from "../module/util/object.js";
|
|
11
11
|
import { getScale } from "../ChartInternal/internals/scale.js";
|
|
@@ -160,7 +160,8 @@ function includeDomainEndpoints(ticks, domain) {
|
|
|
160
160
|
* @private
|
|
161
161
|
*/
|
|
162
162
|
function toComparableValue($$, value) {
|
|
163
|
-
|
|
163
|
+
const normalized = normalizeXValue($$, value);
|
|
164
|
+
return getCanvasComparableValue(normalized);
|
|
164
165
|
}
|
|
165
166
|
/**
|
|
166
167
|
* Check whether a zoom scale is showing a narrowed x domain.
|
package/dist-esm/canvas/color.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1.0
|
|
8
|
+
* @version 4.1.0
|
|
9
9
|
*/
|
|
10
10
|
import { getCandlestickGeometry, getRenderRect } from "../ChartInternal/shape/core/geometry.js";
|
|
11
11
|
import { isFiniteCanvasCoordinate } from "./util.js";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1.0
|
|
8
|
+
* @version 4.1.0
|
|
9
9
|
*/
|
|
10
10
|
import { isFunction, isNumber, isObject, isString } from "../module/util/type-checks.js";
|
|
11
11
|
import { parseShorthand, tplProcess } from "../module/util/object.js";
|
|
@@ -308,7 +308,7 @@ function getRotatedLabelPosition($$, d, x, y) {
|
|
|
308
308
|
const { value } = d;
|
|
309
309
|
const isNegative = isNumber(value) && value < 0 || isCandlestickType && !$$.getCandlestickData?.(d)?._isUp;
|
|
310
310
|
const gap = 4;
|
|
311
|
-
const doubleGap =
|
|
311
|
+
const doubleGap = 8;
|
|
312
312
|
if (isRotated) {
|
|
313
313
|
if (anchor === "start") {
|
|
314
314
|
x += isNegative ? 0 : doubleGap;
|
|
@@ -323,11 +323,11 @@ function getRotatedLabelPosition($$, d, x, y) {
|
|
|
323
323
|
} else {
|
|
324
324
|
if (anchor === "start") {
|
|
325
325
|
x += gap;
|
|
326
|
-
isNegative && (y +=
|
|
326
|
+
isNegative && (y += 16);
|
|
327
327
|
} else if (anchor === "middle") y -= doubleGap;
|
|
328
328
|
else if (anchor === "end") {
|
|
329
329
|
x -= gap;
|
|
330
|
-
isNegative && (y +=
|
|
330
|
+
isNegative && (y += 16);
|
|
331
331
|
}
|
|
332
332
|
if (isInverted) y += isNegative ? -17 : isCandlestickType ? 13 : 7;
|
|
333
333
|
}
|
package/dist-esm/canvas/util.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1.0
|
|
8
|
+
* @version 4.1.0
|
|
9
9
|
*/
|
|
10
10
|
//#region src/config/Options/axis/y2.ts
|
|
11
11
|
/**
|
|
@@ -16,18 +16,6 @@
|
|
|
16
16
|
* y2 Axis config options
|
|
17
17
|
*/
|
|
18
18
|
var y2_default = {
|
|
19
|
-
/**
|
|
20
|
-
* Set clip-path attribute for y2 axis element
|
|
21
|
-
* - **NOTE**: `clip-path` attribute for y2 Axis is set only when `axis.y2.inner` option is true.
|
|
22
|
-
* @name axis․y2․clipPath
|
|
23
|
-
* @memberof Options
|
|
24
|
-
* @type {boolean}
|
|
25
|
-
* @default true
|
|
26
|
-
* @example
|
|
27
|
-
* // don't set 'clip-path' attribute
|
|
28
|
-
* clipPath: false
|
|
29
|
-
*/
|
|
30
|
-
axis_y2_clipPath: true,
|
|
31
19
|
/**
|
|
32
20
|
* Show or hide y2 axis.
|
|
33
21
|
* - **NOTE**:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1.0
|
|
8
|
+
* @version 4.1.0
|
|
9
9
|
*/
|
|
10
10
|
//#region src/config/Options/common/main.ts
|
|
11
11
|
/**
|
|
@@ -166,12 +166,50 @@ var main_default = {
|
|
|
166
166
|
* - false: Disables automatic resize.
|
|
167
167
|
* - "parent": Enables automatic resize when the parent node is resized.
|
|
168
168
|
* - "viewBox": Enables automatic resize, and size will be fixed based on the viewbox.
|
|
169
|
+
* - **NOTE:** `true` listens to the window's resize event, so a container resized by anything
|
|
170
|
+
* else(a splitter drag, a sibling element growing, a CSS resize handle) is not detected.
|
|
171
|
+
* Use `"parent"`, which observes the parent node itself, for those.
|
|
169
172
|
* @property {boolean|number} [resize.timer=true] Set resize timer option.
|
|
170
173
|
* - **NOTE:** Available options
|
|
171
174
|
* - The resize function will be called using:
|
|
172
175
|
* - true: `setTimeout()`
|
|
173
176
|
* - false: `requestIdleCallback()`
|
|
174
177
|
* - Given number(delay in ms) value, resize function will be triggered using `setTimeout()` with given delay.
|
|
178
|
+
* - **NOTE:** With `resize.live`, this no longer decides when the size is reflected(every
|
|
179
|
+
* animation frame does), but when the resize is treated as finished:
|
|
180
|
+
* - `onresize`/`onresized` are called then, as they are without it.
|
|
181
|
+
* - When the rendering is being stretched, this is also when it's redrawn to the exact
|
|
182
|
+
* size. The stretched rendering stays on screen for this long after the resize stops,
|
|
183
|
+
* so keep the delay short for charts large enough to be stretched.
|
|
184
|
+
* - When every frame is redrawn, the last frame already drew the final size, so the
|
|
185
|
+
* delayed call changes nothing on screen.
|
|
186
|
+
* @property {boolean} [resize.live=false] Follow the container size while resizing, instead of
|
|
187
|
+
* only when the delayed resize(`resize.timer`) runs.
|
|
188
|
+
* - **NOTE:** Applies only when `resize.auto` is `true` or `"parent"`.
|
|
189
|
+
* - **Strategy:** How the size is followed is measured, not configured. Two of them are used:
|
|
190
|
+
* - **Redraw**: while a resize redraw fits in one animation frame(16ms), the chart is
|
|
191
|
+
* redrawn on every frame, giving an exact rendering at every size.
|
|
192
|
+
* - **Stretch**: once a redraw misses that budget, the rendering is stretched to the new
|
|
193
|
+
* size for the rest of the resize, and redrawn when the resize settles. Stretching runs
|
|
194
|
+
* no redraw at all: for SVG the `viewBox` is set to the drawn size and the width/height
|
|
195
|
+
* attributes to the new one, and for canvas only the element's CSS box is resized, with
|
|
196
|
+
* the backing store left as is. The size keeps following the container at any data amount.
|
|
197
|
+
* - **Switching:** within a resize the strategy only goes from redraw to stretch, never back,
|
|
198
|
+
* so frames can't alternate between an exact and a stretched rendering. The measured time
|
|
199
|
+
* outlives the resize, so a chart already known to be expensive stretches from the first
|
|
200
|
+
* frame of the next one.
|
|
201
|
+
* - **While stretched:** text and stroke width are scaled with the box(SVG) and the drawn
|
|
202
|
+
* bitmap is upscaled(canvas). Interaction is unaffected, as pointer coordinates are mapped
|
|
203
|
+
* back through the element's transform. The redraw on settle restores the exact rendering.
|
|
204
|
+
* - **Cost:** resize redraws skip the shape data join and the axis tick measurement, so they
|
|
205
|
+
* are far cheaper than an initial render. A 5x1,000 line chart redraws in about 6ms(SVG)
|
|
206
|
+
* and 3ms(canvas), a 10x10,000 one in about 78ms and 53ms. Ordinary charts therefore redraw
|
|
207
|
+
* on every frame, and only the large ones fall back to stretching.
|
|
208
|
+
* - **Several charts on a page:** the budget is measured per chart, and charts don't know
|
|
209
|
+
* about each other. Eight charts of 2,000 points each spend about 75ms per frame together
|
|
210
|
+
* while each one measures about 9ms and keeps redrawing. Turn it on for the charts the user
|
|
211
|
+
* actually watches while resizing, rather than for every chart on a dense page.
|
|
212
|
+
* - `onrendered` is called on every redrawn frame while resizing, not once per resize.
|
|
175
213
|
* @see [Demo: resize "parent"](https://naver.github.io/billboard.js/demo/#ChartOptions.resizeParent)
|
|
176
214
|
* @see [Demo: resize "viewBox"](https://naver.github.io/billboard.js/demo/#ChartOptions.resizeViewBox)
|
|
177
215
|
* @example
|
|
@@ -191,11 +229,15 @@ var main_default = {
|
|
|
191
229
|
* timer: false,
|
|
192
230
|
*
|
|
193
231
|
* // set resize function will be triggered using `setTimeout()` with a delay of `100ms`.
|
|
194
|
-
* timer: 100
|
|
232
|
+
* timer: 100,
|
|
233
|
+
*
|
|
234
|
+
* // follow the container size while resizing
|
|
235
|
+
* live: true
|
|
195
236
|
* }
|
|
196
237
|
*/
|
|
197
238
|
resize_auto: true,
|
|
198
239
|
resize_timer: true,
|
|
240
|
+
resize_live: false,
|
|
199
241
|
/**
|
|
200
242
|
* Set a callback to execute when the chart is clicked.
|
|
201
243
|
* @name onclick
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.1.0
|
|
8
|
+
* @version 4.1.0
|
|
9
9
|
*/
|
|
10
10
|
//#region src/config/Store/State.ts
|
|
11
11
|
/**
|
|
@@ -153,6 +153,9 @@ var State = class {
|
|
|
153
153
|
transiting: false,
|
|
154
154
|
redrawing: false,
|
|
155
155
|
resizing: false,
|
|
156
|
+
resizePreview: false,
|
|
157
|
+
resizeRedrawTime: 0,
|
|
158
|
+
resizeLiveScale: null,
|
|
156
159
|
toggling: false,
|
|
157
160
|
zooming: false,
|
|
158
161
|
hasNegativeValue: false,
|
package/dist-esm/config/const.js
CHANGED