billboard.js 3.11.0 → 3.11.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.
Files changed (48) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +52 -28
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +48 -22
  6. package/dist/billboard.pkgd.min.js +4 -2
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2 -2
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
  21. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2 -2
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
  23. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2 -2
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
  25. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2 -2
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
  27. package/dist/theme/dark.css +1 -1
  28. package/dist/theme/dark.min.css +1 -1
  29. package/dist/theme/datalab.css +1 -1
  30. package/dist/theme/datalab.min.css +1 -1
  31. package/dist/theme/graph.css +1 -1
  32. package/dist/theme/graph.min.css +1 -1
  33. package/dist/theme/insight.css +1 -1
  34. package/dist/theme/insight.min.css +1 -1
  35. package/dist/theme/modern.css +1 -1
  36. package/dist/theme/modern.min.css +1 -1
  37. package/dist-esm/billboard.js +32 -14
  38. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  39. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  40. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  41. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  42. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  43. package/package.json +16 -14
  44. package/src/ChartInternal/Axis/AxisRenderer.ts +2 -1
  45. package/src/ChartInternal/interactions/zoom.ts +9 -3
  46. package/src/ChartInternal/internals/title.ts +2 -2
  47. package/src/ChartInternal/internals/tooltip.ts +1 -1
  48. package/src/ChartInternal/shape/shape.ts +18 -6
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.0
8
+ * @version 3.11.1
9
9
  */
10
10
  /*-- Dark Theme --*/
11
11
  /*-- Default color pattern --*/
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.0
8
+ * @version 3.11.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{-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-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}.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{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{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{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}
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.0
8
+ * @version 3.11.1
9
9
  */
10
10
  /*-- Datalab Theme --*/
11
11
  /*-- Default color pattern --*/
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.0
8
+ * @version 3.11.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-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-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}.bb-region rect{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;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{font-family:Sans Pro,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;empty-cells:show;font-size:11px;text-align:left;-webkit-font-smoothing:antialiased;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{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{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}
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.0
8
+ * @version 3.11.1
9
9
  */
10
10
  /*-- Graph Theme --*/
11
11
  /*-- Default color pattern --*/
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.0
8
+ * @version 3.11.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{-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,.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}.bb-region rect{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{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{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{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{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}
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.0
8
+ * @version 3.11.1
9
9
  */
10
10
  /*-- Insight Theme --*/
11
11
  /*-- Default color pattern --*/
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.0
8
+ * @version 3.11.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{-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,.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}.bb-region rect{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{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{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{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{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}
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.0
8
+ * @version 3.11.1
9
9
  */
10
10
  @charset "UTF-8";
11
11
  /*-- Insight Theme --*/
@@ -6,5 +6,5 @@
6
6
  * billboard.js, JavaScript chart library
7
7
  * https://naver.github.io/billboard.js/
8
8
  *
9
- * @version 3.11.0
9
+ * @version 3.11.1
10
10
  */.bb-color-pattern{background-image:url(#7ea9fa;#ffcd1e;#d33043;#41c464;#c86b74;#006bc2;#2a7e41;#f27c00;#c159ff;#bed017;)}.bb svg{font-family:-apple-system,"system-ui",Noto Sans,Malgun Gothic,맑은 고딕,helvetica,Apple SD Gothic Neo,sans-serif;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#cecece}.bb .bb-button,.bb text{-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,.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:#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-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:#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{font-family:-apple-system,"system-ui",Noto Sans,Malgun Gothic,맑은 고딕,helvetica,Apple SD Gothic Neo,sans-serif;user-select:none;z-index:10}.bb-tooltip{background-color:#404244;border:1px solid #999;border-collapse:separate;border-radius:5px;border-spacing:0;color:#fff;empty-cells:show;opacity:.9;white-space:nowrap}.bb-tooltip,.bb-tooltip th{font-size:11px;text-align:left}.bb-tooltip th{padding:3px 6px 0}.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{border-radius:5px;display:inline-block;height:7px;margin-right:6px;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:.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-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{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{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:#404244;border:1px solid #999;border-radius:5px;color:#fff;cursor:pointer;opacity:.9;padding:5px}
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.11.0
8
+ * @version 3.11.1
9
9
  */
10
10
  import { timeParse, utcParse, timeFormat, utcFormat } from 'd3-time-format';
11
11
  import { pointer, select, namespaces, selectAll } from 'd3-selection';
@@ -7404,14 +7404,25 @@ var shape = {
7404
7404
  $$.getYScaleById(id)($$.getBaseValue(d));
7405
7405
  },
7406
7406
  getBarW: function (type, axis, targetsNum) {
7407
+ var _a, _b, _c;
7407
7408
  var $$ = this;
7408
7409
  var config = $$.config, org = $$.org, scale = $$.scale;
7409
7410
  var maxDataCount = $$.getMaxDataCount();
7410
- var isGrouped = type === "bar" && config.data_groups.length;
7411
+ var isGrouped = type === "bar" && ((_a = config.data_groups) === null || _a === void 0 ? void 0 : _a.length);
7411
7412
  var configName = "".concat(type, "_width");
7412
- var tickInterval = scale.zoom && !$$.axis.isCategorized() ?
7413
- (org.xDomain.map(function (v) { return scale.zoom(v); })
7414
- .reduce(function (a, c) { return Math.abs(a) + c; }) / maxDataCount) : axis.tickInterval(maxDataCount);
7413
+ var k = $$.getZoomTransform().k;
7414
+ var xMinMax = [
7415
+ (_b = config.axis_x_min) !== null && _b !== void 0 ? _b : org.xDomain[0],
7416
+ (_c = config.axis_x_max) !== null && _c !== void 0 ? _c : org.xDomain[1]
7417
+ ].map($$.axis.isTimeSeries() ? parseDate.bind($$) : Number);
7418
+ var tickInterval = axis.tickInterval(maxDataCount);
7419
+ if (scale.zoom && !$$.axis.isCategorized() && k > 1) {
7420
+ var isSameMinMax_1 = xMinMax.every(function (v, i) { return v === org.xDomain[i]; });
7421
+ tickInterval = org.xDomain.map(function (v, i) {
7422
+ var value = isSameMinMax_1 ? v : v - Math.abs(xMinMax[i]);
7423
+ return scale.zoom(value);
7424
+ }).reduce(function (a, c) { return Math.abs(a) + c; }) / maxDataCount;
7425
+ }
7415
7426
  var getWidth = function (id) {
7416
7427
  var width = id ? config[configName][id] : config[configName];
7417
7428
  var ratio = id ? width.ratio : config["".concat(configName, "_ratio")];
@@ -8514,9 +8525,9 @@ var title = {
8514
8525
  */
8515
8526
  getTitlePadding: function () {
8516
8527
  var $$ = this;
8517
- var $el = $$.$el, config = $$.config;
8528
+ var title = $$.$el.title, config = $$.config;
8518
8529
  return (config.title_padding.top || 0) +
8519
- $$.getTextRect($el.title, $TEXT.title).height +
8530
+ (title ? $$.getTextRect(title, $TEXT.title).height : 0) +
8520
8531
  (config.title_padding.bottom || 0);
8521
8532
  },
8522
8533
  };
@@ -8796,6 +8807,7 @@ var tooltip$1 = {
8796
8807
  * @private
8797
8808
  */
8798
8809
  getTooltipPosition: function (tWidth, tHeight, currPos) {
8810
+ var _a, _b;
8799
8811
  var $$ = this;
8800
8812
  var config = $$.config, scale = $$.scale, state = $$.state;
8801
8813
  var width = state.width, height = state.height, current = state.current, isLegendRight = state.isLegendRight, inputType = state.inputType;
@@ -8817,7 +8829,7 @@ var tooltip$1 = {
8817
8829
  var raw = inputType === "touch";
8818
8830
  if (!raw) {
8819
8831
  x += (width - (isLegendRight ? $$.getLegendWidth() : 0)) / 2;
8820
- y += hasGauge ? height : (height / 2) + tHeight;
8832
+ y += (hasGauge ? height : (height / 2) + tHeight) + ((_b = (_a = $$.getTitlePadding) === null || _a === void 0 ? void 0 : _a.call($$)) !== null && _b !== void 0 ? _b : 0);
8821
8833
  }
8822
8834
  }
8823
8835
  else if (hasTreemap) {
@@ -12829,13 +12841,14 @@ var AxisRenderer = /** @class */ (function () {
12829
12841
  * @returns {number}
12830
12842
  */
12831
12843
  AxisRenderer.prototype.tickInterval = function (size) {
12832
- var _this = this;
12833
- var _a = this.config, outerTickSize = _a.outerTickSize, tickOffset = _a.tickOffset, tickValues = _a.tickValues;
12844
+ var _a;
12845
+ var _b = this.config, outerTickSize = _b.outerTickSize, tickOffset = _b.tickOffset, tickValues = _b.tickValues;
12834
12846
  var interval;
12835
12847
  if (this.params.isCategory) {
12836
12848
  interval = tickOffset * 2;
12837
12849
  }
12838
12850
  else {
12851
+ var scale_1 = (_a = this.params.owner.scale.zoom) !== null && _a !== void 0 ? _a : this.helper.scale;
12839
12852
  var length_1 = this.g.select("path.domain")
12840
12853
  .node()
12841
12854
  .getTotalLength() - outerTickSize * 2;
@@ -12845,7 +12858,7 @@ var AxisRenderer = /** @class */ (function () {
12845
12858
  .map(function (v, i, arr) {
12846
12859
  var next = i + 1;
12847
12860
  return next < arr.length ?
12848
- _this.helper.scale(arr[next]) - _this.helper.scale(v) : null;
12861
+ scale_1(arr[next]) - scale_1(v) : null;
12849
12862
  }).filter(Boolean) : [];
12850
12863
  interval = Math.min.apply(Math, __spreadArray(__spreadArray([], intervalByValue, false), [interval], false));
12851
12864
  }
@@ -22897,9 +22910,9 @@ var zoom = {
22897
22910
  if (config.zoom_type === "drag" && (e && startEvent.clientX === e.clientX && startEvent.clientY === e.clientY)) {
22898
22911
  return;
22899
22912
  }
22913
+ state.zooming = false;
22900
22914
  $$.redrawEventRect();
22901
22915
  $$.updateZoom();
22902
- state.zooming = false;
22903
22916
  // do not call event cb when is .unzoom() is called
22904
22917
  !isUnZoom && (e || state.dragging) && callFn(config.zoom_onzoomend, $$.api, (_b = $$.state.domain) !== null && _b !== void 0 ? _b : $$.zoom.getDomain());
22905
22918
  },
@@ -23038,6 +23051,11 @@ var zoom = {
23038
23051
  $el.zoomResetBtn.style("display", null);
23039
23052
  }
23040
23053
  }
23054
+ },
23055
+ getZoomTransform: function () {
23056
+ var $$ = this;
23057
+ var eventRect = $$.$el.eventRect;
23058
+ return (eventRect === null || eventRect === void 0 ? void 0 : eventRect.node()) ? zoomTransform(eventRect.node()) : { k: 1 };
23041
23059
  }
23042
23060
  };
23043
23061
 
@@ -23362,7 +23380,7 @@ var zoomModule = function () {
23362
23380
  var defaults = {};
23363
23381
  /**
23364
23382
  * @namespace bb
23365
- * @version 3.11.0
23383
+ * @version 3.11.1
23366
23384
  */
23367
23385
  var bb = {
23368
23386
  /**
@@ -23372,7 +23390,7 @@ var bb = {
23372
23390
  * bb.version; // "1.0.0"
23373
23391
  * @memberof bb
23374
23392
  */
23375
- version: "3.11.0",
23393
+ version: "3.11.1",
23376
23394
  /**
23377
23395
  * Generate chart
23378
23396
  * - **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.11.0
8
+ * @version 3.11.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -104,7 +104,7 @@ var Plugin = /** @class */ (function () {
104
104
  delete _this[key];
105
105
  });
106
106
  };
107
- Plugin.version = "3.11.0";
107
+ Plugin.version = "3.11.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.11.0
8
+ * @version 3.11.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -280,7 +280,7 @@ var Plugin = /** @class */ (function () {
280
280
  delete _this[key];
281
281
  });
282
282
  };
283
- Plugin.version = "3.11.0";
283
+ Plugin.version = "3.11.1";
284
284
  return Plugin;
285
285
  }());
286
286
  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.11.0
8
+ * @version 3.11.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -494,7 +494,7 @@ var Plugin = /** @class */ (function () {
494
494
  delete _this[key];
495
495
  });
496
496
  };
497
- Plugin.version = "3.11.0";
497
+ Plugin.version = "3.11.1";
498
498
  return Plugin;
499
499
  }());
500
500
  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.11.0
8
+ * @version 3.11.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -121,7 +121,7 @@ var Plugin = /** @class */ (function () {
121
121
  delete _this[key];
122
122
  });
123
123
  };
124
- Plugin.version = "3.11.0";
124
+ Plugin.version = "3.11.1";
125
125
  return Plugin;
126
126
  }());
127
127
  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.11.0
8
+ * @version 3.11.1
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -269,7 +269,7 @@ var Plugin = /** @class */ (function () {
269
269
  delete _this[key];
270
270
  });
271
271
  };
272
- Plugin.version = "3.11.0";
272
+ Plugin.version = "3.11.1";
273
273
  return Plugin;
274
274
  }());
275
275
  var Plugin$1 = Plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "billboard.js",
3
- "version": "3.11.0",
3
+ "version": "3.11.1",
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",
@@ -84,6 +84,8 @@
84
84
  "license": "MIT",
85
85
  "readmeFilename": "README.md",
86
86
  "dependencies": {
87
+ "@types/d3-selection": "^3.0.0",
88
+ "@types/d3-transition": "^3.0.0",
87
89
  "d3-axis": "^3.0.0",
88
90
  "d3-brush": "^3.0.0",
89
91
  "d3-drag": "^3.0.0",
@@ -107,8 +109,8 @@
107
109
  "@babel/preset-env": "^7.23.9",
108
110
  "@babel/preset-typescript": "^7.23.3",
109
111
  "@babel/runtime": "^7.23.9",
110
- "@commitlint/cli": "18.6.0",
111
- "@commitlint/config-conventional": "^18.6.0",
112
+ "@commitlint/cli": "18.6.1",
113
+ "@commitlint/config-conventional": "^18.6.2",
112
114
  "@rollup/plugin-babel": "^6.0.4",
113
115
  "@rollup/plugin-node-resolve": "^15.2.3",
114
116
  "@rollup/plugin-replace": "^5.0.5",
@@ -123,8 +125,8 @@
123
125
  "@types/d3": "^7.4.3",
124
126
  "@types/mocha": "^10.0.6",
125
127
  "@types/sinon": "^17.0.3",
126
- "@typescript-eslint/eslint-plugin": "^7.0.1",
127
- "@typescript-eslint/parser": "^7.0.1",
128
+ "@typescript-eslint/eslint-plugin": "^7.0.2",
129
+ "@typescript-eslint/parser": "^7.0.2",
128
130
  "babel-helper-modules": "^6.0.0",
129
131
  "babel-loader": "^9.1.3",
130
132
  "babel-plugin-add-module-exports": "^1.0.4",
@@ -140,7 +142,7 @@
140
142
  "chai": "^4.3.10",
141
143
  "clean-webpack-plugin": "^4.0.0",
142
144
  "cloc": "^2.11.0",
143
- "core-js": "^3.35.1",
145
+ "core-js": "^3.36.0",
144
146
  "coveralls": "^3.1.1",
145
147
  "cross-env": "^7.0.3",
146
148
  "css-loader": "^6.10.0",
@@ -153,13 +155,13 @@
153
155
  "eslint": "^8.56.0",
154
156
  "eslint-config-naver": "^2.1.0",
155
157
  "eslint-plugin-import": "^2.29.1",
156
- "eslint-plugin-jsdoc": "^48.0.6",
158
+ "eslint-plugin-jsdoc": "^48.1.0",
157
159
  "eslint-webpack-plugin": "^4.0.1",
158
160
  "exports-loader": "^5.0.0",
159
161
  "hammer-simulator": "0.0.1",
160
- "husky": "^9.0.10",
162
+ "husky": "^9.0.11",
161
163
  "istanbul-instrumenter-loader": "^3.0.1",
162
- "istanbul-lib-instrument": "^6.0.1",
164
+ "istanbul-lib-instrument": "^6.0.2",
163
165
  "jsdoc": "^4.0.2",
164
166
  "karma": "^6.4.2",
165
167
  "karma-chai": "^0.1.0",
@@ -177,9 +179,9 @@
177
179
  "mocha": "^10.3.0",
178
180
  "node-sass": "^9.0.0",
179
181
  "regenerator-runtime": "^0.14.1",
180
- "rollup": "^4.10.0",
182
+ "rollup": "^4.12.0",
181
183
  "rollup-plugin-delete": "^2.0.0",
182
- "sass-loader": "^14.1.0",
184
+ "sass-loader": "^14.1.1",
183
185
  "semantic-release": "^23.0.2",
184
186
  "simulant": "^0.2.2",
185
187
  "sinon": "^17.0.1",
@@ -189,14 +191,14 @@
189
191
  "terser-webpack-plugin": "^5.3.10",
190
192
  "tslib": "^2.6.2",
191
193
  "typescript": "5.3.3",
192
- "webpack": "^5.90.1",
194
+ "webpack": "^5.90.3",
193
195
  "webpack-bundle-analyzer": "^4.10.1",
194
196
  "webpack-clean": "^1.2.5",
195
197
  "webpack-cli": "^5.1.4",
196
198
  "webpack-common-shake": "^2.1.0",
197
- "webpack-dev-server": "^5.0.0",
199
+ "webpack-dev-server": "^5.0.2",
198
200
  "webpack-merge": "^5.10.0",
199
- "webpackbar": "^6.0.0",
201
+ "webpackbar": "^6.0.1",
200
202
  "write-file-webpack-plugin": "^4.5.1"
201
203
  }
202
204
  }
@@ -505,6 +505,7 @@ export default class AxisRenderer {
505
505
  if (this.params.isCategory) {
506
506
  interval = tickOffset * 2;
507
507
  } else {
508
+ const scale = this.params.owner.scale.zoom ?? this.helper.scale;
508
509
  const length = this.g.select("path.domain")
509
510
  .node()
510
511
  .getTotalLength() - outerTickSize * 2;
@@ -517,7 +518,7 @@ export default class AxisRenderer {
517
518
  const next = i + 1;
518
519
 
519
520
  return next < arr.length ?
520
- this.helper.scale(arr[next]) - this.helper.scale(v) : null;
521
+ scale(arr[next]) - scale(v) : null;
521
522
  }).filter(Boolean) : [];
522
523
 
523
524
  interval = Math.min(...intervalByValue, interval);
@@ -3,7 +3,7 @@
3
3
  * billboard.js project is licensed under the MIT license
4
4
  */
5
5
  import {drag as d3Drag} from "d3-drag";
6
- import {zoomIdentity as d3ZoomIdentity, zoom as d3Zoom, ZoomTransform as d3ZoomTransform} from "d3-zoom";
6
+ import {zoomIdentity as d3ZoomIdentity, zoom as d3Zoom, zoomTransform as d3ZoomTransform} from "d3-zoom";
7
7
  import {$COMMON, $ZOOM} from "../../config/classes";
8
8
  import {callFn, diffDomain, getPointer, isFunction} from "../../module/util";
9
9
 
@@ -242,11 +242,10 @@ export default {
242
242
  return;
243
243
  }
244
244
 
245
+ state.zooming = false;
245
246
  $$.redrawEventRect();
246
247
  $$.updateZoom();
247
248
 
248
- state.zooming = false;
249
-
250
249
  // do not call event cb when is .unzoom() is called
251
250
  !isUnZoom && (e || state.dragging) && callFn(
252
251
  config.zoom_onzoomend,
@@ -425,5 +424,12 @@ export default {
425
424
  $el.zoomResetBtn.style("display", null);
426
425
  }
427
426
  }
427
+ },
428
+
429
+ getZoomTransform() {
430
+ const $$ = this;
431
+ const {$el: {eventRect}} = $$;
432
+
433
+ return eventRect?.node() ? d3ZoomTransform(eventRect.node()) : {k: 1};
428
434
  }
429
435
  };
@@ -72,10 +72,10 @@ export default {
72
72
  */
73
73
  getTitlePadding(): number {
74
74
  const $$ = this;
75
- const {$el, config} = $$;
75
+ const {$el: {title}, config} = $$;
76
76
 
77
77
  return (config.title_padding.top || 0) +
78
- $$.getTextRect($el.title, $TEXT.title).height +
78
+ (title ? $$.getTextRect(title, $TEXT.title).height : 0) +
79
79
  (config.title_padding.bottom || 0);
80
80
  },
81
81
  };
@@ -346,7 +346,7 @@ export default {
346
346
 
347
347
  if (!raw) {
348
348
  x += (width - (isLegendRight ? $$.getLegendWidth() : 0)) / 2;
349
- y += hasGauge ? height : (height / 2) + tHeight;
349
+ y += (hasGauge ? height : (height / 2) + tHeight) + ($$.getTitlePadding?.() ?? 0);
350
350
  }
351
351
  } else if (hasTreemap) {
352
352
  y += tHeight;
@@ -25,7 +25,7 @@ import {
25
25
  import {select as d3Select} from "d3-selection";
26
26
  import type {d3Selection} from "../../../types/types";
27
27
  import CLASS from "../../config/classes";
28
- import {capitalize, getPointer, getRectSegList, getUnique, isObjectType, isNumber, isValue, isUndefined, notEmpty} from "../../module/util";
28
+ import {capitalize, getPointer, getRectSegList, getUnique, isObjectType, isNumber, isValue, isUndefined, notEmpty, parseDate} from "../../module/util";
29
29
  import type {IDataRow, IDataIndice, TIndices} from "../data/IData";
30
30
 
31
31
  /**
@@ -423,13 +423,25 @@ export default {
423
423
  const $$ = this;
424
424
  const {config, org, scale} = $$;
425
425
  const maxDataCount = $$.getMaxDataCount();
426
- const isGrouped = type === "bar" && config.data_groups.length;
426
+ const isGrouped = type === "bar" && config.data_groups?.length;
427
427
  const configName = `${type}_width`;
428
+ const {k} = $$.getZoomTransform();
429
+ const xMinMax = <[number, number]>[
430
+ config.axis_x_min ?? org.xDomain[0],
431
+ config.axis_x_max ?? org.xDomain[1]
432
+ ].map($$.axis.isTimeSeries() ? parseDate.bind($$) : Number);
428
433
 
429
- const tickInterval = scale.zoom && !$$.axis.isCategorized() ?
430
- (org.xDomain.map(v => scale.zoom(v))
431
- .reduce((a, c) => Math.abs(a) + c) / maxDataCount
432
- ) : axis.tickInterval(maxDataCount);
434
+ let tickInterval = axis.tickInterval(maxDataCount);
435
+
436
+ if (scale.zoom && !$$.axis.isCategorized() && k > 1) {
437
+ const isSameMinMax = xMinMax.every((v, i) => v === org.xDomain[i]);
438
+
439
+ tickInterval = org.xDomain.map((v, i) => {
440
+ const value = isSameMinMax ? v : v - Math.abs(xMinMax[i]);
441
+
442
+ return scale.zoom(value);
443
+ }).reduce((a, c) => Math.abs(a) + c) / maxDataCount;
444
+ }
433
445
 
434
446
  const getWidth = (id?: string) => {
435
447
  const width = id ? config[configName][id] : config[configName];