billboard.js 3.11.2 → 3.12.0-next.1
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/README.md +2 -6
- package/dist/billboard.css +5 -1
- package/dist/billboard.js +19431 -24292
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +26 -3
- package/dist/billboard.pkgd.js +22301 -29057
- package/dist/billboard.pkgd.min.js +33 -3
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +77 -175
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -3
- package/dist/plugin/billboardjs-plugin-sparkline.js +423 -1134
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +4 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +660 -1524
- package/dist/plugin/billboardjs-plugin-stanford.min.js +15 -3
- package/dist/plugin/billboardjs-plugin-tableview.js +503 -1175
- package/dist/plugin/billboardjs-plugin-tableview.min.js +30 -3
- package/dist/plugin/billboardjs-plugin-textoverlap.js +351 -1055
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +4 -3
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +339 -1324
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +5 -3
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +1701 -3424
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +7 -3
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2385 -4462
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +18 -3
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +1783 -3467
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +33 -3
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2031 -3979
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +7 -3
- package/dist/theme/dark.css +5 -1
- package/dist/theme/dark.min.css +2 -2
- package/dist/theme/datalab.css +5 -1
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +5 -1
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +5 -1
- package/dist/theme/insight.min.css +2 -2
- package/dist/theme/modern.css +5 -1
- package/dist/theme/modern.min.css +3 -4
- package/dist-esm/billboard.js +9051 -8666
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +19 -25
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +149 -148
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +295 -286
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +235 -234
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +40 -41
- package/package.json +26 -46
- package/src/Chart/api/axis.ts +6 -13
- package/src/Chart/api/chart.ts +12 -11
- package/src/Chart/api/data.ts +8 -7
- package/src/Chart/api/export.ts +28 -21
- package/src/Chart/api/flow.ts +4 -2
- package/src/Chart/api/grid.ts +1 -5
- package/src/Chart/api/load.ts +2 -2
- package/src/Chart/api/regions.ts +29 -5
- package/src/Chart/api/selection.ts +2 -2
- package/src/Chart/api/show.ts +2 -3
- package/src/Chart/api/subchart.ts +2 -2
- package/src/Chart/api/tooltip.ts +5 -7
- package/src/Chart/api/x.ts +2 -2
- package/src/Chart/api/zoom.ts +2 -2
- package/src/ChartInternal/Axis/Axis.ts +119 -44
- package/src/ChartInternal/Axis/AxisRenderer.ts +53 -38
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +2 -2
- package/src/ChartInternal/ChartInternal.ts +79 -51
- package/src/ChartInternal/data/IData.ts +22 -29
- package/src/ChartInternal/data/convert.helper.ts +66 -68
- package/src/ChartInternal/data/convert.ts +11 -11
- package/src/ChartInternal/data/data.ts +40 -23
- package/src/ChartInternal/data/load.ts +7 -6
- package/src/ChartInternal/interactions/drag.ts +2 -1
- package/src/ChartInternal/interactions/eventrect.ts +54 -25
- package/src/ChartInternal/interactions/flow.ts +14 -4
- package/src/ChartInternal/interactions/interaction.ts +34 -12
- package/src/ChartInternal/interactions/subchart.ts +27 -25
- package/src/ChartInternal/interactions/zoom.ts +29 -18
- package/src/ChartInternal/internals/category.ts +1 -1
- package/src/ChartInternal/internals/class.ts +5 -5
- package/src/ChartInternal/internals/clip.ts +9 -10
- package/src/ChartInternal/internals/color.ts +70 -42
- package/src/ChartInternal/internals/domain.ts +59 -28
- package/src/ChartInternal/internals/format.ts +5 -5
- package/src/ChartInternal/internals/grid.ts +130 -47
- package/src/ChartInternal/internals/legend.ts +99 -66
- package/src/ChartInternal/internals/redraw.ts +3 -2
- package/src/ChartInternal/internals/region.ts +5 -3
- package/src/ChartInternal/internals/scale.ts +28 -15
- package/src/ChartInternal/internals/selection.ts +14 -13
- package/src/ChartInternal/internals/size.axis.ts +18 -10
- package/src/ChartInternal/internals/size.ts +97 -66
- package/src/ChartInternal/internals/style.ts +21 -19
- package/src/ChartInternal/internals/text.ts +64 -39
- package/src/ChartInternal/internals/title.ts +2 -2
- package/src/ChartInternal/internals/tooltip.ts +83 -34
- package/src/ChartInternal/internals/transform.ts +2 -2
- package/src/ChartInternal/internals/type.ts +12 -12
- package/src/ChartInternal/shape/arc.ts +78 -44
- package/src/ChartInternal/shape/area.ts +19 -22
- package/src/ChartInternal/shape/bar.ts +41 -31
- package/src/ChartInternal/shape/bubble.ts +5 -5
- package/src/ChartInternal/shape/candlestick.ts +15 -13
- package/src/ChartInternal/shape/gauge.ts +16 -9
- package/src/ChartInternal/shape/line.ts +62 -46
- package/src/ChartInternal/shape/point.common.ts +1 -4
- package/src/ChartInternal/shape/point.ts +52 -32
- package/src/ChartInternal/shape/polar.ts +4 -2
- package/src/ChartInternal/shape/radar.ts +40 -22
- package/src/ChartInternal/shape/shape.ts +84 -58
- package/src/ChartInternal/shape/treemap.ts +29 -20
- package/src/Plugin/bubblecompare/index.ts +1 -3
- package/src/Plugin/sparkline/index.ts +3 -4
- package/src/Plugin/stanford/ColorScale.ts +3 -2
- package/src/Plugin/stanford/Elements.ts +15 -6
- package/src/Plugin/stanford/Options.ts +5 -5
- package/src/Plugin/stanford/index.ts +13 -9
- package/src/Plugin/tableview/Options.ts +1 -1
- package/src/Plugin/tableview/const.ts +1 -4
- package/src/Plugin/tableview/index.ts +11 -9
- package/src/Plugin/textoverlap/index.ts +4 -6
- package/src/config/Options/Options.ts +3 -3
- package/src/config/Options/axis/axis.ts +36 -0
- package/src/config/Options/axis/x.ts +12 -13
- package/src/config/Options/axis/y.ts +13 -13
- package/src/config/Options/axis/y2.ts +23 -10
- package/src/config/Options/common/color.ts +4 -4
- package/src/config/Options/common/grid.ts +4 -4
- package/src/config/Options/common/legend.ts +13 -14
- package/src/config/Options/common/main.ts +23 -23
- package/src/config/Options/common/point.ts +17 -18
- package/src/config/Options/common/title.ts +2 -2
- package/src/config/Options/common/tooltip.ts +13 -11
- package/src/config/Options/data/axis.ts +2 -2
- package/src/config/Options/data/data.ts +45 -45
- package/src/config/Options/interaction/interaction.ts +1 -1
- package/src/config/Options/interaction/subchart.ts +2 -2
- package/src/config/Options/interaction/zoom.ts +9 -9
- package/src/config/Options/shape/arc.ts +10 -13
- package/src/config/Options/shape/area.ts +5 -7
- package/src/config/Options/shape/bar.ts +8 -10
- package/src/config/Options/shape/bubble.ts +1 -1
- package/src/config/Options/shape/candlestick.ts +2 -2
- package/src/config/Options/shape/donut.ts +4 -4
- package/src/config/Options/shape/gauge.ts +6 -6
- package/src/config/Options/shape/line.ts +3 -3
- package/src/config/Options/shape/pie.ts +5 -5
- package/src/config/Options/shape/polar.ts +3 -3
- package/src/config/Options/shape/radar.ts +2 -2
- package/src/config/Options/shape/scatter.ts +1 -1
- package/src/config/Options/shape/treemap.ts +1 -1
- package/src/config/Store/Element.ts +8 -5
- package/src/config/Store/State.ts +19 -13
- package/src/config/classes.ts +6 -4
- package/src/config/config.ts +1 -1
- package/src/config/resolver/axis.ts +4 -4
- package/src/config/resolver/interaction.ts +3 -7
- package/src/config/resolver/shape.ts +11 -12
- package/src/core.ts +2 -3
- package/src/index.esm.ts +2 -6
- package/src/index.ts +2 -2
- package/src/module/Cache.ts +2 -3
- package/src/module/browser.ts +15 -10
- package/src/module/error.ts +9 -8
- package/src/module/generator.ts +3 -5
- package/src/module/util.ts +60 -37
- package/src/module/worker.ts +14 -11
- package/src/scss/billboard.scss +6 -0
- package/src/scss/theme/dark.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/src/scss/theme/modern.scss +6 -0
- package/types/axis.d.ts +7 -0
- package/types/options.d.ts +7 -0
- package/types/options.shape.d.ts +7 -0
package/src/module/util.ts
CHANGED
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
* billboard.js project is licensed under the MIT license
|
|
4
4
|
* @ignore
|
|
5
5
|
*/
|
|
6
|
-
import {pointer as d3Pointer} from "d3-selection";
|
|
7
6
|
import {brushSelection as d3BrushSelection} from "d3-brush";
|
|
7
|
+
import {pointer as d3Pointer} from "d3-selection";
|
|
8
8
|
import type {d3Selection} from "../../types/types";
|
|
9
|
-
import {document,
|
|
9
|
+
import {document, requestAnimationFrame, window} from "./browser";
|
|
10
10
|
|
|
11
11
|
export {
|
|
12
12
|
addCssRules,
|
|
13
13
|
asHalfPixel,
|
|
14
14
|
brushEmpty,
|
|
15
15
|
callFn,
|
|
16
|
-
capitalize,
|
|
17
16
|
camelize,
|
|
17
|
+
capitalize,
|
|
18
18
|
ceil10,
|
|
19
19
|
convertInputType,
|
|
20
20
|
deepClone,
|
|
21
21
|
diffDomain,
|
|
22
|
-
endall,
|
|
23
22
|
emulateEvent,
|
|
23
|
+
endall,
|
|
24
24
|
extend,
|
|
25
25
|
findIndex,
|
|
26
|
-
getBrushSelection,
|
|
27
26
|
getBoundingRect,
|
|
27
|
+
getBrushSelection,
|
|
28
28
|
getCssRules,
|
|
29
29
|
getMinMax,
|
|
30
30
|
getOption,
|
|
@@ -62,7 +62,7 @@ export {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
const isValue = (v: any): boolean => v || v === 0;
|
|
65
|
-
const isFunction = (v: unknown): v is (
|
|
65
|
+
const isFunction = (v: unknown): v is (...args: any[]) => any => typeof v === "function";
|
|
66
66
|
const isString = (v: unknown): v is string => typeof v === "string";
|
|
67
67
|
const isNumber = (v: unknown): v is number => typeof v === "number";
|
|
68
68
|
const isUndefined = (v: unknown): v is undefined => typeof v === "undefined";
|
|
@@ -171,7 +171,8 @@ function endall(transition, cb: Function): void {
|
|
|
171
171
|
*/
|
|
172
172
|
function sanitize(str: string): string {
|
|
173
173
|
return isString(str) ?
|
|
174
|
-
str.replace(/<(script|img)?/ig, "<").replace(/(script)?>/ig, ">") :
|
|
174
|
+
str.replace(/<(script|img)?/ig, "<").replace(/(script)?>/ig, ">") :
|
|
175
|
+
str;
|
|
175
176
|
}
|
|
176
177
|
|
|
177
178
|
/**
|
|
@@ -227,7 +228,7 @@ function getRectSegList(path: SVGGraphicsElement): {x: number, y: number}[] {
|
|
|
227
228
|
* | |
|
|
228
229
|
* | |
|
|
229
230
|
* seg0 ---------- seg3
|
|
230
|
-
|
|
231
|
+
*/
|
|
231
232
|
const {x, y, width, height} = path.getBBox();
|
|
232
233
|
|
|
233
234
|
return [
|
|
@@ -253,11 +254,13 @@ function getPathBox(
|
|
|
253
254
|
const y = Math.min(items[0].y, items[1].y);
|
|
254
255
|
|
|
255
256
|
return {
|
|
256
|
-
x,
|
|
257
|
+
x,
|
|
258
|
+
y,
|
|
259
|
+
width,
|
|
260
|
+
height
|
|
257
261
|
};
|
|
258
262
|
}
|
|
259
263
|
|
|
260
|
-
|
|
261
264
|
/**
|
|
262
265
|
* Get event's current position coordinates
|
|
263
266
|
* @param {object} event Event object
|
|
@@ -266,7 +269,8 @@ function getPathBox(
|
|
|
266
269
|
* @private
|
|
267
270
|
*/
|
|
268
271
|
function getPointer(event, element?: Element): number[] {
|
|
269
|
-
const touches = event &&
|
|
272
|
+
const touches = event &&
|
|
273
|
+
(event.touches || (event.sourceEvent && event.sourceEvent.touches))?.[0];
|
|
270
274
|
let pointer = [0, 0];
|
|
271
275
|
|
|
272
276
|
try {
|
|
@@ -290,7 +294,7 @@ function getBrushSelection(ctx) {
|
|
|
290
294
|
// check from event
|
|
291
295
|
if (event && event.type === "brush") {
|
|
292
296
|
selection = event.selection;
|
|
293
|
-
|
|
297
|
+
// check from brush area selection
|
|
294
298
|
} else if (main && (selection = main.select(".bb-brush").node())) {
|
|
295
299
|
selection = d3BrushSelection(selection);
|
|
296
300
|
}
|
|
@@ -305,16 +309,24 @@ function getBrushSelection(ctx) {
|
|
|
305
309
|
* @returns {object}
|
|
306
310
|
* @private
|
|
307
311
|
*/
|
|
308
|
-
function getBoundingRect(
|
|
309
|
-
|
|
310
|
-
|
|
312
|
+
function getBoundingRect(
|
|
313
|
+
node
|
|
314
|
+
): {
|
|
315
|
+
left: number,
|
|
316
|
+
top: number,
|
|
317
|
+
right: number,
|
|
318
|
+
bottom: number,
|
|
319
|
+
x: number,
|
|
320
|
+
y: number,
|
|
321
|
+
width: number,
|
|
322
|
+
height: number
|
|
311
323
|
} {
|
|
312
324
|
const needEvaluate = !("rect" in node) || (
|
|
313
|
-
"rect" in node && node.hasAttribute("width") &&
|
|
325
|
+
"rect" in node && node.hasAttribute("width") &&
|
|
326
|
+
node.rect.width !== +node.getAttribute("width")
|
|
314
327
|
);
|
|
315
328
|
|
|
316
|
-
return needEvaluate ?
|
|
317
|
-
(node.rect = node.getBoundingClientRect()) : node.rect;
|
|
329
|
+
return needEvaluate ? (node.rect = node.getBoundingClientRect()) : node.rect;
|
|
318
330
|
}
|
|
319
331
|
|
|
320
332
|
/**
|
|
@@ -444,7 +456,6 @@ function extend(target = {}, source): object {
|
|
|
444
456
|
*/
|
|
445
457
|
const capitalize = (str: string): string => str.charAt(0).toUpperCase() + str.slice(1);
|
|
446
458
|
|
|
447
|
-
|
|
448
459
|
/**
|
|
449
460
|
* Camelize from kebob style string
|
|
450
461
|
* @param {string} str Target string
|
|
@@ -478,9 +489,10 @@ const toArray = (v: CSSStyleDeclaration | any): any => [].slice.call(v);
|
|
|
478
489
|
*/
|
|
479
490
|
function addCssRules(style, selector: string, prop: string[]): number {
|
|
480
491
|
const {rootSelector = "", sheet} = style;
|
|
481
|
-
const getSelector = s =>
|
|
482
|
-
|
|
483
|
-
|
|
492
|
+
const getSelector = s =>
|
|
493
|
+
s
|
|
494
|
+
.replace(/\s?(bb-)/g, ".$1")
|
|
495
|
+
.replace(/\.+/g, ".");
|
|
484
496
|
|
|
485
497
|
const rule = `${rootSelector} ${getSelector(selector)} {${prop.join(";")}}`;
|
|
486
498
|
|
|
@@ -586,8 +598,7 @@ function mergeObj(target: object, ...objectN): any {
|
|
|
586
598
|
!target[key] && (target[key] = {});
|
|
587
599
|
target[key] = mergeObj(target[key], value);
|
|
588
600
|
} else {
|
|
589
|
-
target[key] = isArray(value) ?
|
|
590
|
-
value.concat() : value;
|
|
601
|
+
target[key] = isArray(value) ? value.concat() : value;
|
|
591
602
|
}
|
|
592
603
|
});
|
|
593
604
|
}
|
|
@@ -625,7 +636,8 @@ function sortValue(data: any[], isAsc = true): any[] {
|
|
|
625
636
|
* @returns {number|Date|undefined}
|
|
626
637
|
* @private
|
|
627
638
|
*/
|
|
628
|
-
function getMinMax(type: "min" | "max", data: number[] | Date[] | any): number | Date | undefined
|
|
639
|
+
function getMinMax(type: "min" | "max", data: number[] | Date[] | any): number | Date | undefined
|
|
640
|
+
| any {
|
|
629
641
|
let res = data.filter(v => notEmpty(v));
|
|
630
642
|
|
|
631
643
|
if (res.length) {
|
|
@@ -664,7 +676,12 @@ const getRange = (start: number, end: number, step = 1): number[] => {
|
|
|
664
676
|
const emulateEvent = {
|
|
665
677
|
mouse: (() => {
|
|
666
678
|
const getParams = () => ({
|
|
667
|
-
bubbles: false,
|
|
679
|
+
bubbles: false,
|
|
680
|
+
cancelable: false,
|
|
681
|
+
screenX: 0,
|
|
682
|
+
screenY: 0,
|
|
683
|
+
clientX: 0,
|
|
684
|
+
clientY: 0
|
|
668
685
|
});
|
|
669
686
|
|
|
670
687
|
try {
|
|
@@ -686,9 +703,16 @@ const emulateEvent = {
|
|
|
686
703
|
params.cancelable,
|
|
687
704
|
window,
|
|
688
705
|
0, // the event's mouse click count
|
|
689
|
-
params.screenX,
|
|
690
|
-
params.
|
|
691
|
-
|
|
706
|
+
params.screenX,
|
|
707
|
+
params.screenY,
|
|
708
|
+
params.clientX,
|
|
709
|
+
params.clientY,
|
|
710
|
+
false,
|
|
711
|
+
false,
|
|
712
|
+
false,
|
|
713
|
+
false,
|
|
714
|
+
0,
|
|
715
|
+
null
|
|
692
716
|
);
|
|
693
717
|
|
|
694
718
|
el.dispatchEvent(mouseEvent);
|
|
@@ -788,9 +812,11 @@ function convertInputType(mouse: boolean, touch: boolean): "mouse" | "touch" | n
|
|
|
788
812
|
if (navigator && "maxTouchPoints" in navigator) {
|
|
789
813
|
hasTouch = navigator.maxTouchPoints > 0;
|
|
790
814
|
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
} else if (
|
|
815
|
+
// Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
|
|
816
|
+
// On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
|
|
817
|
+
} else if (
|
|
818
|
+
"ontouchmove" in window || (DocumentTouch && document instanceof DocumentTouch)
|
|
819
|
+
) {
|
|
794
820
|
hasTouch = true;
|
|
795
821
|
} else {
|
|
796
822
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
|
|
@@ -800,10 +826,8 @@ function convertInputType(mouse: boolean, touch: boolean): "mouse" | "touch" | n
|
|
|
800
826
|
// Only as a last resort, fall back to user agent sniffing
|
|
801
827
|
const UA = navigator.userAgent;
|
|
802
828
|
|
|
803
|
-
hasTouch = (
|
|
804
|
-
/\b(
|
|
805
|
-
/\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA)
|
|
806
|
-
);
|
|
829
|
+
hasTouch = /\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(UA) ||
|
|
830
|
+
/\b(Android|Windows Phone|iPad|iPod)\b/i.test(UA);
|
|
807
831
|
}
|
|
808
832
|
}
|
|
809
833
|
}
|
|
@@ -831,4 +855,3 @@ function runUntil(fn: Function, conditionFn: Function): void {
|
|
|
831
855
|
fn();
|
|
832
856
|
}
|
|
833
857
|
}
|
|
834
|
-
|
package/src/module/worker.ts
CHANGED
|
@@ -62,22 +62,25 @@ function getWorker(src) {
|
|
|
62
62
|
* @returns {object}
|
|
63
63
|
* @example
|
|
64
64
|
* const worker = runWorker(function(arg) {
|
|
65
|
-
*
|
|
66
|
-
*
|
|
65
|
+
* // do some tasks...
|
|
66
|
+
* console.log("param:", A(arg));
|
|
67
67
|
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
68
|
+
* return 1234;
|
|
69
|
+
* }, function(data) {
|
|
70
|
+
* // callback after worker is done
|
|
71
|
+
* console.log("result:", data);
|
|
72
|
+
* },
|
|
73
|
+
* [function A(){}]
|
|
74
|
+
* );
|
|
75
75
|
*
|
|
76
|
-
*
|
|
76
|
+
* worker(11111);
|
|
77
77
|
* @private
|
|
78
78
|
*/
|
|
79
79
|
export function runWorker(
|
|
80
|
-
useWorker = true,
|
|
80
|
+
useWorker = true,
|
|
81
|
+
fn: Function,
|
|
82
|
+
callback: Function,
|
|
83
|
+
depsFn?: Function[]
|
|
81
84
|
): Function {
|
|
82
85
|
let runFn = function(...args) {
|
|
83
86
|
const res = fn(...args);
|
package/src/scss/billboard.scss
CHANGED
package/src/scss/theme/dark.scss
CHANGED
|
@@ -48,6 +48,12 @@ $font-family: Helvetica, Arial, sans-serif, "nanumgothic", "Dotum";
|
|
|
48
48
|
/*-- Axis --*/
|
|
49
49
|
.bb-axis {
|
|
50
50
|
shape-rendering: crispEdges;
|
|
51
|
+
|
|
52
|
+
.bb-axis-x-tooltip, .bb-axis-y-tooltip, .bb-axis-y2-tooltip {
|
|
53
|
+
font-size: 0.9em;
|
|
54
|
+
fill: #fff;
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
}
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
.bb-axis-y text, .bb-axis-y2 text {
|
|
@@ -43,6 +43,12 @@ $text-font-size: 11px;
|
|
|
43
43
|
/*-- Axis --*/
|
|
44
44
|
.bb-axis {
|
|
45
45
|
stroke-width: $line-stroke-widdth;
|
|
46
|
+
|
|
47
|
+
.bb-axis-x-tooltip, .bb-axis-y-tooltip, .bb-axis-y2-tooltip {
|
|
48
|
+
font-size: 0.9em;
|
|
49
|
+
fill: #fff;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
}
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
.bb-axis-y text, .bb-axis-y2 text {
|
|
@@ -51,6 +51,12 @@ $axis-color: #8c8c8c;
|
|
|
51
51
|
/*-- Axis --*/
|
|
52
52
|
.bb-axis {
|
|
53
53
|
shape-rendering: crispEdges;
|
|
54
|
+
|
|
55
|
+
.bb-axis-x-tooltip, .bb-axis-y-tooltip, .bb-axis-y2-tooltip {
|
|
56
|
+
font-size: 0.9em;
|
|
57
|
+
fill: #fff;
|
|
58
|
+
white-space: nowrap;
|
|
59
|
+
}
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
.bb-axis-y text, .bb-axis-y2 text {
|
|
@@ -46,6 +46,12 @@ $font-family: sans-serif, Arial, "nanumgothic", "Dotum";
|
|
|
46
46
|
/*-- Axis --*/
|
|
47
47
|
.bb-axis {
|
|
48
48
|
shape-rendering: crispEdges;
|
|
49
|
+
|
|
50
|
+
.bb-axis-x-tooltip, .bb-axis-y-tooltip, .bb-axis-y2-tooltip {
|
|
51
|
+
font-size: 0.9em;
|
|
52
|
+
fill: #fff;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
}
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
.bb-axis-y text, .bb-axis-y2 text {
|
|
@@ -49,6 +49,12 @@ $button-bg: #404244;
|
|
|
49
49
|
/*-- Axis --*/
|
|
50
50
|
.bb-axis {
|
|
51
51
|
shape-rendering: crispEdges;
|
|
52
|
+
|
|
53
|
+
.bb-axis-x-tooltip, .bb-axis-y-tooltip, .bb-axis-y2-tooltip {
|
|
54
|
+
font-size: 0.9em;
|
|
55
|
+
fill: #fff;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
.bb-axis-y text, .bb-axis-y2 text {
|
package/types/axis.d.ts
CHANGED
|
@@ -9,6 +9,13 @@ export interface Axis {
|
|
|
9
9
|
* Switch x and y axis position.
|
|
10
10
|
*/
|
|
11
11
|
rotated?: boolean;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Set axis tooltip.
|
|
15
|
+
*/
|
|
16
|
+
tooltip?: boolean | {
|
|
17
|
+
backgroundColor?: string | {x?: string; y?: string; y2?: string}
|
|
18
|
+
};
|
|
12
19
|
x?: xAxisConfiguration;
|
|
13
20
|
y?: yAxisConfiguration;
|
|
14
21
|
y2?: yAxisConfigurationBase;
|
package/types/options.d.ts
CHANGED
|
@@ -408,6 +408,13 @@ export interface RegionOptions {
|
|
|
408
408
|
start?: string | number | Date;
|
|
409
409
|
end?: string | number | Date;
|
|
410
410
|
class?: string;
|
|
411
|
+
label?: {
|
|
412
|
+
text?: string;
|
|
413
|
+
x?: number;
|
|
414
|
+
y?: number;
|
|
415
|
+
color?: string;
|
|
416
|
+
rotated?: boolean;
|
|
417
|
+
}
|
|
411
418
|
}
|
|
412
419
|
|
|
413
420
|
export interface LegendOptions {
|
package/types/options.shape.d.ts
CHANGED
|
@@ -37,6 +37,13 @@ export interface ArcOptions {
|
|
|
37
37
|
*/
|
|
38
38
|
path?: string;
|
|
39
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Set needle value.
|
|
42
|
+
* - **NOTE:**
|
|
43
|
+
* - For single gauge chart, needle will point the data value by default, otherwise will point 0(zero).
|
|
44
|
+
*/
|
|
45
|
+
value?: number;
|
|
46
|
+
|
|
40
47
|
/**
|
|
41
48
|
* Set needle value.
|
|
42
49
|
* - **NOTE:**
|