billboard.js 3.7.5 → 3.8.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 +1 -1
- package/dist/billboard.js +468 -268
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +512 -284
- package/dist/billboard.pkgd.min.js +3 -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 +36 -19
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +35 -19
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +32 -18
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +33 -18
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +45 -17
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +80 -35
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +80 -36
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +77 -35
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +133 -69
- 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-esm/billboard.js +349 -213
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +10 -11
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +6 -11
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +7 -12
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -7
- package/package.json +28 -28
- package/src/Chart/api/focus.ts +4 -4
- package/src/Chart/api/grid.ts +206 -0
- package/src/Chart/api/load.ts +31 -21
- package/src/Chart/api/regions.ts +28 -24
- package/src/Chart/api/zoom.ts +18 -3
- package/src/ChartInternal/Axis/Axis.ts +1 -0
- package/src/ChartInternal/Axis/AxisRenderer.ts +7 -2
- package/src/ChartInternal/ChartInternal.ts +1 -1
- package/src/ChartInternal/data/convert.ts +6 -3
- package/src/ChartInternal/data/data.ts +19 -15
- package/src/ChartInternal/data/load.ts +19 -4
- package/src/ChartInternal/interactions/eventrect.ts +3 -2
- package/src/ChartInternal/interactions/subchart.ts +3 -2
- package/src/ChartInternal/interactions/zoom.ts +10 -3
- package/src/ChartInternal/internals/clip.ts +3 -2
- package/src/ChartInternal/internals/domain.ts +17 -8
- package/src/ChartInternal/internals/legend.ts +4 -1
- package/src/ChartInternal/internals/redraw.ts +0 -16
- package/src/ChartInternal/internals/region.ts +9 -9
- package/src/ChartInternal/internals/scale.ts +7 -4
- package/src/ChartInternal/internals/size.axis.ts +14 -4
- package/src/ChartInternal/internals/size.ts +41 -18
- package/src/ChartInternal/internals/transform.ts +1 -1
- package/src/ChartInternal/internals/type.ts +10 -0
- package/src/ChartInternal/shape/point.ts +3 -2
- package/src/Plugin/sparkline/index.ts +9 -1
- package/src/config/Options/axis/x.ts +17 -0
- package/src/config/Options/axis/y.ts +2 -1
- package/src/config/Options/axis/y2.ts +2 -1
- package/src/config/Options/common/main.ts +19 -1
- package/src/config/resolver/axis.ts +2 -4
- package/src/module/browser.ts +13 -5
- package/src/module/generator.ts +3 -3
- package/src/module/util.ts +2 -2
- package/types/axis.d.ts +8 -7
- package/types/chart.d.ts +6 -1
- package/types/options.d.ts +7 -4
- package/src/Chart/api/grid.x.ts +0 -90
- package/src/Chart/api/grid.y.ts +0 -92
package/src/Chart/api/grid.y.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
3
|
-
* billboard.js project is licensed under the MIT license
|
|
4
|
-
*/
|
|
5
|
-
import {extend} from "../../module/util";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Update y grid lines.
|
|
9
|
-
* @function ygrids
|
|
10
|
-
* @instance
|
|
11
|
-
* @memberof Chart
|
|
12
|
-
* @param {Array} grids Y grid lines will be replaced with this argument. The format of this argument is the same as grid.y.lines.
|
|
13
|
-
* @returns {object}
|
|
14
|
-
* @example
|
|
15
|
-
* // Show 2 y grid lines
|
|
16
|
-
* chart.ygrids([
|
|
17
|
-
* {value: 100, text: "Label 1"},
|
|
18
|
-
* {value: 400, text: "Label 4"}
|
|
19
|
-
* ]);
|
|
20
|
-
* // --> Returns: [{value: 100, text: "Label 1"}, {value: 400, text: "Label 4"}]
|
|
21
|
-
*/
|
|
22
|
-
const ygrids = function(grids: {value?: number, text?: string}[]): {
|
|
23
|
-
value?: number, text?: string
|
|
24
|
-
}[] {
|
|
25
|
-
const $$ = this.internal;
|
|
26
|
-
const {config} = $$;
|
|
27
|
-
|
|
28
|
-
if (!grids) {
|
|
29
|
-
return config.grid_y_lines;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
config.grid_y_lines = grids;
|
|
33
|
-
$$.redrawWithoutRescale();
|
|
34
|
-
|
|
35
|
-
return config.grid_y_lines;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
extend(ygrids, {
|
|
39
|
-
/**
|
|
40
|
-
* Add y grid lines.<br>
|
|
41
|
-
* This API adds new y grid lines instead of replacing like ygrids.
|
|
42
|
-
* @function ygrids․add
|
|
43
|
-
* @instance
|
|
44
|
-
* @memberof Chart
|
|
45
|
-
* @param {Array|object} grids New y grid lines will be added. The format of this argument is the same as grid.y.lines and it's possible to give an Object if only one line will be added.
|
|
46
|
-
* @returns {object}
|
|
47
|
-
* @example
|
|
48
|
-
* // Add a new x grid line
|
|
49
|
-
* chart.ygrids.add(
|
|
50
|
-
* {value: 400, text: "Label 4"}
|
|
51
|
-
* );
|
|
52
|
-
*
|
|
53
|
-
* // Add new x grid lines
|
|
54
|
-
* chart.ygrids.add([
|
|
55
|
-
* {value: 200, text: "Label 2"},
|
|
56
|
-
* {value: 400, text: "Label 4"}
|
|
57
|
-
* ]);
|
|
58
|
-
*/
|
|
59
|
-
add: function(grids: {value?: number, text?: string}[]): {value?: number, text?: string}[] {
|
|
60
|
-
return this.ygrids(
|
|
61
|
-
this.internal.config.grid_y_lines
|
|
62
|
-
.concat(grids || [])
|
|
63
|
-
);
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Remove y grid lines.<br>
|
|
68
|
-
* This API removes x grid lines.
|
|
69
|
-
* @function ygrids․remove
|
|
70
|
-
* @instance
|
|
71
|
-
* @memberof Chart
|
|
72
|
-
* @param {object} params This argument should include value or class. If value is given, the y grid lines that have specified y value will be removed. If class is given, the y grid lines that have specified class will be removed. If args is not given, all of y grid lines will be removed.
|
|
73
|
-
* @param {number} [params.value] target value
|
|
74
|
-
* @param {string} [params.class] target class
|
|
75
|
-
* @example
|
|
76
|
-
* // y grid line on y = 200 will be removed
|
|
77
|
-
* chart.ygrids.remove({value: 200});
|
|
78
|
-
*
|
|
79
|
-
* // y grid lines that have 'grid-A' will be removed
|
|
80
|
-
* chart.ygrids.remove({
|
|
81
|
-
* class: "grid-A"
|
|
82
|
-
* });
|
|
83
|
-
*
|
|
84
|
-
* // all of y grid lines will be removed
|
|
85
|
-
* chart.ygrids.remove();
|
|
86
|
-
*/
|
|
87
|
-
remove: function(params?: {value?: number, class?: string}): void { // TODO: multiple
|
|
88
|
-
this.internal.removeGridLines(params, false);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
export default {ygrids};
|