billboard.js 3.6.3 → 3.7.0-next.2
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 +6 -1
- package/dist/billboard.js +1704 -843
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +3819 -2263
- package/dist/billboard.pkgd.min.js +6 -3
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +62 -23
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +62 -23
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +48 -14
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +48 -14
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +1087 -1031
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +1171 -1112
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +1222 -1169
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +1159 -1105
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +1365 -1319
- package/dist/theme/datalab.css +6 -1
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +6 -1
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +6 -1
- package/dist/theme/insight.min.css +2 -2
- package/dist-esm/billboard.js +942 -277
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -5
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +10 -9
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +10 -9
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -8
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +3 -5
- package/package.json +44 -38
- package/src/Chart/api/chart.ts +13 -4
- package/src/Chart/api/export.ts +159 -14
- package/src/Chart/api/legend.ts +1 -0
- package/src/Chart/api/load.ts +1 -0
- package/src/Chart/api/tooltip.ts +11 -2
- package/src/ChartInternal/Axis/Axis.ts +1 -1
- package/src/ChartInternal/ChartInternal.ts +35 -25
- package/src/ChartInternal/data/IData.ts +9 -0
- package/src/ChartInternal/data/convert.helper.ts +35 -21
- package/src/ChartInternal/data/data.ts +26 -5
- package/src/ChartInternal/data/load.ts +3 -0
- package/src/ChartInternal/interactions/interaction.ts +42 -33
- package/src/ChartInternal/internals/class.ts +3 -4
- package/src/ChartInternal/internals/clip.ts +13 -10
- package/src/ChartInternal/internals/domain.ts +11 -4
- package/src/ChartInternal/internals/format.ts +1 -1
- package/src/ChartInternal/internals/grid.ts +1 -1
- package/src/ChartInternal/internals/legend.ts +3 -2
- package/src/ChartInternal/internals/redraw.ts +12 -5
- package/src/ChartInternal/internals/scale.ts +7 -2
- package/src/ChartInternal/internals/size.ts +41 -26
- package/src/ChartInternal/internals/text.ts +60 -32
- package/src/ChartInternal/internals/tooltip.ts +12 -8
- package/src/ChartInternal/internals/transform.ts +2 -2
- package/src/ChartInternal/internals/type.ts +6 -1
- package/src/ChartInternal/shape/arc.ts +145 -68
- package/src/ChartInternal/shape/area.ts +3 -0
- package/src/ChartInternal/shape/bar.ts +4 -1
- package/src/ChartInternal/shape/line.ts +12 -15
- package/src/ChartInternal/shape/radar.ts +2 -2
- package/src/ChartInternal/shape/shape.ts +10 -5
- package/src/ChartInternal/shape/treemap.ts +293 -0
- package/src/config/Options/common/tooltip.ts +11 -8
- package/src/config/Options/data/data.ts +6 -3
- package/src/config/Options/shape/arc.ts +47 -0
- package/src/config/Options/shape/gauge.ts +2 -2
- package/src/config/Options/shape/pie.ts +1 -1
- package/src/config/Options/shape/polar.ts +1 -1
- package/src/config/Options/shape/radar.ts +1 -1
- package/src/config/Options/shape/spline.ts +1 -1
- package/src/config/Options/shape/treemap.ts +53 -0
- package/src/config/Store/State.ts +1 -0
- package/src/config/classes.ts +7 -0
- package/src/config/const.ts +4 -2
- package/src/config/resolver/shape.ts +22 -5
- package/src/index.esm.ts +2 -1
- package/src/module/util.ts +1 -1
- package/src/scss/billboard.scss +6 -0
- package/src/scss/theme/datalab.scss +6 -0
- package/src/scss/theme/graph.scss +6 -0
- package/src/scss/theme/insight.scss +6 -0
- package/types/bb.d.ts +1 -0
- package/types/chart.d.ts +7 -0
- package/types/index.d.ts +1 -0
- package/types/options.d.ts +42 -624
- package/types/options.shape.d.ts +664 -0
- package/types/types.d.ts +4 -3
|
@@ -26,6 +26,7 @@ import shapeLine from "../../ChartInternal/shape/line";
|
|
|
26
26
|
import shapePoint from "../../ChartInternal/shape/point";
|
|
27
27
|
import shapePolar from "../../ChartInternal/shape/polar";
|
|
28
28
|
import shapeRadar from "../../ChartInternal/shape/radar";
|
|
29
|
+
import shapeTreemap from "../../ChartInternal/shape/treemap";
|
|
29
30
|
|
|
30
31
|
// Options
|
|
31
32
|
import optPoint from "../Options/common/point";
|
|
@@ -38,11 +39,13 @@ import optScatter from "../Options/shape/scatter";
|
|
|
38
39
|
import optSpline from "../Options/shape/spline";
|
|
39
40
|
|
|
40
41
|
// Non-Axis based
|
|
42
|
+
import optArc from "../Options/shape/arc";
|
|
41
43
|
import optDonut from "../Options/shape/donut";
|
|
42
44
|
import optGauge from "../Options/shape/gauge";
|
|
43
45
|
import optPie from "../Options/shape/pie";
|
|
44
46
|
import optPolar from "../Options/shape/polar";
|
|
45
47
|
import optRadar from "../Options/shape/radar";
|
|
48
|
+
import optTreemap from "../Options/shape/treemap";
|
|
46
49
|
|
|
47
50
|
export {
|
|
48
51
|
area,
|
|
@@ -61,7 +64,8 @@ export {
|
|
|
61
64
|
radar,
|
|
62
65
|
scatter,
|
|
63
66
|
spline,
|
|
64
|
-
step
|
|
67
|
+
step,
|
|
68
|
+
treemap
|
|
65
69
|
};
|
|
66
70
|
|
|
67
71
|
/**
|
|
@@ -121,10 +125,18 @@ let spline = (): string => (extendLine(undefined, [optSpline]), (spline = () =>
|
|
|
121
125
|
let step = (): string => (extendLine(), (step = () => TYPE.STEP)());
|
|
122
126
|
|
|
123
127
|
// Arc types
|
|
124
|
-
let donut = (): string => (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
let
|
|
128
|
+
let donut = (): string => (
|
|
129
|
+
extendArc(undefined, [optArc, optDonut]), (donut = () => TYPE.DONUT)()
|
|
130
|
+
);
|
|
131
|
+
let gauge = (): string => (
|
|
132
|
+
extendArc([shapeGauge], [optArc, optGauge]), (gauge = () => TYPE.GAUGE)()
|
|
133
|
+
);
|
|
134
|
+
let pie = (): string => (
|
|
135
|
+
extendArc(undefined, [optArc, optPie]), (pie = () => TYPE.PIE)()
|
|
136
|
+
);
|
|
137
|
+
let polar = (): string => (
|
|
138
|
+
extendArc([shapePolar], [optArc, optPolar]), (polar = () => TYPE.POLAR)()
|
|
139
|
+
);
|
|
128
140
|
let radar = (): string => (
|
|
129
141
|
extendArc([shapePoint, shapeRadar], [optPoint, optRadar]), (radar = () => TYPE.RADAR)()
|
|
130
142
|
);
|
|
@@ -140,3 +152,8 @@ let candlestick = (): string => (
|
|
|
140
152
|
let scatter = (): string => (
|
|
141
153
|
extendAxis([shapePoint], [optPoint, optScatter]), (scatter = () => TYPE.SCATTER)()
|
|
142
154
|
);
|
|
155
|
+
|
|
156
|
+
// Non Axis based types
|
|
157
|
+
let treemap = (): string => (
|
|
158
|
+
extendAxis([shapeTreemap], [optTreemap]), (treemap = () => TYPE.TREEMAP)()
|
|
159
|
+
);
|
package/src/index.esm.ts
CHANGED
package/src/module/util.ts
CHANGED
|
@@ -497,7 +497,7 @@ function getCssRules(styleSheets: any[]) {
|
|
|
497
497
|
rules = rules.concat(toArray(sheet.cssRules));
|
|
498
498
|
}
|
|
499
499
|
} catch (e) {
|
|
500
|
-
console
|
|
500
|
+
window.console?.warn(`Error while reading rules from ${sheet.href}: ${e.toString()}`);
|
|
501
501
|
}
|
|
502
502
|
});
|
|
503
503
|
|
package/src/scss/billboard.scss
CHANGED
package/types/bb.d.ts
CHANGED
package/types/chart.d.ts
CHANGED
|
@@ -504,6 +504,12 @@ export interface Chart {
|
|
|
504
504
|
* @param [option.width={currentWidth}] width
|
|
505
505
|
* @param [option.height={currentHeigth}] height
|
|
506
506
|
* @param [option.preserveAspectRatio=true] Preserve aspect ratio on given size
|
|
507
|
+
* @param [option.preserveFontStyle=false] Preserve font style(font-family).
|
|
508
|
+
* **NOTE:**
|
|
509
|
+
* - This option is useful when outlink web font style's `font-family` are applied to chart's text element.
|
|
510
|
+
* - Text element's position(especially "transformed") can't be preserved correctly according the page's layout condition.
|
|
511
|
+
* - If need to preserve accurate text position, embed the web font data within to the page and set `preserveFontStyle=false`.
|
|
512
|
+
* - Checkout the embed example: https://stackblitz.com/edit/zfbya9-8nf9nn?file=index.html
|
|
507
513
|
* @param callback The callback to be invoked when export is ready.
|
|
508
514
|
*/
|
|
509
515
|
export(this: Chart, option?: {
|
|
@@ -511,6 +517,7 @@ export interface Chart {
|
|
|
511
517
|
height?: number;
|
|
512
518
|
mimeType?: string;
|
|
513
519
|
preserveAspectRatio?: boolean;
|
|
520
|
+
preserveFontStyle?: boolean;
|
|
514
521
|
}, callback?: (this: Chart, dataUrl: string) => void): string;
|
|
515
522
|
|
|
516
523
|
/**
|