billboard.js 3.9.0-next.2 → 3.9.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 +5 -1
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +156 -98
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +396 -207
- package/dist/billboard.pkgd.min.js +2 -2
- 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 +3 -3
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +3 -3
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +242 -111
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +243 -112
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +242 -111
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +243 -112
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +242 -111
- 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-esm/billboard.js +157 -93
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +3 -3
- package/package.json +23 -23
- package/src/ChartInternal/data/data.ts +2 -12
- package/src/ChartInternal/interactions/eventrect.ts +7 -4
- package/src/ChartInternal/internals/legend.ts +50 -34
- package/src/ChartInternal/internals/tooltip.ts +55 -41
- package/src/ChartInternal/shape/point.ts +20 -2
- package/src/config/Options/common/legend.ts +37 -6
- package/types/options.d.ts +25 -0
package/dist/theme/dark.css
CHANGED
package/dist/theme/dark.min.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.9.
|
|
8
|
+
* @version 3.9.1
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#4a7fff;#b02c2c;#1ca46c;#b47300;#49baf3;#ed7e13;#cfaa00;#a6cd19;#dccb52;#f5d194;)}.bb svg{font-family:Helvetica,Arial,sans-serif,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#8d9cab}.bb .bb-button,.bb text{fill:#8d9cab;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-legend-item-title,.bb-line,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#8d9cab}.bb-axis{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#8d9cab}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#5c666e}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ccd9e6}.bb-text.bb-empty{fill:#8d9cab}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:2px;stroke:8d9cab}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.selection{stroke:none;fill:#ccd9e6}.bb-selected-circle{fill:#ccd9e6;stroke-width:2px}.bb-bar{stroke-width:.5px}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.5!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.5}.bb-region.selected rect{fill:#27c903}.bb-zoom-brush{fill-opacity:.25;fill:#ccd9e6}.bb-brush .extent{fill-opacity:.5}.bb-legend-item{user-select:none}.bb-legend-item line{stroke-width:10px;stroke-dasharray:3px}.bb-legend-item text{transform:translateY(-1px)}.bb-legend-item-hidden{opacity:.5}.bb-legend-background{stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#8d9cab;stroke-width:1px}.bb-tooltip-container{font-family:Helvetica,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#000;border:1px solid #828181;border-collapse:separate;border-radius:5px;border-spacing:0;color:#fff;empty-cells:show;font-size:11px;text-align:left;white-space:nowrap}.bb-tooltip th{border-bottom:1px solid #828181;font-size:12px;padding:4px 8px;text-align:left}.bb-tooltip td{padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:7px;margin:-1px 6px 0 0;vertical-align:middle;width:7px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:12px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.5}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#3f3f3f;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#828181;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#b6c2ce;font-size:16px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#b6c2ce}.bb-chart-arc rect{stroke:#8d9cab;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#000;border:1px solid #ccc;border-radius:5px;color:#fff;cursor:pointer;padding:5px}
|
package/dist/theme/datalab.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.9.
|
|
8
|
+
* @version 3.9.1
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#2ac4b3;#feaf29;#ff617b;#73a2ef;#b180d0;#3064cf;#d0a45f;#8aaec7;#ef65a2;#8aaec7;)}.bb svg{font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;font-size:11px;line-height:1}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-font-smoothing:antialiased;fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-chart-arcs .bb-needle{fill:#000}.bb-axis{stroke-width:.7px}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:.7px}.bb-circle{fill:#fff!important}.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:1px}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item line.bb-legend-item-tile{stroke-linecap:round;stroke-width:8px;stroke-dasharray:1 20;transform:translate(7px,1px)}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#000;stroke-width:1px}.bb-tooltip-container{font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{-webkit-font-smoothing:antialiased;background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;empty-cells:show;font-size:11px;text-align:left;white-space:nowrap}.bb-tooltip th{background-color:#0b00b1;border-bottom:2px solid #ff2d2d;color:#fffdfd;font-size:13px;padding:2px 8px;text-align:left}.bb-tooltip td{padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border:1px solid #000;border-radius:3px;display:inline-block;height:8px;margin-right:6px;vertical-align:middle;width:8px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:11px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:18px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:18px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-line{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value{fill:#3b6969}.bb-chart-arc path{stroke:#000;stroke-width:.5px}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:14px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:.7px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px}
|
package/dist/theme/graph.css
CHANGED
package/dist/theme/graph.min.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.9.
|
|
8
|
+
* @version 3.9.1
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#65CFC2;#D0A45F;#64A4F5;#EF65A2;#A377FE;#8AAEC7;#FF7E5A;#898EFE;#FFAC35;#70B0FF;)}.bb svg{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#8c8c8c}.bb .bb-button,.bb text{fill:#555;font-size:12px;letter-spacing:-.3px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-axis{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#8c8c8c}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ffb6b6;stroke-dasharray:3px}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_,rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:2px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1px;opacity:.75}.bb-legend-item line{stroke-dasharray:1px}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-radius:2px;border-spacing:0;box-shadow:.5px .5px 1px #999;empty-cells:show;font-size:12px;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.bb-tooltip th{background-color:#efefef;border-bottom:1px dotted #000;color:#000;font-size:12px;padding:4px 8px;text-align:center}.bb-tooltip tr:last-child td{border-bottom:none}.bb-tooltip td{background-color:#fff;border-bottom:1px solid #eee;padding:3px 6px}.bb-tooltip td:first-child{border-right:1px solid #eee;padding-left:5px}.bb-tooltip td:last-child{padding-right:5px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:12px;margin-right:6px;vertical-align:middle;width:5px}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:1px;font-size:12px}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#8c8c8c;font-size:16px!important;font-style:italic}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#8c8c8c;font-style:italic}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px;font-weight:700}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#8c8c8c}.bb-chart-radars .bb-axis line{stroke:#8c8c8c;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em;font-weight:700}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;box-shadow:1px 1px 2px #ccc;cursor:pointer;opacity:.8;padding:5px}
|
package/dist/theme/insight.css
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.9.
|
|
8
|
+
* @version 3.9.1
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-family:sans-serif,Arial,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#c4c4c4}.bb .bb-button,.bb text{fill:#555;font-size:11px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-axis{shape-rendering:crispEdges}.bb-axis-y text,.bb-axis-y2 text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid{pointer-events:none}.bb-grid line{stroke:#f1f1f1}.bb-xgrid-focus line,.bb-ygrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{fill:#fff!important;stroke-width:2px;stroke:red}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{font-family:sans-serif,Arial,nanumgothic,Dotum;user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-spacing:0;empty-cells:show;font-size:11px;text-align:left;white-space:nowrap}.bb-tooltip th{border-bottom:1px solid #eee;font-size:12px;padding:4px 8px;text-align:left}.bb-tooltip td{background-color:#fff;padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border-radius:5px;display:inline-block;height:10px;margin-right:6px;vertical-align:middle;width:10px}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:12px;font-weight:800;padding-left:5px}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:16px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px}
|
package/dist-esm/billboard.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 3.9.
|
|
8
|
+
* @version 3.9.1
|
|
9
9
|
*/
|
|
10
10
|
import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
|
|
11
11
|
import { pointer, select, namespaces, selectAll } from 'd3-selection';
|
|
@@ -156,7 +156,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
156
156
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
157
157
|
PERFORMANCE OF THIS SOFTWARE.
|
|
158
158
|
***************************************************************************** */
|
|
159
|
-
/* global Reflect, Promise */
|
|
159
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
160
160
|
|
|
161
161
|
var _assign = function __assign() {
|
|
162
162
|
_assign = Object.assign || function (t) {
|
|
@@ -177,6 +177,10 @@ function __spreadArray(to, from, pack) {
|
|
|
177
177
|
}
|
|
178
178
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
179
179
|
}
|
|
180
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
181
|
+
var e = new Error(message);
|
|
182
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
183
|
+
};
|
|
180
184
|
|
|
181
185
|
var isValue = function (v) { return v || v === 0; };
|
|
182
186
|
var isFunction = function (v) { return typeof v === "function"; };
|
|
@@ -2723,17 +2727,34 @@ var legend$2 = {
|
|
|
2723
2727
|
* - defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).
|
|
2724
2728
|
* @property {boolean} [legend.equally=false] Set to all items have same width size.
|
|
2725
2729
|
* @property {number} [legend.padding=0] Set padding value
|
|
2730
|
+
* @property {boolean} [legend.item.interaction=true] Set legend item interaction.
|
|
2731
|
+
* - **NOTE:**
|
|
2732
|
+
* - This setting will not have effect on `.toggle()` method.
|
|
2733
|
+
* - `legend.item.onXXX` listener options will work if set, regardless of this option value.
|
|
2734
|
+
* @property {boolean} [legend.item.interaction.dblclick=false] Set legend item to interact on double click.
|
|
2735
|
+
* - **NOTE:**
|
|
2736
|
+
* - Double clicking will make focused clicked dataseries only, hiding all others.
|
|
2737
|
+
* - for single click case, `click + altKey(Win)/optionKey(Mac OS)` to have same effect.
|
|
2738
|
+
* - To return initial state(which all dataseries are showing), double click current focused legend item again.
|
|
2739
|
+
* - for single click case, `click + altKey(Win)/optionKey(Mac OS)` to have same effect.
|
|
2740
|
+
* - In this case, default `click` interaction will be disabled.
|
|
2726
2741
|
* @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item.
|
|
2742
|
+
* - **NOTE:**
|
|
2743
|
+
* - When set, default `click` interaction will be disabled.
|
|
2744
|
+
* - When `interaction.dblclick=true` is set, will be called on double click.
|
|
2727
2745
|
* @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.
|
|
2746
|
+
* - **NOTE:** When set, default `mouseover` interaction will be disabled.
|
|
2728
2747
|
* @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.
|
|
2748
|
+
* - **NOTE:** When set, default `mouseout` interaction will be disabled.
|
|
2729
2749
|
* @property {number} [legend.item.tile.width=10] Set width for 'rectangle' legend item tile element.
|
|
2730
|
-
* @property {number} [legend.item.tile.height=10]
|
|
2750
|
+
* @property {number} [legend.item.tile.height=10] Set height for 'rectangle' legend item tile element.
|
|
2731
2751
|
* @property {number} [legend.item.tile.r=5] Set the radius for 'circle' legend item tile type.
|
|
2732
2752
|
* @property {string} [legend.item.tile.type="rectangle"] Set legend item shape type.<br>
|
|
2733
2753
|
* - **Available Values:**
|
|
2734
2754
|
* - circle
|
|
2735
2755
|
* - rectangle
|
|
2736
2756
|
* @property {boolean} [legend.usePoint=false] Whether to use custom points in legend.
|
|
2757
|
+
* @see [Demo: item.interaction](https://naver.github.io/billboard.js/demo/#Legend.LegendItemInteraction)
|
|
2737
2758
|
* @see [Demo: item.tile.type](https://naver.github.io/billboard.js/demo/#Legend.LegendItemTileType)
|
|
2738
2759
|
* @see [Demo: position](https://naver.github.io/billboard.js/demo/#Legend.LegendPosition)
|
|
2739
2760
|
* @see [Demo: contents.template](https://naver.github.io/billboard.js/demo/#Legend.LegendTemplate1)
|
|
@@ -2768,6 +2789,16 @@ var legend$2 = {
|
|
|
2768
2789
|
* equally: false,
|
|
2769
2790
|
* padding: 10,
|
|
2770
2791
|
* item: {
|
|
2792
|
+
* // will disable default interaction
|
|
2793
|
+
* interaction: false,
|
|
2794
|
+
*
|
|
2795
|
+
* // set legend interact on double click
|
|
2796
|
+
* // by double clicking, will make focused clicked dataseries only, hiding all others.
|
|
2797
|
+
* interaction: {
|
|
2798
|
+
* dblclick: true
|
|
2799
|
+
* }
|
|
2800
|
+
*
|
|
2801
|
+
* // when set below callback, will disable corresponding default interactions
|
|
2771
2802
|
* onclick: function(id) { ... },
|
|
2772
2803
|
* onover: function(id) { ... },
|
|
2773
2804
|
* onout: function(id) { ... },
|
|
@@ -2788,24 +2819,26 @@ var legend$2 = {
|
|
|
2788
2819
|
* usePoint: true
|
|
2789
2820
|
* }
|
|
2790
2821
|
*/
|
|
2791
|
-
legend_show: true,
|
|
2792
|
-
legend_hide: false,
|
|
2793
2822
|
legend_contents_bindto: undefined,
|
|
2794
2823
|
legend_contents_template: "<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",
|
|
2795
|
-
|
|
2824
|
+
legend_equally: false,
|
|
2825
|
+
legend_hide: false,
|
|
2796
2826
|
legend_inset_anchor: "top-left",
|
|
2797
2827
|
legend_inset_x: 10,
|
|
2798
2828
|
legend_inset_y: 0,
|
|
2799
2829
|
legend_inset_step: undefined,
|
|
2830
|
+
legend_item_interaction: true,
|
|
2831
|
+
legend_item_dblclick: false,
|
|
2800
2832
|
legend_item_onclick: undefined,
|
|
2801
2833
|
legend_item_onover: undefined,
|
|
2802
2834
|
legend_item_onout: undefined,
|
|
2803
|
-
legend_equally: false,
|
|
2804
|
-
legend_padding: 0,
|
|
2805
2835
|
legend_item_tile_width: 10,
|
|
2806
2836
|
legend_item_tile_height: 10,
|
|
2807
2837
|
legend_item_tile_r: 5,
|
|
2808
2838
|
legend_item_tile_type: "rectangle",
|
|
2839
|
+
legend_padding: 0,
|
|
2840
|
+
legend_position: "bottom",
|
|
2841
|
+
legend_show: true,
|
|
2809
2842
|
legend_usePoint: false
|
|
2810
2843
|
};
|
|
2811
2844
|
|
|
@@ -4316,18 +4349,8 @@ var data$1 = {
|
|
|
4316
4349
|
},
|
|
4317
4350
|
findClosest: function (values, pos) {
|
|
4318
4351
|
var $$ = this;
|
|
4319
|
-
var
|
|
4352
|
+
var main = $$.$el.main;
|
|
4320
4353
|
var data = values.filter(function (v) { return v && isValue(v.value); });
|
|
4321
|
-
var getSensitivity = function (d) {
|
|
4322
|
-
var sensitivity = config.point_sensitivity;
|
|
4323
|
-
if (isFunction(sensitivity)) {
|
|
4324
|
-
sensitivity = sensitivity.call($$.api, d);
|
|
4325
|
-
}
|
|
4326
|
-
else if (sensitivity === "radius") {
|
|
4327
|
-
sensitivity = d.r;
|
|
4328
|
-
}
|
|
4329
|
-
return sensitivity;
|
|
4330
|
-
};
|
|
4331
4354
|
var minDist;
|
|
4332
4355
|
var closest;
|
|
4333
4356
|
// find mouseovering bar/candlestick
|
|
@@ -4347,7 +4370,7 @@ var data$1 = {
|
|
|
4347
4370
|
.filter(function (v) { return !$$.isBarType(v.id) && !$$.isCandlestickType(v.id); })
|
|
4348
4371
|
.forEach(function (v) {
|
|
4349
4372
|
var d = $$.dist(v, pos);
|
|
4350
|
-
minDist =
|
|
4373
|
+
minDist = $$.getPointSensitivity(v);
|
|
4351
4374
|
if (d < minDist) {
|
|
4352
4375
|
minDist = d;
|
|
4353
4376
|
closest = v;
|
|
@@ -6007,6 +6030,7 @@ var legend$1 = {
|
|
|
6007
6030
|
var isTouch = state.inputType === "touch";
|
|
6008
6031
|
var hasGauge = $$.hasType("gauge");
|
|
6009
6032
|
var useCssRule = config.boost_useCssRule;
|
|
6033
|
+
var interaction = config.legend_item_interaction;
|
|
6010
6034
|
item
|
|
6011
6035
|
.attr("class", function (id) {
|
|
6012
6036
|
var node = select(this);
|
|
@@ -6028,42 +6052,55 @@ var legend$1 = {
|
|
|
6028
6052
|
});
|
|
6029
6053
|
}
|
|
6030
6054
|
item
|
|
6031
|
-
.
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6055
|
+
.on(interaction.dblclick ? "dblclick" : "click", interaction || isFunction(config.legend_item_onclick) ?
|
|
6056
|
+
function (event, id) {
|
|
6057
|
+
if (!callFn(config.legend_item_onclick, api, id)) {
|
|
6058
|
+
var altKey = event.altKey, target = event.target, type = event.type;
|
|
6059
|
+
if (type === "dblclick" || altKey) {
|
|
6060
|
+
// when focused legend is clicked(with altKey or double clicked), reset all hiding.
|
|
6061
|
+
if (state.hiddenTargetIds.length &&
|
|
6062
|
+
target.parentNode.getAttribute("class").indexOf($LEGEND.legendItemHidden) === -1) {
|
|
6063
|
+
api.show();
|
|
6064
|
+
}
|
|
6065
|
+
else {
|
|
6066
|
+
api.hide();
|
|
6067
|
+
api.show(id);
|
|
6068
|
+
}
|
|
6069
|
+
}
|
|
6070
|
+
else {
|
|
6071
|
+
api.toggle(id);
|
|
6072
|
+
select(this)
|
|
6073
|
+
.classed($FOCUS.legendItemFocused, false);
|
|
6074
|
+
}
|
|
6042
6075
|
}
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
});
|
|
6076
|
+
isTouch && $$.hideTooltip();
|
|
6077
|
+
} : null);
|
|
6046
6078
|
!isTouch && item
|
|
6047
|
-
.on("mouseout",
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
})
|
|
6056
|
-
.on("mouseover", function (event, id) {
|
|
6057
|
-
if (!callFn(config.legend_item_onover, api, id)) {
|
|
6058
|
-
select(this).classed($FOCUS.legendItemFocused, true);
|
|
6059
|
-
if (hasGauge) {
|
|
6060
|
-
$$.markOverlapped(id, $$, ".".concat($GAUGE.gaugeValue));
|
|
6079
|
+
.on("mouseout", interaction || isFunction(config.legend_item_onout) ?
|
|
6080
|
+
function (event, id) {
|
|
6081
|
+
if (!callFn(config.legend_item_onout, api, id)) {
|
|
6082
|
+
select(this).classed($FOCUS.legendItemFocused, false);
|
|
6083
|
+
if (hasGauge) {
|
|
6084
|
+
$$.undoMarkOverlapped($$, ".".concat($GAUGE.gaugeValue));
|
|
6085
|
+
}
|
|
6086
|
+
$$.api.revert();
|
|
6061
6087
|
}
|
|
6062
|
-
|
|
6063
|
-
|
|
6088
|
+
} : null)
|
|
6089
|
+
.on("mouseover", interaction || isFunction(config.legend_item_onover) ?
|
|
6090
|
+
function (event, id) {
|
|
6091
|
+
if (!callFn(config.legend_item_onover, api, id)) {
|
|
6092
|
+
select(this).classed($FOCUS.legendItemFocused, true);
|
|
6093
|
+
if (hasGauge) {
|
|
6094
|
+
$$.markOverlapped(id, $$, ".".concat($GAUGE.gaugeValue));
|
|
6095
|
+
}
|
|
6096
|
+
if (!state.transiting && $$.isTargetToShow(id)) {
|
|
6097
|
+
api.focus(id);
|
|
6098
|
+
}
|
|
6064
6099
|
}
|
|
6065
|
-
}
|
|
6066
|
-
|
|
6100
|
+
} : null);
|
|
6101
|
+
// set cursor when has some interaction
|
|
6102
|
+
!item.empty() && item.on("click mouseout mouseover") &&
|
|
6103
|
+
item.style("cursor", $$.getStylePropValue("pointer"));
|
|
6067
6104
|
}
|
|
6068
6105
|
},
|
|
6069
6106
|
/**
|
|
@@ -8466,19 +8503,49 @@ var tooltip$1 = {
|
|
|
8466
8503
|
.replace(/(\r?\n|\t)/g, "")
|
|
8467
8504
|
.split(/{{(.*)}}/);
|
|
8468
8505
|
},
|
|
8506
|
+
/**
|
|
8507
|
+
* Update tooltip position coordinate
|
|
8508
|
+
* @param {object} dataToShow Data object
|
|
8509
|
+
* @param {SVGElement} eventTarget Event element
|
|
8510
|
+
* @private
|
|
8511
|
+
*/
|
|
8512
|
+
setTooltipPosition: function (dataToShow, eventTarget) {
|
|
8513
|
+
var _a, _b;
|
|
8514
|
+
var $$ = this;
|
|
8515
|
+
var config = $$.config, scale = $$.scale, state = $$.state, _c = $$.$el, eventRect = _c.eventRect, tooltip = _c.tooltip;
|
|
8516
|
+
var bindto = config.tooltip_contents.bindto;
|
|
8517
|
+
var datum = tooltip.datum();
|
|
8518
|
+
if (!bindto && datum) {
|
|
8519
|
+
var _d = getPointer(state.event, eventTarget !== null && eventTarget !== void 0 ? eventTarget : eventRect.node()), x = _d[0], y = _d[1]; // get mouse event position
|
|
8520
|
+
var currPos = { x: x, y: y };
|
|
8521
|
+
if (scale.x && datum && "x" in datum) {
|
|
8522
|
+
currPos.xAxis = scale.x(datum.x);
|
|
8523
|
+
}
|
|
8524
|
+
var _e = datum.width, width = _e === void 0 ? 0 : _e, _f = datum.height, height = _f === void 0 ? 0 : _f;
|
|
8525
|
+
// Get tooltip position
|
|
8526
|
+
var pos_1 = (_b = (_a = config.tooltip_position) === null || _a === void 0 ? void 0 : _a.bind($$.api)(dataToShow !== null && dataToShow !== void 0 ? dataToShow : JSON.parse(datum.current), width, height, eventRect === null || eventRect === void 0 ? void 0 : eventRect.node(), currPos)) !== null && _b !== void 0 ? _b : $$.getTooltipPosition.bind($$)(width, height, currPos);
|
|
8527
|
+
["top", "left"].forEach(function (v) {
|
|
8528
|
+
var value = pos_1[v];
|
|
8529
|
+
tooltip.style(v, "".concat(value, "px"));
|
|
8530
|
+
// Remember left pos in percentage to be used on resize call
|
|
8531
|
+
if (v === "left" && !datum.xPosInPercent) {
|
|
8532
|
+
datum.xPosInPercent = value / state.current.width * 100;
|
|
8533
|
+
}
|
|
8534
|
+
});
|
|
8535
|
+
}
|
|
8536
|
+
},
|
|
8469
8537
|
/**
|
|
8470
8538
|
* Returns the position of the tooltip
|
|
8471
|
-
* @param {object} dataToShow data
|
|
8472
8539
|
* @param {string} tWidth Width value of tooltip element
|
|
8473
8540
|
* @param {string} tHeight Height value of tooltip element
|
|
8474
|
-
* @param {
|
|
8541
|
+
* @param {object} currPos Current mouse position
|
|
8475
8542
|
* @returns {object} top, left value
|
|
8476
8543
|
* @private
|
|
8477
8544
|
*/
|
|
8478
|
-
|
|
8545
|
+
getTooltipPosition: function (tWidth, tHeight, currPos) {
|
|
8479
8546
|
var $$ = this;
|
|
8480
8547
|
var config = $$.config, scale = $$.scale, state = $$.state;
|
|
8481
|
-
var width = state.width, height = state.height, current = state.current, isLegendRight = state.isLegendRight, inputType = state.inputType
|
|
8548
|
+
var width = state.width, height = state.height, current = state.current, isLegendRight = state.isLegendRight, inputType = state.inputType;
|
|
8482
8549
|
var hasGauge = $$.hasType("gauge") && !config.gauge_fullCircle;
|
|
8483
8550
|
var hasTreemap = state.hasTreemap;
|
|
8484
8551
|
var isRotated = config.axis_rotated;
|
|
@@ -8486,7 +8553,7 @@ var tooltip$1 = {
|
|
|
8486
8553
|
var chartRight = svgLeft + current.width - $$.getCurrentPaddingRight();
|
|
8487
8554
|
var chartLeft = $$.getCurrentPaddingLeft(true);
|
|
8488
8555
|
var size = 20;
|
|
8489
|
-
var
|
|
8556
|
+
var x = currPos.x, y = currPos.y;
|
|
8490
8557
|
// Determine tooltip position
|
|
8491
8558
|
if ($$.hasArcType()) {
|
|
8492
8559
|
var raw = inputType === "touch" || $$.hasType("radar");
|
|
@@ -8496,15 +8563,14 @@ var tooltip$1 = {
|
|
|
8496
8563
|
}
|
|
8497
8564
|
}
|
|
8498
8565
|
else if (!hasTreemap) {
|
|
8499
|
-
var dataScale = scale.x(dataToShow[0].x);
|
|
8500
8566
|
if (isRotated) {
|
|
8501
|
-
y =
|
|
8567
|
+
y = currPos.xAxis + size;
|
|
8502
8568
|
x += svgLeft;
|
|
8503
8569
|
chartRight -= svgLeft;
|
|
8504
8570
|
}
|
|
8505
8571
|
else {
|
|
8506
8572
|
y -= 5;
|
|
8507
|
-
x = svgLeft + chartLeft + size + (scale.zoom ? x :
|
|
8573
|
+
x = svgLeft + chartLeft + size + (scale.zoom ? x : currPos.xAxis);
|
|
8508
8574
|
}
|
|
8509
8575
|
}
|
|
8510
8576
|
// when tooltip left + tWidth > chart's width
|
|
@@ -8527,23 +8593,20 @@ var tooltip$1 = {
|
|
|
8527
8593
|
/**
|
|
8528
8594
|
* Show the tooltip
|
|
8529
8595
|
* @param {object} selectedData Data object
|
|
8530
|
-
* @param {SVGElement}
|
|
8596
|
+
* @param {SVGElement} eventTarget Event element
|
|
8531
8597
|
* @private
|
|
8532
8598
|
*/
|
|
8533
|
-
showTooltip: function (selectedData,
|
|
8534
|
-
var _a, _b;
|
|
8599
|
+
showTooltip: function (selectedData, eventTarget) {
|
|
8535
8600
|
var $$ = this;
|
|
8536
|
-
var config = $$.config,
|
|
8537
|
-
var bindto = config.tooltip_contents.bindto;
|
|
8601
|
+
var config = $$.config, tooltip = $$.$el.tooltip;
|
|
8538
8602
|
var dataToShow = selectedData.filter(function (d) { return d && isValue($$.getBaseValue(d)); });
|
|
8539
8603
|
if (!tooltip || dataToShow.length === 0 || !config.tooltip_show) {
|
|
8540
8604
|
return;
|
|
8541
8605
|
}
|
|
8542
8606
|
var datum = tooltip.datum();
|
|
8543
|
-
var _c = datum || {}, _d = _c.width, width = _d === void 0 ? 0 : _d, _e = _c.height, height = _e === void 0 ? 0 : _e;
|
|
8544
8607
|
var dataStr = JSON.stringify(selectedData);
|
|
8545
8608
|
if (!datum || datum.current !== dataStr) {
|
|
8546
|
-
var
|
|
8609
|
+
var _a = selectedData.concat().sort()[0], index = _a.index, x = _a.x;
|
|
8547
8610
|
callFn(config.tooltip_onshow, $$.api, selectedData);
|
|
8548
8611
|
// set tooltip content
|
|
8549
8612
|
tooltip
|
|
@@ -8556,32 +8619,15 @@ var tooltip$1 = {
|
|
|
8556
8619
|
.style("visibility", null) // for IE9
|
|
8557
8620
|
.datum(datum = {
|
|
8558
8621
|
index: index,
|
|
8622
|
+
x: x,
|
|
8559
8623
|
current: dataStr,
|
|
8560
|
-
width:
|
|
8561
|
-
height:
|
|
8624
|
+
width: tooltip.property("offsetWidth"),
|
|
8625
|
+
height: tooltip.property("offsetHeight")
|
|
8562
8626
|
});
|
|
8563
8627
|
callFn(config.tooltip_onshown, $$.api, selectedData);
|
|
8564
8628
|
$$._handleLinkedCharts(true, index);
|
|
8565
8629
|
}
|
|
8566
|
-
|
|
8567
|
-
var fnPos = ((_a = config.tooltip_position) === null || _a === void 0 ? void 0 : _a.bind($$.api)) || $$.tooltipPosition.bind($$);
|
|
8568
|
-
var _f = getPointer(state.event, eventRect), x = _f[0], y = _f[1]; // get mouse event position
|
|
8569
|
-
var currPos = { x: x, y: y };
|
|
8570
|
-
var data = (_b = selectedData.filter(Boolean)) === null || _b === void 0 ? void 0 : _b.shift();
|
|
8571
|
-
if (scale.x && data && "x" in data) {
|
|
8572
|
-
currPos.xAxis = scale.x(data.x);
|
|
8573
|
-
}
|
|
8574
|
-
// Get tooltip dimensions
|
|
8575
|
-
var pos_1 = fnPos(dataToShow, width, height, eventRect, currPos);
|
|
8576
|
-
["top", "left"].forEach(function (v) {
|
|
8577
|
-
var value = pos_1[v];
|
|
8578
|
-
tooltip.style(v, "".concat(value, "px"));
|
|
8579
|
-
// Remember left pos in percentage to be used on resize call
|
|
8580
|
-
if (v === "left" && !datum.xPosInPercent) {
|
|
8581
|
-
datum.xPosInPercent = value / state.current.width * 100;
|
|
8582
|
-
}
|
|
8583
|
-
});
|
|
8584
|
-
}
|
|
8630
|
+
$$.setTooltipPosition(dataToShow, eventTarget);
|
|
8585
8631
|
},
|
|
8586
8632
|
/**
|
|
8587
8633
|
* Adjust tooltip position on resize event
|
|
@@ -13584,8 +13630,9 @@ var eventrect = {
|
|
|
13584
13630
|
$$.setExpand(closest.index, closest.id, true);
|
|
13585
13631
|
// Show xgrid focus line
|
|
13586
13632
|
$$.showGridFocus(selectedData);
|
|
13633
|
+
var dist = $$.dist(closest, mouse);
|
|
13587
13634
|
// Show cursor as pointer if point is close to mouse position
|
|
13588
|
-
if ($$.isBarType(closest.id) ||
|
|
13635
|
+
if ($$.isBarType(closest.id) || dist < $$.getPointSensitivity(closest)) {
|
|
13589
13636
|
$$.$el.svg.select(".".concat($EVENT.eventRect)).style("cursor", "pointer");
|
|
13590
13637
|
if (!state.mouseover) {
|
|
13591
13638
|
config.data_onover.call($$.api, closest);
|
|
@@ -13659,9 +13706,10 @@ var eventrect = {
|
|
|
13659
13706
|
index += 1;
|
|
13660
13707
|
}
|
|
13661
13708
|
}
|
|
13709
|
+
var eventOnSameIdx = config.tooltip_grouped && index === eventReceiver.currentIdx;
|
|
13662
13710
|
// do nothing while dragging/flowing
|
|
13663
|
-
if (state.dragging || state.flowing || $$.hasArcType() ||
|
|
13664
|
-
|
|
13711
|
+
if (state.dragging || state.flowing || $$.hasArcType() || eventOnSameIdx) {
|
|
13712
|
+
eventOnSameIdx && $$.setTooltipPosition();
|
|
13665
13713
|
return;
|
|
13666
13714
|
}
|
|
13667
13715
|
if (index !== eventReceiver.currentIdx) {
|
|
@@ -18836,6 +18884,22 @@ var shapePoint = {
|
|
|
18836
18884
|
}
|
|
18837
18885
|
return Math.sqrt(Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)) < (r || this.config.point_sensitivity);
|
|
18838
18886
|
},
|
|
18887
|
+
/**
|
|
18888
|
+
* Get data point sensitivity radius
|
|
18889
|
+
* @param {object} d Data point object
|
|
18890
|
+
* @returns {number} return the sensitivity value
|
|
18891
|
+
*/
|
|
18892
|
+
getPointSensitivity: function (d) {
|
|
18893
|
+
var $$ = this;
|
|
18894
|
+
var sensitivity = $$.config.point_sensitivity;
|
|
18895
|
+
if (isFunction(sensitivity)) {
|
|
18896
|
+
sensitivity = sensitivity.call($$.api, d);
|
|
18897
|
+
}
|
|
18898
|
+
else if (sensitivity === "radius") {
|
|
18899
|
+
sensitivity = d.r;
|
|
18900
|
+
}
|
|
18901
|
+
return sensitivity;
|
|
18902
|
+
},
|
|
18839
18903
|
insertPointInfoDefs: function (point, id) {
|
|
18840
18904
|
var _a;
|
|
18841
18905
|
var $$ = this;
|
|
@@ -22588,7 +22652,7 @@ var zoomModule = function () {
|
|
|
22588
22652
|
var defaults = {};
|
|
22589
22653
|
/**
|
|
22590
22654
|
* @namespace bb
|
|
22591
|
-
* @version 3.9.
|
|
22655
|
+
* @version 3.9.1
|
|
22592
22656
|
*/
|
|
22593
22657
|
var bb = {
|
|
22594
22658
|
/**
|
|
@@ -22598,7 +22662,7 @@ var bb = {
|
|
|
22598
22662
|
* bb.version; // "1.0.0"
|
|
22599
22663
|
* @memberof bb
|
|
22600
22664
|
*/
|
|
22601
|
-
version: "3.9.
|
|
22665
|
+
version: "3.9.1",
|
|
22602
22666
|
/**
|
|
22603
22667
|
* Generate chart
|
|
22604
22668
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.9.
|
|
8
|
+
* @version 3.9.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -25,7 +25,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
25
25
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
26
26
|
PERFORMANCE OF THIS SOFTWARE.
|
|
27
27
|
***************************************************************************** */
|
|
28
|
-
/* global Reflect, Promise */
|
|
28
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
29
29
|
|
|
30
30
|
var _extendStatics = function extendStatics(d, b) {
|
|
31
31
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -104,7 +104,7 @@ var Plugin = /** @class */ (function () {
|
|
|
104
104
|
delete _this[key];
|
|
105
105
|
});
|
|
106
106
|
};
|
|
107
|
-
Plugin.version = "3.9.
|
|
107
|
+
Plugin.version = "3.9.1";
|
|
108
108
|
return Plugin;
|
|
109
109
|
}());
|
|
110
110
|
var Plugin$1 = Plugin;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.9.
|
|
8
|
+
* @version 3.9.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -23,7 +23,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
23
23
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
24
24
|
PERFORMANCE OF THIS SOFTWARE.
|
|
25
25
|
***************************************************************************** */
|
|
26
|
-
/* global Reflect, Promise */
|
|
26
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
27
27
|
|
|
28
28
|
var _extendStatics = function extendStatics(d, b) {
|
|
29
29
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -279,7 +279,7 @@ var Plugin = /** @class */ (function () {
|
|
|
279
279
|
delete _this[key];
|
|
280
280
|
});
|
|
281
281
|
};
|
|
282
|
-
Plugin.version = "3.9.
|
|
282
|
+
Plugin.version = "3.9.1";
|
|
283
283
|
return Plugin;
|
|
284
284
|
}());
|
|
285
285
|
var Plugin$1 = Plugin;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.9.
|
|
8
|
+
* @version 3.9.1
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -29,7 +29,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
29
29
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
30
30
|
PERFORMANCE OF THIS SOFTWARE.
|
|
31
31
|
***************************************************************************** */
|
|
32
|
-
/* global Reflect, Promise */
|
|
32
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
33
33
|
|
|
34
34
|
var _extendStatics = function extendStatics(d, b) {
|
|
35
35
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -487,7 +487,7 @@ var Plugin = /** @class */ (function () {
|
|
|
487
487
|
delete _this[key];
|
|
488
488
|
});
|
|
489
489
|
};
|
|
490
|
-
Plugin.version = "3.9.
|
|
490
|
+
Plugin.version = "3.9.1";
|
|
491
491
|
return Plugin;
|
|
492
492
|
}());
|
|
493
493
|
var Plugin$1 = Plugin;
|