billboard.js 3.12.1 → 3.12.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 +45 -24
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +9 -9
- package/dist/billboard.pkgd.js +45 -24
- package/dist/billboard.pkgd.min.js +16 -16
- 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 +2 -2
- 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 +2 -2
- 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.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
- 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/billboard.js +54 -27
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +7 -7
- package/src/ChartInternal/data/load.ts +3 -0
- package/src/ChartInternal/shape/funnel.ts +49 -25
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.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#4a7fff;#b02c2c;#1ca46c;#b47300;#49baf3;#ed7e13;#cfaa00;#a6cd19;#dccb52;#f5d194;)}.bb svg{font-size:12px;font-family:Helvetica,Arial,sans-serif,nanumgothic,Dotum;line-height:1}.bb path,.bb line{fill:none;stroke:#8d9cab}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#8d9cab;font-size:11px}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid,.bb-line{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#8d9cab}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:.9em;fill:#fff;white-space:nowrap}.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:#27c9030d}.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-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.5!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{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{opacity:.75;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#8d9cab;stroke-width:1px}.bb-tooltip-container{z-index:10;font-family:Helvetica,Arial,sans-serif,nanumgothic,Dotum;user-select:none}.bb-tooltip{border-collapse:separate;border-spacing:0;empty-cells:show;border:1px solid #828181;border-radius:5px;background-color:#000;text-align:left;font-size:11px;color:#fff;white-space:nowrap}.bb-tooltip th{font-size:12px;padding:4px 8px;text-align:left;border-bottom:solid 1px #828181}.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;width:7px;height:7px;margin:-1px 6px 0 0;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;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{font-size:11px;line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800;font-size:12px}.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-min,.bb-chart-arcs .bb-chart-arcs-gauge-max{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{font-size:16px!important;fill:#b6c2ce;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{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:solid 1px #ccc;background-color:#000;color:#fff;padding:5px;border-radius:5px;cursor:pointer}
|
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.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#2ac4b3;#feaf29;#ff617b;#73a2ef;#b180d0;#3064cf;#d0a45f;#8aaec7;#ef65a2;#8aaec7;)}.bb svg{font-size:11px;font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;line-height:1}.bb path,.bb line{fill:none;stroke:#000}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-font-smoothing:antialiased;user-select:none;fill:#555;font-size:11px}.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{fill:#fff}.bb-axis{stroke-width:.7px}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:.9em;fill:#fff;white-space:nowrap}.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:#27c9030d}.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-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item line.bb-legend-item-tile{stroke-linecap:round;stroke-width:8px;transform:translate(7px,1px);stroke-dasharray:1 20}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#000;stroke-width:1px}.bb-tooltip-container{z-index:10;font-family:Sans Pro,Arial,sans-serif,nanumgothic,Dotum;user-select:none}.bb-tooltip{border-collapse:separate;border-spacing:0;border-radius:2px;empty-cells:show;border:1px solid #999;background-color:#fff;text-align:left;font-size:11px;-webkit-font-smoothing:antialiased;white-space:nowrap}.bb-tooltip th{font-size:13px;padding:2px 8px;text-align:left;border-bottom:solid 2px #ff2d2d;background-color:#0b00b1;color:#fffdfd}.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;width:8px;height:8px;margin-right:6px;border:solid 1px #000;border-radius:3px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;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{font-size:11px;line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800;font-size:11px}.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-min,.bb-chart-arcs .bb-chart-arcs-gauge-max{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{font-size:18px!important;fill:#000;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{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:.7px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer}
|
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.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#65CFC2;#D0A45F;#64A4F5;#EF65A2;#A377FE;#8AAEC7;#FF7E5A;#898EFE;#FFAC35;#70B0FF;)}.bb svg{font-size:12px;font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;line-height:1}.bb path,.bb line{fill:none;stroke:#8c8c8c}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#555;font-size:12px;letter-spacing:-.3px}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:.9em;fill:#fff;white-space:nowrap}.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:#27c9030d}.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_{stroke-width:2px}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-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1px}.bb-legend-item line{stroke-dasharray:1px}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{z-index:10;font-family:Helvetica,Apple SD Gothic Neo,Arial,sans-serif,nanumgothic,Dotum;user-select:none}.bb-tooltip{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-collapse:separate;border-spacing:0;empty-cells:show;border:1px solid #999;border-radius:2px;background-color:#fff;text-align:left;font-size:12px;box-shadow:.5px .5px 1px #999;white-space:nowrap}.bb-tooltip th{font-size:12px;padding:4px 8px;text-align:center;border-bottom:dotted 1px #000;background-color:#efefef;color:#000}.bb-tooltip tr:last-child td{border-bottom:none}.bb-tooltip td{padding:3px 6px;background-color:#fff;border-bottom:solid 1px #eee}.bb-tooltip td:first-child{padding-left:5px;border-right:solid 1px #eee}.bb-tooltip td:last-child{padding-right:5px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:5px;height:12px;margin-right:6px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;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{line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800}.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-min,.bb-chart-arcs .bb-chart-arcs-gauge-max{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{font-size:16px!important;fill:#8c8c8c;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{font-size:1.15em;font-weight:700;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer;opacity:.8;box-shadow:1px 1px 2px #ccc}
|
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.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-size:12px;font-family:sans-serif,Arial,nanumgothic,Dotum;line-height:1}.bb path,.bb line{fill:none;stroke:#c4c4c4}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#555;font-size:11px}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:.9em;fill:#fff;white-space:nowrap}.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:#27c9030d}.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-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{z-index:10;font-family:sans-serif,Arial,nanumgothic,Dotum;user-select:none}.bb-tooltip{border-collapse:separate;border-spacing:0;empty-cells:show;border:1px solid #999;background-color:#fff;text-align:left;font-size:11px;white-space:nowrap}.bb-tooltip th{font-size:12px;padding:4px 8px;text-align:left;border-bottom:solid 1px #eee}.bb-tooltip td{padding:4px 6px;background-color:#fff}.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;width:10px;height:10px;margin-right:6px;border-radius:5px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;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{font-size:11px;line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800;font-size:12px}.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-min,.bb-chart-arcs .bb-chart-arcs-gauge-max{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{font-size:16px!important;fill:#000;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{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer}
|
package/dist/theme/modern.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.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
*/.bb-color-pattern{background-image:url(#7ea9fa;#ffcd1e;#d33043;#41c464;#c86b74;#006bc2;#2a7e41;#f27c00;#c159ff;#bed017;)}.bb svg{font-size:12px;font-family:-apple-system,"system-ui",Noto Sans,Malgun Gothic,\b9d1\c740 \ace0\b515,helvetica,Apple SD Gothic Neo,sans-serif;line-height:1}.bb path,.bb line{fill:none;stroke:#cecece}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;fill:#555;font-size:10.5px}.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle{fill:#000}.bb-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:.9em;fill:#fff;white-space:nowrap}.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:#27c9030d}.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:#d2bad8}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{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-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#71808d}.bb-region rect{fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-zoom-brush{fill-opacity:.1;fill:#838181}.bb-brush .extent{fill-opacity:.1}.bb-brush .selection{fill:#838181;fill-opacity:.2}.bb-brush path{stroke:#838181}.bb-legend-item{user-select:none}.bb-legend-item line.bb-legend-item-tile{stroke-linecap:round;transform:translate(7px,1px);stroke-dasharray:1 20}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-chart-treemaps rect{stroke:#000;stroke-width:.5px}.bb-tooltip-container{z-index:10;font-family:-apple-system,"system-ui",Noto Sans,Malgun Gothic,\b9d1\c740 \ace0\b515,helvetica,Apple SD Gothic Neo,sans-serif;user-select:none}.bb-tooltip{border-collapse:separate;border-spacing:0;empty-cells:show;border:1px solid #999;color:#fff;border-radius:5px;background-color:#404244;text-align:left;font-size:11px;white-space:nowrap;opacity:.9}.bb-tooltip th{font-size:11px;padding:3px 6px 0;text-align:left}.bb-tooltip td{padding:3px}.bb-tooltip td:first-child{padding-left:7px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:5px;vertical-align:middle}.bb-tooltip td.value{border-left:1px solid transparent;text-align:right}.bb-tooltip .bb-tooltip-title{display:inline-block;color:#aaa;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{font-size:11px;line-height:13px;padding:4px 0 3px;color:#444;text-align:left;font-weight:400}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{padding-left:5px;font-weight:800;font-size:12px}.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:#ccc}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-min,.bb-chart-arcs .bb-chart-arcs-gauge-max{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{font-size:1.8em;fill:#000;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arcs .bb-levels circle{fill:none;stroke:#cecece;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:11px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#cecece;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#cecece;stroke-width:.5px}.bb-chart-radars .bb-axis text{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{border:1px solid #999;background-color:#404244;color:#fff;opacity:.9;padding:5px;border-radius:5px;cursor:pointer}
|
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.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
*/
|
|
10
10
|
import { pointer, select, namespaces, selectAll } from 'd3-selection';
|
|
11
11
|
import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
|
|
@@ -4929,6 +4929,8 @@ var dataLoad = {
|
|
|
4929
4929
|
hasLegendDefsPoint && ((_a = $el.defs) === null || _a === void 0 ? void 0 : _a.select("#".concat($$.getDefsPointId(suffixId))).remove());
|
|
4930
4930
|
});
|
|
4931
4931
|
// since treemap uses different data types, it needs to be transformed
|
|
4932
|
+
state.hasFunnel && $$.updateFunnel($$.data.targets);
|
|
4933
|
+
// since treemap uses different data types, it needs to be transformed
|
|
4932
4934
|
state.hasTreemap && $$.updateTargetsForTreemap($$.data.targets);
|
|
4933
4935
|
// Update current state chart type and elements list after redraw
|
|
4934
4936
|
$$.updateTypesElements();
|
|
@@ -19229,14 +19231,17 @@ function getSize(checkNeck) {
|
|
|
19229
19231
|
(padding.top + padding.bottom) }, padding);
|
|
19230
19232
|
// determine if container width to not be less than neck width
|
|
19231
19233
|
if (checkNeck) {
|
|
19232
|
-
var
|
|
19234
|
+
var _b = getNecklSize.call($$, {
|
|
19233
19235
|
width: size.width,
|
|
19234
19236
|
height: size.height
|
|
19235
|
-
}).width;
|
|
19236
|
-
// prevent
|
|
19237
|
+
}), neckWidth = _b.width, neckHeight = _b.height;
|
|
19238
|
+
// prevent neck size to not exceeed funnel size
|
|
19237
19239
|
if (size.width < neckWidth) {
|
|
19238
19240
|
size.width = neckWidth;
|
|
19239
19241
|
}
|
|
19242
|
+
if (size.height < neckHeight) {
|
|
19243
|
+
size.height = neckHeight;
|
|
19244
|
+
}
|
|
19240
19245
|
}
|
|
19241
19246
|
return size;
|
|
19242
19247
|
}
|
|
@@ -19272,7 +19277,7 @@ function getNecklSize(current) {
|
|
|
19272
19277
|
*/
|
|
19273
19278
|
function getCoord(d) {
|
|
19274
19279
|
var $$ = this;
|
|
19275
|
-
var _a = getSize.call($$, true), top = _a.top, width = _a.width;
|
|
19280
|
+
var _a = getSize.call($$, true), top = _a.top, left = _a.left, width = _a.width;
|
|
19276
19281
|
var coords = [];
|
|
19277
19282
|
d.forEach(function (d, i) {
|
|
19278
19283
|
var ratio = d.ratio;
|
|
@@ -19283,36 +19288,44 @@ function getCoord(d) {
|
|
|
19283
19288
|
// | ˅
|
|
19284
19289
|
// (3) <-------------- (2)
|
|
19285
19290
|
coords.push(d.coords = [
|
|
19286
|
-
[
|
|
19287
|
-
[width, y], // 1
|
|
19288
|
-
[width, i > 0 ? ratio + y : ratio + top], // 2
|
|
19289
|
-
[
|
|
19290
|
-
[
|
|
19291
|
+
[left, y], // M
|
|
19292
|
+
[left + width, y], // 1
|
|
19293
|
+
[left + width, i > 0 ? ratio + y : ratio + top], // 2
|
|
19294
|
+
[left, i > 0 ? ratio + y : ratio + top], // 3
|
|
19295
|
+
[left, y] // 4
|
|
19291
19296
|
]);
|
|
19292
19297
|
});
|
|
19293
19298
|
return coords;
|
|
19294
19299
|
}
|
|
19295
19300
|
/**
|
|
19296
|
-
* Get
|
|
19301
|
+
* Get clip path
|
|
19302
|
+
* @param {boolean} forBackground Determine if clip path for background
|
|
19297
19303
|
* @returns {string} path
|
|
19298
19304
|
* @private
|
|
19299
19305
|
*/
|
|
19300
|
-
function
|
|
19306
|
+
function getClipPath(forBackground) {
|
|
19307
|
+
if (forBackground === void 0) { forBackground = false; }
|
|
19301
19308
|
var $$ = this;
|
|
19302
19309
|
var _a = getSize.call($$, true), width = _a.width, height = _a.height, top = _a.top, left = _a.left;
|
|
19303
19310
|
var neck = getNecklSize.call($$, { width: width, height: height });
|
|
19304
|
-
var rightX = (width + neck.width) / 2;
|
|
19305
19311
|
var leftX = (width - neck.width) / 2;
|
|
19312
|
+
var rightX = (width + neck.width) / 2;
|
|
19306
19313
|
var bodyHeigth = height - neck.height;
|
|
19307
19314
|
var coords = [
|
|
19308
|
-
[0
|
|
19309
|
-
[width
|
|
19315
|
+
[0, 0], // M
|
|
19316
|
+
[width, 0], // 1
|
|
19310
19317
|
[rightX, bodyHeigth], // 2
|
|
19311
|
-
[rightX, height
|
|
19312
|
-
[leftX, height
|
|
19318
|
+
[rightX, height], // 3
|
|
19319
|
+
[leftX, height], // 4
|
|
19313
19320
|
[leftX, bodyHeigth], // 5
|
|
19314
|
-
[0
|
|
19321
|
+
[0, 0] // 6
|
|
19315
19322
|
];
|
|
19323
|
+
if (forBackground) {
|
|
19324
|
+
coords.forEach(function (d) {
|
|
19325
|
+
d[0] += left;
|
|
19326
|
+
d[1] += top;
|
|
19327
|
+
});
|
|
19328
|
+
}
|
|
19316
19329
|
return "M".concat(coords.join("L"), "z");
|
|
19317
19330
|
}
|
|
19318
19331
|
/**
|
|
@@ -19430,23 +19443,38 @@ var shapeFunnel = {
|
|
|
19430
19443
|
.style("opacity", "0")
|
|
19431
19444
|
.style("fill", $$.color);
|
|
19432
19445
|
},
|
|
19446
|
+
/**
|
|
19447
|
+
* Update funnel path selection
|
|
19448
|
+
* @param {object} targets Updated target data
|
|
19449
|
+
* @private
|
|
19450
|
+
*/
|
|
19451
|
+
updateFunnel: function (targets) {
|
|
19452
|
+
var $$ = this;
|
|
19453
|
+
var funnel = $$.$el.funnel;
|
|
19454
|
+
var targetIds = targets.map(function (_a) {
|
|
19455
|
+
var id = _a.id;
|
|
19456
|
+
return id;
|
|
19457
|
+
});
|
|
19458
|
+
funnel.path = funnel.path.filter(function (d) { return targetIds.indexOf(d.id) >= 0; });
|
|
19459
|
+
},
|
|
19433
19460
|
/**
|
|
19434
19461
|
* Generate treemap coordinate points data
|
|
19435
19462
|
* @returns {Array} Array of coordinate points
|
|
19436
19463
|
* @private
|
|
19437
19464
|
*/
|
|
19438
19465
|
generateGetFunnelPoints: function () {
|
|
19439
|
-
var _a;
|
|
19440
19466
|
var $$ = this;
|
|
19441
19467
|
var funnel = $$.$el.funnel;
|
|
19442
19468
|
var targets = $$.filterTargetsToShow(funnel.path);
|
|
19469
|
+
var _a = getSize.call($$), top = _a.top, left = _a.left, right = _a.right;
|
|
19470
|
+
var center = (left - right) / 2;
|
|
19443
19471
|
var points = {};
|
|
19444
|
-
var accumulatedHeight =
|
|
19472
|
+
var accumulatedHeight = top !== null && top !== void 0 ? top : 0;
|
|
19445
19473
|
targets.each(function (d, i) {
|
|
19446
19474
|
var _a;
|
|
19447
19475
|
points[d.id] = [
|
|
19448
|
-
[
|
|
19449
|
-
[
|
|
19476
|
+
[center, accumulatedHeight],
|
|
19477
|
+
[center, accumulatedHeight += ((_a = targets === null || targets === void 0 ? void 0 : targets[i]) !== null && _a !== void 0 ? _a : d).ratio]
|
|
19450
19478
|
];
|
|
19451
19479
|
});
|
|
19452
19480
|
return function (d) { return points[d.id]; };
|
|
@@ -19461,9 +19489,8 @@ var shapeFunnel = {
|
|
|
19461
19489
|
var targets = $$.filterTargetsToShow(funnel.path);
|
|
19462
19490
|
var coords = getCoord.call($$, updateRatio.call($$, targets.data()));
|
|
19463
19491
|
// set neck path
|
|
19464
|
-
|
|
19465
|
-
funnel.attr("
|
|
19466
|
-
funnel.background.attr("d", neckPath);
|
|
19492
|
+
funnel.attr("clip-path", "path('".concat(getClipPath.bind($$)(), "')"));
|
|
19493
|
+
funnel.background.attr("d", getClipPath.call($$, true));
|
|
19467
19494
|
$T(targets)
|
|
19468
19495
|
.attr("d", function (d, i) { return "M".concat(coords[i].join("L"), "z"); })
|
|
19469
19496
|
.style("opacity", "1");
|
|
@@ -24197,7 +24224,7 @@ var zoomModule = function () {
|
|
|
24197
24224
|
var defaults = {};
|
|
24198
24225
|
/**
|
|
24199
24226
|
* @namespace bb
|
|
24200
|
-
* @version 3.12.
|
|
24227
|
+
* @version 3.12.2
|
|
24201
24228
|
*/
|
|
24202
24229
|
var bb = {
|
|
24203
24230
|
/**
|
|
@@ -24207,7 +24234,7 @@ var bb = {
|
|
|
24207
24234
|
* bb.version; // "1.0.0"
|
|
24208
24235
|
* @memberof bb
|
|
24209
24236
|
*/
|
|
24210
|
-
version: "3.12.
|
|
24237
|
+
version: "3.12.2",
|
|
24211
24238
|
/**
|
|
24212
24239
|
* Generate chart
|
|
24213
24240
|
* - **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.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -100,7 +100,7 @@ var Plugin = /** @class */ (function () {
|
|
|
100
100
|
delete _this[key];
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
|
-
Plugin.version = "3.12.
|
|
103
|
+
Plugin.version = "3.12.2";
|
|
104
104
|
return Plugin;
|
|
105
105
|
}());
|
|
106
106
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -443,7 +443,7 @@ var Plugin = /** @class */ (function () {
|
|
|
443
443
|
delete _this[key];
|
|
444
444
|
});
|
|
445
445
|
};
|
|
446
|
-
Plugin.version = "3.12.
|
|
446
|
+
Plugin.version = "3.12.2";
|
|
447
447
|
return Plugin;
|
|
448
448
|
}());
|
|
449
449
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -501,7 +501,7 @@ var Plugin = /** @class */ (function () {
|
|
|
501
501
|
delete _this[key];
|
|
502
502
|
});
|
|
503
503
|
};
|
|
504
|
-
Plugin.version = "3.12.
|
|
504
|
+
Plugin.version = "3.12.2";
|
|
505
505
|
return Plugin;
|
|
506
506
|
}());
|
|
507
507
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -290,7 +290,7 @@ var Plugin = /** @class */ (function () {
|
|
|
290
290
|
delete _this[key];
|
|
291
291
|
});
|
|
292
292
|
};
|
|
293
|
-
Plugin.version = "3.12.
|
|
293
|
+
Plugin.version = "3.12.2";
|
|
294
294
|
return Plugin;
|
|
295
295
|
}());
|
|
296
296
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.12.
|
|
8
|
+
* @version 3.12.2
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -267,7 +267,7 @@ var Plugin = /** @class */ (function () {
|
|
|
267
267
|
delete _this[key];
|
|
268
268
|
});
|
|
269
269
|
};
|
|
270
|
-
Plugin.version = "3.12.
|
|
270
|
+
Plugin.version = "3.12.2";
|
|
271
271
|
return Plugin;
|
|
272
272
|
}());
|
|
273
273
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "billboard.js",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.2",
|
|
4
4
|
"description": "Re-usable easy interface JavaScript chart library, based on D3 v4+",
|
|
5
5
|
"homepage": "https://naver.github.io/billboard.js/",
|
|
6
6
|
"main": "dist/billboard.js",
|
|
@@ -125,18 +125,18 @@
|
|
|
125
125
|
"core-js": "^3.37.1",
|
|
126
126
|
"coveralls": "^3.1.1",
|
|
127
127
|
"cross-env": "^7.0.3",
|
|
128
|
-
"css-loader": "^7.1.
|
|
128
|
+
"css-loader": "^7.1.2",
|
|
129
129
|
"d3-color": "^3.1.0",
|
|
130
130
|
"d3-delaunay": "^6.0.4",
|
|
131
131
|
"d3-format": "^3.1.0",
|
|
132
132
|
"d3-polygon": "^3.0.1",
|
|
133
133
|
"docdash": "^2.0.2",
|
|
134
|
-
"dprint": "^0.
|
|
134
|
+
"dprint": "^0.46.1",
|
|
135
135
|
"esbuild-loader": "^4.1.0",
|
|
136
136
|
"eslint": "^9.3.0",
|
|
137
137
|
"eslint-config-naver": "^2.1.0",
|
|
138
138
|
"eslint-plugin-import": "^2.29.1",
|
|
139
|
-
"eslint-plugin-jsdoc": "^48.2.
|
|
139
|
+
"eslint-plugin-jsdoc": "^48.2.6",
|
|
140
140
|
"exports-loader": "^5.0.0",
|
|
141
141
|
"hammer-simulator": "0.0.1",
|
|
142
142
|
"husky": "^9.0.11",
|
|
@@ -153,13 +153,13 @@
|
|
|
153
153
|
"karma-sinon": "^1.0.5",
|
|
154
154
|
"karma-sourcemap-loader": "^0.4.0",
|
|
155
155
|
"karma-webpack": "^5.0.1",
|
|
156
|
-
"lint-staged": "^15.2.
|
|
156
|
+
"lint-staged": "^15.2.5",
|
|
157
157
|
"lite-fixture": "^1.0.2",
|
|
158
158
|
"mini-css-extract-plugin": "^2.9.0",
|
|
159
159
|
"mocha": "^10.4.0",
|
|
160
160
|
"node-sass": "^9.0.0",
|
|
161
161
|
"regenerator-runtime": "^0.14.1",
|
|
162
|
-
"rollup": "^4.
|
|
162
|
+
"rollup": "^4.18.0",
|
|
163
163
|
"rollup-plugin-delete": "^2.0.0",
|
|
164
164
|
"sass-loader": "^14.2.1",
|
|
165
165
|
"semantic-release": "^23.1.1",
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"taffydb": "^2.7.3",
|
|
171
171
|
"tslib": "^2.6.2",
|
|
172
172
|
"typescript": "5.4.5",
|
|
173
|
-
"typescript-eslint": "^7.
|
|
173
|
+
"typescript-eslint": "^7.11.0",
|
|
174
174
|
"webpack": "^5.91.0",
|
|
175
175
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
176
176
|
"webpack-clean": "^1.2.5",
|
|
@@ -177,6 +177,9 @@ export default {
|
|
|
177
177
|
hasLegendDefsPoint && $el.defs?.select(`#${$$.getDefsPointId(suffixId)}`).remove();
|
|
178
178
|
});
|
|
179
179
|
|
|
180
|
+
// since treemap uses different data types, it needs to be transformed
|
|
181
|
+
state.hasFunnel && $$.updateFunnel($$.data.targets);
|
|
182
|
+
|
|
180
183
|
// since treemap uses different data types, it needs to be transformed
|
|
181
184
|
state.hasTreemap && $$.updateTargetsForTreemap($$.data.targets);
|
|
182
185
|
|
|
@@ -30,15 +30,19 @@ function getSize(checkNeck = false): TSize {
|
|
|
30
30
|
|
|
31
31
|
// determine if container width to not be less than neck width
|
|
32
32
|
if (checkNeck) {
|
|
33
|
-
const {width: neckWidth} = getNecklSize.call($$, {
|
|
33
|
+
const {width: neckWidth, height: neckHeight} = getNecklSize.call($$, {
|
|
34
34
|
width: size.width,
|
|
35
35
|
height: size.height
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
// prevent
|
|
38
|
+
// prevent neck size to not exceeed funnel size
|
|
39
39
|
if (size.width < neckWidth) {
|
|
40
40
|
size.width = neckWidth;
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
if (size.height < neckHeight) {
|
|
44
|
+
size.height = neckHeight;
|
|
45
|
+
}
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
return size;
|
|
@@ -80,7 +84,7 @@ function getNecklSize(current: TSizeCurrent) {
|
|
|
80
84
|
*/
|
|
81
85
|
function getCoord(d: IFunnelData[]) {
|
|
82
86
|
const $$ = this;
|
|
83
|
-
const {top, width} = getSize.call($$, true);
|
|
87
|
+
const {top, left, width} = getSize.call($$, true);
|
|
84
88
|
const coords: number[][][] = [];
|
|
85
89
|
|
|
86
90
|
d.forEach((d, i) => {
|
|
@@ -93,11 +97,11 @@ function getCoord(d: IFunnelData[]) {
|
|
|
93
97
|
// | ˅
|
|
94
98
|
// (3) <-------------- (2)
|
|
95
99
|
coords.push(d.coords = [
|
|
96
|
-
[
|
|
97
|
-
[width, y], // 1
|
|
98
|
-
[width, i > 0 ? ratio + y : ratio + top], // 2
|
|
99
|
-
[
|
|
100
|
-
[
|
|
100
|
+
[left, y], // M
|
|
101
|
+
[left + width, y], // 1
|
|
102
|
+
[left + width, i > 0 ? ratio + y : ratio + top], // 2
|
|
103
|
+
[left, i > 0 ? ratio + y : ratio + top], // 3
|
|
104
|
+
[left, y] // 4
|
|
101
105
|
]);
|
|
102
106
|
});
|
|
103
107
|
|
|
@@ -105,29 +109,36 @@ function getCoord(d: IFunnelData[]) {
|
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
/**
|
|
108
|
-
* Get
|
|
112
|
+
* Get clip path
|
|
113
|
+
* @param {boolean} forBackground Determine if clip path for background
|
|
109
114
|
* @returns {string} path
|
|
110
115
|
* @private
|
|
111
116
|
*/
|
|
112
|
-
function
|
|
117
|
+
function getClipPath(forBackground = false): string {
|
|
113
118
|
const $$ = this;
|
|
114
119
|
const {width, height, top, left} = getSize.call($$, true);
|
|
115
120
|
const neck = getNecklSize.call($$, {width, height});
|
|
116
|
-
|
|
117
|
-
const rightX = (width + neck.width) / 2;
|
|
118
121
|
const leftX = (width - neck.width) / 2;
|
|
122
|
+
const rightX = (width + neck.width) / 2;
|
|
119
123
|
const bodyHeigth = height - neck.height;
|
|
120
124
|
|
|
121
125
|
const coords = [
|
|
122
|
-
[0
|
|
123
|
-
[width
|
|
126
|
+
[0, 0], // M
|
|
127
|
+
[width, 0], // 1
|
|
124
128
|
[rightX, bodyHeigth], // 2
|
|
125
|
-
[rightX, height
|
|
126
|
-
[leftX, height
|
|
129
|
+
[rightX, height], // 3
|
|
130
|
+
[leftX, height], // 4
|
|
127
131
|
[leftX, bodyHeigth], // 5
|
|
128
|
-
[0
|
|
132
|
+
[0, 0] // 6
|
|
129
133
|
];
|
|
130
134
|
|
|
135
|
+
if (forBackground) {
|
|
136
|
+
coords.forEach(d => {
|
|
137
|
+
d[0] += left;
|
|
138
|
+
d[1] += top;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
|
|
131
142
|
return `M${coords.join("L")}z`;
|
|
132
143
|
}
|
|
133
144
|
|
|
@@ -158,7 +169,7 @@ function getFunnelData(d: IData[]): IFunnelData[] {
|
|
|
158
169
|
* @returns {Array} Updated data object
|
|
159
170
|
* @private
|
|
160
171
|
*/
|
|
161
|
-
function updateRatio(data) {
|
|
172
|
+
function updateRatio(data: IFunnelData[]): IFunnelData[] {
|
|
162
173
|
const $$ = this;
|
|
163
174
|
const {height} = getSize.call($$);
|
|
164
175
|
const total = $$.getTotalDataSum(true);
|
|
@@ -270,6 +281,19 @@ export default {
|
|
|
270
281
|
.style("fill", $$.color);
|
|
271
282
|
},
|
|
272
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Update funnel path selection
|
|
286
|
+
* @param {object} targets Updated target data
|
|
287
|
+
* @private
|
|
288
|
+
*/
|
|
289
|
+
updateFunnel(targets: IData[]): void {
|
|
290
|
+
const $$ = this;
|
|
291
|
+
const {$el: {funnel}} = $$;
|
|
292
|
+
const targetIds = targets.map(({id}) => id);
|
|
293
|
+
|
|
294
|
+
funnel.path = funnel.path.filter(d => targetIds.indexOf(d.id) >= 0);
|
|
295
|
+
},
|
|
296
|
+
|
|
273
297
|
/**
|
|
274
298
|
* Generate treemap coordinate points data
|
|
275
299
|
* @returns {Array} Array of coordinate points
|
|
@@ -279,13 +303,15 @@ export default {
|
|
|
279
303
|
const $$ = this;
|
|
280
304
|
const {$el: {funnel}} = $$;
|
|
281
305
|
const targets = $$.filterTargetsToShow(funnel.path);
|
|
306
|
+
const {top, left, right} = getSize.call($$);
|
|
307
|
+
const center = (left - right) / 2;
|
|
282
308
|
const points = {};
|
|
283
|
-
let accumulatedHeight =
|
|
309
|
+
let accumulatedHeight = top ?? 0;
|
|
284
310
|
|
|
285
311
|
targets.each((d, i) => {
|
|
286
312
|
points[d.id] = [
|
|
287
|
-
[
|
|
288
|
-
[
|
|
313
|
+
[center, accumulatedHeight],
|
|
314
|
+
[center, accumulatedHeight += (targets?.[i] ?? d).ratio]
|
|
289
315
|
];
|
|
290
316
|
});
|
|
291
317
|
|
|
@@ -303,10 +329,8 @@ export default {
|
|
|
303
329
|
const coords = getCoord.call($$, updateRatio.call($$, targets.data()));
|
|
304
330
|
|
|
305
331
|
// set neck path
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
funnel.attr("clip-path", `path('${neckPath}')`);
|
|
309
|
-
funnel.background.attr("d", neckPath);
|
|
332
|
+
funnel.attr("clip-path", `path('${getClipPath.bind($$)()}')`);
|
|
333
|
+
funnel.background.attr("d", getClipPath.call($$, true));
|
|
310
334
|
|
|
311
335
|
$T(targets)
|
|
312
336
|
.attr("d", (d, i) => `M${coords[i].join("L")}z`)
|