From 7c8186681489e399a5b3c9ad555f2e6240ff03a6 Mon Sep 17 00:00:00 2001 From: Niels Holt Date: Fri, 19 Apr 2024 17:54:35 +0200 Subject: [PATCH] Split code in no-leaflet and leaflet-versions for future separation New lists of methods to handle new data: updateLastObservationFuncList, updateObservationFuncList, and updateForecastFuncList Extended the return result from Station.getVectorFormatParts to include parameter-ids and values New method: Station.datasetIsRealTime(dataSet): Return true if the timestamp of the dataset is not to old where "To old" is given by the observationGroup Station.getPeriodStat(periodIndex, forecast): Get the stat for period from/to now to/from nsObservations.observationPeriods[periodIndex]/nsObservations.forecastPeriods[periodIndex] Station.formatPeriodSta(periodIndex, forecast): Return a formated string with the stat from getPeriodStat Metadata for Observation-group for current adjusted --- bower.json | 2 +- demo/bower_components.css | 390 ++++-- demo/bower_components.js | 2025 ++++++++++++++++------------- demo/index.html | 16 +- dist/fcoo-observations.js | 869 +++---------- package.json | 2 +- src/_fcoo-observations-leaflet.js | 766 +++++++++++ src/fcoo-observations.js | 210 +-- src/location-1.js | 574 ++------ src/observation-group.js | 23 +- src/station-1.js | 56 +- 11 files changed, 2498 insertions(+), 2435 deletions(-) create mode 100644 src/_fcoo-observations-leaflet.js diff --git a/bower.json b/bower.json index 3f04338..9321703 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "fcoo-observations", - "version": "3.10.2", + "version": "3.11.0", "homepage": "https://github.com/FCOO/fcoo-observations", "authors": [ "Niels Holt" diff --git a/demo/bower_components.css b/demo/bower_components.css index b633461..574b9b6 100644 --- a/demo/bower_components.css +++ b/demo/bower_components.css @@ -1747,7 +1747,8 @@ jquery-scroll-container-variables.scss :root { --jsc-scroll-size: 10px; --jsc-scroll-padding: 10px; - --jsc-scroll-auto-padding: 10px; } + --jsc-scroll-auto-padding: 10px; +} /**************************************************** Style for default scrollbar @@ -1761,56 +1762,70 @@ html.jq-scroll-default-css { /* Size and color for Chrome, Edge etc. */ /* Track */ /* Handle */ - /* 'Hide scrollbar by setting all color and shadows */ } - html.jq-scroll-default-css * { - scrollbar-width: thin; - scrollbar-color: #cdcdcd white; } - html.jq-scroll-default-css ::-webkit-scrollbar { - width: var(--jsc-scroll-size); } - html.jq-scroll-default-css ::-webkit-scrollbar:horizontal { - height: var(--jsc-scroll-size); } - html.jq-scroll-default-css ::-webkit-scrollbar-track { - background-color: white; - box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); - border-radius: calc(var(--jsc-scroll-padding) - 2px); } - html.jq-scroll-default-css ::-webkit-scrollbar-thumb { - background-color: #cdcdcd; - border-radius: calc(var(--jsc-scroll-padding) - 2px); - border: 1px solid white; - box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5); } - html.jq-scroll-default-css ::-webkit-scrollbar-thumb:hover { - background-color: #a6a6a6; } - html.jq-scroll-default-css ::-webkit-scrollbar-thumb:active { - background-color: #606060; } - html.jq-scroll-default-css .jq-scroll-none::-webkit-scrollbar-track { - background-color: transparent; - border-radius: 0px; - box-shadow: none !important; } - html.jq-scroll-default-css .jq-scroll-none::-webkit-scrollbar-thumb { - background-color: white; - box-shadow: none !important; } + /* 'Hide scrollbar by setting all color and shadows */ +} +html.jq-scroll-default-css * { + scrollbar-width: thin; + scrollbar-color: rgb(205, 205, 205) white; +} +html.jq-scroll-default-css ::-webkit-scrollbar { + width: var(--jsc-scroll-size); +} +html.jq-scroll-default-css ::-webkit-scrollbar:horizontal { + height: var(--jsc-scroll-size); +} +html.jq-scroll-default-css ::-webkit-scrollbar-track { + background-color: white; + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); + border-radius: calc(var(--jsc-scroll-padding) - 2px); +} +html.jq-scroll-default-css ::-webkit-scrollbar-thumb { + background-color: rgb(205, 205, 205); + border-radius: calc(var(--jsc-scroll-padding) - 2px); + border: 1px solid white; + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5); +} +html.jq-scroll-default-css ::-webkit-scrollbar-thumb:hover { + background-color: rgb(166, 166, 166); +} +html.jq-scroll-default-css ::-webkit-scrollbar-thumb:active { + background-color: rgb(96, 96, 96); +} +html.jq-scroll-default-css .jq-scroll-none::-webkit-scrollbar-track { + background-color: transparent; + border-radius: 0px; + box-shadow: none !important; +} +html.jq-scroll-default-css .jq-scroll-none::-webkit-scrollbar-thumb { + background-color: white; + box-shadow: none !important; +} .jq-scroll-default.jq-scroll-container-horizontal { overflow-x: scroll; - overflow-y: hidden; } - html.no-touchevents .jq-scroll-default.jq-scroll-container-horizontal { - padding-bottom: var(--jsc-scroll-auto-padding); } - + overflow-y: hidden; +} +html.no-touchevents .jq-scroll-default.jq-scroll-container-horizontal { + padding-bottom: var(--jsc-scroll-auto-padding); +} .jq-scroll-default.jq-scroll-container-vertical { overflow-y: scroll; - overflow-x: hidden; } - html.no-touchevents .jq-scroll-default.jq-scroll-container-vertical { - padding-right: var(--jsc-scroll-auto-padding); } - + overflow-x: hidden; +} +html.no-touchevents .jq-scroll-default.jq-scroll-container-vertical { + padding-right: var(--jsc-scroll-auto-padding); +} .jq-scroll-default.jq-scroll-container-both { overflow-y: scroll; - overflow-x: scroll; } - html.no-touchevents .jq-scroll-default.jq-scroll-container-both { - padding-right: var(--jsc-scroll-auto-padding); - padding-bottom: var(--jsc-scroll-auto-padding); } - + overflow-x: scroll; +} +html.no-touchevents .jq-scroll-default.jq-scroll-container-both { + padding-right: var(--jsc-scroll-auto-padding); + padding-bottom: var(--jsc-scroll-auto-padding); +} html.no-touchevents .jq-scroll-default.jq-scroll-padding-left { - padding-left: var(--jsc-scroll-padding) !important; } + padding-left: var(--jsc-scroll-padding) !important; +} /**************************************************************** Add scroll-shadow - Not using mixin scroll-shadow-horizontal(); @@ -1821,33 +1836,42 @@ Add scroll-shadow - Not using mixin scroll-shadow-horizontal(); top: 0; left: 0; z-index: 100; - -webkit-backface-visibility: hidden; } - .jq-scroll-shadow:before { - content: ''; - display: block; - position: sticky; } + -webkit-backface-visibility: hidden; +} +.jq-scroll-shadow:before { + content: ""; + display: block; + position: sticky; +} .jq-scroll-container-vertical.jq-scroll-container-shadow { padding-top: 0 !important; - padding-bottom: 0 !important; } + padding-bottom: 0 !important; +} .jq-scroll-container-horizontal.jq-scroll-container-shadow { padding-left: 0 !important; - padding-right: 0 !important; } + padding-right: 0 !important; +} .jq-scroll-container-vertical .jq-scroll-shadow { height: 0; width: 200%; - margin-left: -50%; } - .jq-scroll-container-vertical .jq-scroll-shadow:before { - height: 6px; } - .jq-scroll-container-vertical .jq-scroll-shadow.top-left:before { - background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0)); } - .jq-scroll-container-vertical .jq-scroll-shadow.bottom-right { - top: calc( 100% - 7px); } - .jq-scroll-container-vertical .jq-scroll-shadow.bottom-right:before { - background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4)) 0 100%; - box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.4); } + margin-left: -50%; +} +.jq-scroll-container-vertical .jq-scroll-shadow:before { + height: 6px; +} +.jq-scroll-container-vertical .jq-scroll-shadow.top-left:before { + background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0)); +} +.jq-scroll-container-vertical .jq-scroll-shadow.bottom-right { + top: calc(100% - 7px); +} +.jq-scroll-container-vertical .jq-scroll-shadow.bottom-right:before { + background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.4)) 0 100%; + box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.4); +} /* //Horizontal scroll - NOT WORKING .jq-scroll-container-horizontal .jq-scroll-shadow { @@ -1870,8 +1894,8 @@ Add scroll-shadow - Not using mixin scroll-shadow-horizontal(); */ .scroll-at-start .jq-scroll-shadow.top-left, .scroll-at-end .jq-scroll-shadow.bottom-right { - display: none; } - + display: none; +} @charset "UTF-8"; /*********************************************** jquery-bootstrap.scss, @@ -4956,6 +4980,9 @@ textarea.form-control-lg { .btn-check:checked + .btn:focus-visible, :not(.btn-check) + .btn:active:focus-visible, .btn:first-child:active:focus-visible, .btn.active:focus-visible, .btn.show:focus-visible { box-shadow: var(--bs-btn-focus-box-shadow); } +.btn-check:checked:focus-visible + .btn { + box-shadow: var(--bs-btn-focus-box-shadow); +} .btn:disabled, .btn.disabled, fieldset:disabled .btn { color: var(--bs-btn-disabled-color); pointer-events: none; @@ -6499,12 +6526,11 @@ textarea.form-control-lg { --bs-accordion-btn-padding-y: 0.375rem; --bs-accordion-btn-color: var(--bs-body-color); --bs-accordion-btn-bg: var(--bs-accordion-bg); - --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e"); --bs-accordion-btn-icon-width: 1em; --bs-accordion-btn-icon-transform: rotate(-180deg); --bs-accordion-btn-icon-transition: transform 0.2s ease-in-out; - --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23052c65'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); - --bs-accordion-btn-focus-border-color: #b5bcc4; + --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23052c65' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e"); --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); --bs-accordion-body-padding-x: 0.375rem; --bs-accordion-body-padding-y: 0.375rem; @@ -6562,7 +6588,6 @@ textarea.form-control-lg { } .accordion-button:focus { z-index: 3; - border-color: var(--bs-accordion-btn-focus-border-color); outline: 0; box-shadow: var(--bs-accordion-btn-focus-box-shadow); } @@ -6580,7 +6605,7 @@ textarea.form-control-lg { border-top-left-radius: var(--bs-accordion-border-radius); border-top-right-radius: var(--bs-accordion-border-radius); } -.accordion-item:first-of-type .accordion-button { +.accordion-item:first-of-type > .accordion-header .accordion-button { border-top-left-radius: var(--bs-accordion-inner-border-radius); border-top-right-radius: var(--bs-accordion-inner-border-radius); } @@ -6591,11 +6616,11 @@ textarea.form-control-lg { border-bottom-right-radius: var(--bs-accordion-border-radius); border-bottom-left-radius: var(--bs-accordion-border-radius); } -.accordion-item:last-of-type .accordion-button.collapsed { +.accordion-item:last-of-type > .accordion-header .accordion-button.collapsed { border-bottom-right-radius: var(--bs-accordion-inner-border-radius); border-bottom-left-radius: var(--bs-accordion-inner-border-radius); } -.accordion-item:last-of-type .accordion-collapse { +.accordion-item:last-of-type > .accordion-collapse { border-bottom-right-radius: var(--bs-accordion-border-radius); border-bottom-left-radius: var(--bs-accordion-border-radius); } @@ -6604,21 +6629,21 @@ textarea.form-control-lg { padding: var(--bs-accordion-body-padding-y) var(--bs-accordion-body-padding-x); } -.accordion-flush .accordion-collapse { - border-width: 0; -} -.accordion-flush .accordion-item { +.accordion-flush > .accordion-item { border-right: 0; border-left: 0; border-radius: 0; } -.accordion-flush .accordion-item:first-child { +.accordion-flush > .accordion-item:first-child { border-top: 0; } -.accordion-flush .accordion-item:last-child { +.accordion-flush > .accordion-item:last-child { border-bottom: 0; } -.accordion-flush .accordion-item .accordion-button, .accordion-flush .accordion-item .accordion-button.collapsed { +.accordion-flush > .accordion-item > .accordion-header .accordion-button, .accordion-flush > .accordion-item > .accordion-header .accordion-button.collapsed { + border-radius: 0; +} +.accordion-flush > .accordion-item > .accordion-collapse { border-radius: 0; } @@ -7348,7 +7373,6 @@ textarea.form-control-lg { display: flex; flex-shrink: 0; align-items: center; - justify-content: space-between; padding: var(--bs-modal-header-padding); border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color); border-top-left-radius: var(--bs-modal-inner-border-radius); @@ -7913,20 +7937,12 @@ textarea.form-control-lg { background-size: 100% 100%; } -/* rtl:options: { - "autoRename": true, - "stringMap":[ { - "name" : "prev-next", - "search" : "prev", - "replace" : "next" - } ] -} */ .carousel-control-prev-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e") /*rtl:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")*/; } .carousel-control-next-icon { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") /*rtl:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e")*/; } .carousel-indicators { @@ -15086,7 +15102,7 @@ BUTTON-SELECT align-items: center; } .btn-select::after { - background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e"); + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23212529' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5L8 11L14 5'/%3e%3c/svg%3e"); flex-shrink: 0; width: 1em; height: 1em; @@ -15180,17 +15196,26 @@ HEADER-CONTENT word-break: keep-all; } .header-content .header-icon-container { + --icon-height: auto; + --icon-width: 1em; + --icon-margin-left: .2em; + --icon-border-radius: 50%; + --font-size: calc(var(--bs-modal-content-font-size)* 4 / 3); + --container-height: calc( 1.5 * var(--bs-modal-content-font-size) + 2 * var(--bs-modal-header-padding-y) ); display: flex; - align-items: baseline; + align-items: center; pointer-events: initial; flex-shrink: 0; justify-content: space-between; margin-left: auto; margin-right: 0; - font-size: 1.3333333333em; + margin-top: calc(-1 * var(--bs-modal-header-padding-y)); + margin-bottom: calc(-1 * var(--bs-modal-header-padding-y)); + height: var(--container-height); + font-size: var(--font-size); } .header-content .header-icon-container > * { - margin-left: 0.2em; + margin-left: var(--icon-margin-left); } .header-content .header-icon-container .fa-stack { height: 1em; @@ -15198,11 +15223,12 @@ HEADER-CONTENT line-height: 1em; } .header-content .header-icon-container .header-icon { - width: 1em; + height: var(--icon-height); + width: var(--icon-width); text-align: center; cursor: pointer; color: var(--jb-header-color); - border-radius: 50%; + border-radius: var(--icon-border-radius); } .header-content .header-icon-container .header-icon.hidden { display: none; @@ -15216,6 +15242,51 @@ HEADER-CONTENT top: -0.25em; left: -0.3em; } +.header-content .header-icon-container.with-square-icons { + --icon-height: 100%; + --icon-width: 1.3em; + --font-size: calc(var(--bs-modal-content-font-size)* 5 / 4); + --icon-margin-left: 0; + --icon-border-radius: 0; + --icon-bg: none; + --icon-hover-bg: rgba(0,0,0, .10); + --icon-active-bg: rgba(0,0,0, .15); + margin-right: calc(-1 * var(--bs-modal-header-padding-x)); +} +.header-content .header-icon-container.with-square-icons .header-icon { + background-color: var(--icon-bg); + padding-top: calc(var(--container-height) / 2 - (var(--font-size)) / 2); +} +.header-content .header-icon-container.with-square-icons .header-icon:hover, .header-content .header-icon-container.with-square-icons .header-icon:active { + box-shadow: none; +} +.header-content .header-icon-container.with-square-icons .header-icon:hover { + color: var(--icon-hover-color); + background-color: var(--icon-hover-bg); +} +.header-content .header-icon-container.with-square-icons .header-icon:active { + color: var(--icon-hover-color); + background-color: var(--icon-active-bg); +} +.header-content .header-icon-container.with-square-icons .header-icon:last-child { + border-top-right-radius: var(--bs-modal-inner-border-radius); +} +.header-content .header-icon-container.with-square-icons .header-icon.header-icon-close { + width: var(--container-height); + --icon-hover-color: white; + --icon-hover-bg: #dc3545; + --icon-active-bg: #bd2130; +} +.header-content .header-icon-container.with-square-icons .header-icon.header-icon-warning { + --icon-bg: #ffc107; + --icon-hover-bg: #edb100; + --icon-active-bg: #d39e00; +} +.header-content .header-icon-container.with-square-icons .header-icon.header-icon-selected { + --icon-bg: rgb(30, 144, 255); + --icon-hover-bg: #0583ff; + --icon-active-bg: #0077ea; +} /************************ FOOTER-CONTENT @@ -15237,6 +15308,8 @@ div.modal-footer { color: var(--jb-footer-color); background-color: var(--jb-footer-bg); border-top: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color); + border-bottom-right-radius: var(--bs-modal-inner-border-radius); + border-bottom-left-radius: var(--bs-modal-inner-border-radius); } .footer-content.no-border, .no-border.jb-footer-content { border-top: none; @@ -15531,30 +15604,51 @@ div.modal-dialog.modal-flex-width .modal-content .modal-body > .jquery-scroll-co div.modal-dialog .modal-content { word-break: break-word; word-wrap: break-word; + overflow: hidden; + --display: block; + /* + Special header version for minimized modal windows + There are tree modes for minimized-content: + normal: Only show icons + hide : nothing class=modal-minimized-hide-header + full : both text and icons class=modal-minimized-full-header + */ } div.modal-dialog .modal-content.no-shadow { box-shadow: none; } +div.modal-dialog .modal-content.modal-minimized .show-for-modal-minimized { + display: var(--display) !important; +} div.modal-dialog .modal-content.modal-minimized .hide-for-modal-minimized { display: none !important; } +div.modal-dialog .modal-content.modal-minimized .hide-for-no-modal-minimized { + display: var(--display) !important; +} div.modal-dialog .modal-content.modal-minimized .show-for-no-modal-minimized { display: none !important; } +div.modal-dialog .modal-content.no-modal-minimized .hide-for-modal-minimized { + display: var(--display) !important; +} div.modal-dialog .modal-content.no-modal-minimized .show-for-modal-minimized { display: none !important; } +div.modal-dialog .modal-content.no-modal-minimized .show-for-no-modal-minimized { + display: var(--display) !important; +} div.modal-dialog .modal-content.no-modal-minimized .hide-for-no-modal-minimized { display: none !important; } div.modal-dialog .modal-content.modal-minimized > .show-for-modal-minimized { - display: initial !important; + display: var(--display) !important; } div.modal-dialog .modal-content.modal-minimized > .hide-for-modal-minimized { display: none !important; } div.modal-dialog .modal-content.no-modal-minimized > .hide-for-modal-minimized { - display: initial !important; + display: var(--display) !important; } div.modal-dialog .modal-content.no-modal-minimized > .show-for-modal-minimized { display: none !important; @@ -15583,26 +15677,38 @@ div.modal-dialog .modal-content.modal-minimized-always-max-height.no-modal-minim div.modal-dialog .modal-content.modal-minimized-always-max-height.no-modal-minimized > .show-for-modal-minimized { display: none !important; } +div.modal-dialog .modal-content.modal-normal .show-for-modal-normal { + display: var(--display) !important; +} div.modal-dialog .modal-content.modal-normal .hide-for-modal-normal { display: none !important; } +div.modal-dialog .modal-content.modal-normal .hide-for-no-modal-normal { + display: var(--display) !important; +} div.modal-dialog .modal-content.modal-normal .show-for-no-modal-normal { display: none !important; } +div.modal-dialog .modal-content.no-modal-normal .hide-for-modal-normal { + display: var(--display) !important; +} div.modal-dialog .modal-content.no-modal-normal .show-for-modal-normal { display: none !important; } +div.modal-dialog .modal-content.no-modal-normal .show-for-no-modal-normal { + display: var(--display) !important; +} div.modal-dialog .modal-content.no-modal-normal .hide-for-no-modal-normal { display: none !important; } div.modal-dialog .modal-content.modal-normal > .show-for-modal-normal { - display: initial !important; + display: var(--display) !important; } div.modal-dialog .modal-content.modal-normal > .hide-for-modal-normal { display: none !important; } div.modal-dialog .modal-content.no-modal-normal > .hide-for-modal-normal { - display: initial !important; + display: var(--display) !important; } div.modal-dialog .modal-content.no-modal-normal > .show-for-modal-normal { display: none !important; @@ -15631,26 +15737,38 @@ div.modal-dialog .modal-content.modal-normal-always-max-height.no-modal-normal > div.modal-dialog .modal-content.modal-normal-always-max-height.no-modal-normal > .show-for-modal-normal { display: none !important; } +div.modal-dialog .modal-content.modal-extended .show-for-modal-extended { + display: var(--display) !important; +} div.modal-dialog .modal-content.modal-extended .hide-for-modal-extended { display: none !important; } +div.modal-dialog .modal-content.modal-extended .hide-for-no-modal-extended { + display: var(--display) !important; +} div.modal-dialog .modal-content.modal-extended .show-for-no-modal-extended { display: none !important; } +div.modal-dialog .modal-content.no-modal-extended .hide-for-modal-extended { + display: var(--display) !important; +} div.modal-dialog .modal-content.no-modal-extended .show-for-modal-extended { display: none !important; } +div.modal-dialog .modal-content.no-modal-extended .show-for-no-modal-extended { + display: var(--display) !important; +} div.modal-dialog .modal-content.no-modal-extended .hide-for-no-modal-extended { display: none !important; } div.modal-dialog .modal-content.modal-extended > .show-for-modal-extended { - display: initial !important; + display: var(--display) !important; } div.modal-dialog .modal-content.modal-extended > .hide-for-modal-extended { display: none !important; } div.modal-dialog .modal-content.no-modal-extended > .hide-for-modal-extended { - display: initial !important; + display: var(--display) !important; } div.modal-dialog .modal-content.no-modal-extended > .show-for-modal-extended { display: none !important; @@ -15688,20 +15806,31 @@ div.modal-dialog .modal-content.no-modal-pinned .show-for-modal-pinned { div.modal-dialog .modal-content:not(.modal-fixed-height).modal-minimized:not(.modal-minimized-always-max-height), div.modal-dialog .modal-content:not(.modal-fixed-height).modal-normal:not(.modal-normal-always-max-height), div.modal-dialog .modal-content:not(.modal-fixed-height).modal-extended:not(.modal-extended-always-max-height) { height: auto !important; } -div.modal-dialog .modal-content .modal-body p { +div.modal-dialog .modal-content .modal-body, div.modal-dialog .modal-content .modal-body-fixed { + --inner-height: auto; + --inner-max-height: none; + height: var(--inner-height); + max-height: var(--inner-max-height); +} +div.modal-dialog .modal-content .modal-body p, div.modal-dialog .modal-content .modal-body-fixed p { margin: 0; } -div.modal-dialog .modal-content .modal-body ol, div.modal-dialog .modal-content .modal-body ul, div.modal-dialog .modal-content .modal-body dl { +div.modal-dialog .modal-content .modal-body ol, div.modal-dialog .modal-content .modal-body ul, div.modal-dialog .modal-content .modal-body dl, div.modal-dialog .modal-content .modal-body-fixed ol, div.modal-dialog .modal-content .modal-body-fixed ul, div.modal-dialog .modal-content .modal-body-fixed dl { margin: 0; padding-left: 2em; } -div.modal-dialog .modal-content .modal-body.modal-body-no-content { +div.modal-dialog .modal-content .modal-body.modal-body-no-content, div.modal-dialog .modal-content .modal-body-fixed.modal-body-no-content { display: none !important; } -div.modal-dialog .modal-content .modal-body.modal-body-always-max-height { +div.modal-dialog .modal-content .modal-body.modal-body-always-max-height, div.modal-dialog .modal-content .modal-body-fixed.modal-body-always-max-height { display: flex; flex-direction: column; - height: fit-content; + --inner-height: fit-content; +} +div.modal-dialog .modal-content .modal-body.center-middle-content, div.modal-dialog .modal-content .modal-body-fixed.center-middle-content { + --display: flex; + align-items: center; + justify-content: center; } div.modal-dialog .modal-content:not(.modal-extended) .modal-body.hide-for-modal-extended.modal-body-no-content ~ .modal-footer, div.modal-dialog .modal-content.modal-extended .modal-body.show-for-modal-extended.modal-body-no-content ~ .modal-footer { border-top: none; @@ -15709,17 +15838,17 @@ div.modal-dialog .modal-content:not(.modal-extended) .modal-body.hide-for-modal- div.modal-dialog .modal-content.modal-minimized.modal-minimized-hide-header .modal-header { display: none; } -div.modal-dialog .modal-content.modal-minimized .modal-header .header-icon-container { +div.modal-dialog .modal-content.modal-minimized:not(.modal-minimized-full-header) .modal-header .header-icon-container { flex-wrap: wrap; flex-shrink: initial; flex-grow: 1; margin-top: -0.2em; } -div.modal-dialog .modal-content.modal-minimized .modal-header .header-icon-container > * { +div.modal-dialog .modal-content.modal-minimized:not(.modal-minimized-full-header) .modal-header .header-icon-container > * { margin-top: 0.2em; margin-left: 0; } -div.modal-dialog .modal-content.modal-minimized .modal-header > :not(.header-icon-container) { +div.modal-dialog .modal-content.modal-minimized:not(.modal-minimized-full-header) .modal-header > :not(.header-icon-container) { display: none; } div.modal-dialog .modal-content .modal-body-fixed { @@ -15731,6 +15860,9 @@ div.modal-dialog .modal-content .modal-body-fixed { div.modal-dialog .modal-content .modal-body-fixed:empty { display: none !important; } +div.modal-dialog .modal-content .modal-body-fixed.with-border { + border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color); +} div.modal-dialog .modal-content .modal-body { flex-shrink: 1; flex-grow: 1; @@ -15787,6 +15919,27 @@ div.modal-dialog .modal-body-with-vertical-padding.modal-body-with-horizontal-pa padding-right: var(--bs-modal-padding-x); } +/**************************************************** +Adjustmernts when the modal is inside a fixed container +****************************************************/ +.modal-fixed-container .modal { + display: block; + position: relative; +} +.modal-fixed-container .modal .modal-dialog { + height: auto !important; +} + +/**************************************************** +Common styles to be used when a modal is being dragged +****************************************************/ +.modal.modal-dragging, .modal-dragging .modal { + --jb-header-color: white; + --jb-header-bg: #0d6efd; + border-radius: calc(0.5 * var(--bs-modal-border-radius)); + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} + /************************************************************ MODAL-BACKDROP @@ -39348,6 +39501,11 @@ Defaults is = DALO color in "Forsvarsministeriets koncernfælles Designmanual 20 Can be changed by mixin application-base-color( new-color ) in src/_fcoo-color-mixin.scss **********************************************************/ +/********************************************************** +Environmental colors +Defines a number of colors and $-variables for different +parts of the environmental. Eq sky, cloud, sea etc. +**********************************************************/ /********************************************************** fcoo-colors-mixin.scss @@ -40299,6 +40457,24 @@ Different versions of sub-icons can be created using different methods in namesp bottom: -0.09375em; } +.fa-size-15 { + font-size: 0.938em; + line-height: 0.067em; + vertical-align: 0.025em; +} + +.fa-size-14 { + font-size: 0.875em; + line-height: 0.071em; + vertical-align: 0.054em; +} + +.fa-size-13 { + font-size: 0.813em; + line-height: 0.077em; + vertical-align: 0.087em; +} + /***************************************************** Classes to disable transition, transform, or animation *****************************************************/ diff --git a/demo/bower_components.js b/demo/bower_components.js index 785bbec..f86d41e 100644 --- a/demo/bower_components.js +++ b/demo/bower_components.js @@ -61565,13 +61565,13 @@ return index; if (isVertical){ noScroll = elem.scrollHeight <= elem.clientHeight; position = elem.scrollTop <= 0 ? 'start' : - elem.scrollTop >= elem.scrollHeight - elem.clientHeight ? 'end' : + Math.ceil(elem.scrollTop) >= elem.scrollHeight - elem.clientHeight ? 'end' : null; } else { noScroll = elem.scrollWidth < elem.clientWidth; position = elem.scrollLeft <= 0 ? 'start' : - elem.scrollLeft >= elem.scrollWidth - elem.clientWidth ? 'end' : + Math.ceil(elem.scrollLeft) >= elem.scrollWidth - elem.clientWidth ? 'end' : null; } @@ -78936,51 +78936,86 @@ uri : {default: "Please enter a valid URI"} diminish pin unpin - + new + warning + info + help close (x) + */ + + /* + There are two ways to display icon-buttons on the header: + 1: Small icons inside round borders (default), or + 2: Full sized icons with square background changing color on hover - a la MS Windows + + Popups and Noty always uses 1. + + For bsModals a global variablecan be set to use square icons + + bsHeaderIcons and bsHeaderIconsSquare = {icon, className, title} for the different icons on the header. Set by function to allow updating $.FONTAWESOME_PREFIX_?? + */ - //$.bsHeaderIcons = class-names for the different icons on the header. Set by function to allow updating $.FONTAWESOME_PREFIX_?? - $.bsHeaderIcons = {}; - $._set_bsHeaderIcons = function( forceOptions = {}){ + $.BSMODAL_USE_SQUARE_ICONS = $.BSMODAL_USE_SQUARE_ICONS || false; - $.bsHeaderIcons = $.extend( $.bsHeaderIcons, { - back : 'fa-circle-chevron-left', - forward : 'fa-circle-chevron-right', + let bsHeaderIcons = {}, + bsHeaderIconsSquare = {}; - pin : ['fas fa-thumbtack fa-inside-circle', $.FONTAWESOME_PREFIX_STANDARD + ' fa-circle'], - unpin : 'fa-thumbtack', + function adjustHeaderIcon( headerIcon ){ + if ((typeof headerIcon == 'string') || Array.isArray(headerIcon)) + headerIcon = {icon: headerIcon}; + return headerIcon; + } - extend : 'fa-chevron-circle-up', - diminish: 'fa-chevron-circle-down', + function adjustHeaderIcons( headerIcons ){ + $.each( headerIcons, (id, cont) => { + headerIcons[id] = adjustHeaderIcon(cont); + }); + return headerIcons; + } + function getDefaultHeaderIcons( square ){ + return adjustHeaderIcons({ + back : square ? 'fas fa-arrow-left' : 'fa-circle-chevron-left', + forward : square ? 'fas fa-arrow-right' : 'fa-circle-chevron-right', + pin : square ? 'fa-thumbtack' : ['fas fa-thumbtack fa-inside-circle', $.FONTAWESOME_PREFIX_STANDARD + ' fa-circle'], + unpin : { + icon: 'fa-thumbtack', + class: square ? 'header-icon-selected' : null + }, - new : [ $.FONTAWESOME_PREFIX_STANDARD + ' fa-window-maximize fa-inside-circle2', - $.FONTAWESOME_PREFIX_STANDARD + ' fa-circle' ], + extend : square ? 'fa-square-plus' : 'fa-chevron-circle-up', + diminish: square ? 'fa-square-minus' : 'fa-chevron-circle-down', - warning : [ 'fas fa-circle back text-warning', - $.FONTAWESOME_PREFIX_STANDARD + ' fa-circle', - 'fas fa-exclamation fa-inside-circle-xmark' ], - info : 'fa-circle-info', - help : 'fa-circle-question', + new : square ? 'fa-window-maximize' : [ $.FONTAWESOME_PREFIX_STANDARD + ' fa-window-maximize fa-inside-circle2', $.FONTAWESOME_PREFIX_STANDARD + ' fa-circle'], - close : [ 'fas fa-circle show-for-hover fa-hover-color-red', - 'fa-xmark fa-inside-circle-xmark fa-hover-color-white', - $.FONTAWESOME_PREFIX_STANDARD+' fa-circle' ] + warning : { + icon : square ? 'fa-exclamation' : [ 'fas fa-circle back text-warning', $.FONTAWESOME_PREFIX_STANDARD + ' fa-circle', 'fas fa-exclamation fa-inside-circle-xmark'], + class: square ? 'header-icon-warning' : null + }, - }, forceOptions ); - }; - $._set_bsHeaderIcons(); + info : square ? 'fa-info' : 'fa-circle-info', + help : square ? 'fa-question' : 'fa-circle-question', - //mandatoryHeaderIconClass = mandatory class-names and title for the different icons on the header - var mandatoryHeaderIconClassAndTitle = { - close : {/*class:'',*/ title: {da:'Luk', en:'Close'}}, + close : { + icon : square ? 'fas fa-xmark' : ['fas fa-circle show-for-hover fa-hover-color-red', 'fa-xmark fa-inside-circle-xmark fa-hover-color-white', $.FONTAWESOME_PREFIX_STANDARD+' fa-circle'], + title: {da:'Luk', en:'Close'}, + class: square ? 'header-icon-close' : null + } + }); + } + + $._set_bsHeaderIcons = function( newHeaderIcons = {}, newHeaderIconsSquare = {}){ + bsHeaderIcons = $.extend(true, getDefaultHeaderIcons(), bsHeaderIcons, adjustHeaderIcons(newHeaderIcons) ); + bsHeaderIconsSquare = $.extend(true, getDefaultHeaderIcons(true), bsHeaderIconsSquare, adjustHeaderIcons(newHeaderIconsSquare) ); }; + $._set_bsHeaderIcons(); + /****************************************************** - _bsHeaderAndIcons(options) + _bsHeaderAndIcons(options, useSquareIcons) Create the text and icon content of a header inside this options: { headerClassName: [string] @@ -78995,23 +79030,24 @@ uri : {default: "Please enter a valid URI"} event.stopImmediatePropagation(); } - $.fn._bsHeaderAndIcons = function(options){ + $.fn._bsHeaderAndIcons = function(options, useSquareIcons){ var $this = this; options = $.extend( true, {text:'DAVS MED DIG', headerClassName: '', inclHeader: true, icons: {} }, options ); - this.addClass( options.headerClassName ); - this.addClass('header-content'); + this + .addClass( options.headerClassName ) + .addClass('header-content'); if (options.inclHeader){ options.header = $._bsAdjustIconAndText(options.header); //If header contents more than one text => set the first to "fixed" so that only the following text are truncated - if ($.isArray(options.header) && (options.header.length > 1)){ + if (Array.isArray(options.header) && (options.header.length > 1)) options.header[0].textClass = 'fixed-header'; - } + this._bsAddHtml( options.header || $.EMPTY_TEXT ); } //Add icons (if any) - if ( !$.isEmptyObject(options.icons) ) { + if ( !$.isEmptyObject(options.icons) ){ //Container for icons var $iconContainer = $('
') @@ -79019,22 +79055,23 @@ uri : {default: "Please enter a valid URI"} baseClass :'header-icon-container', useTouchSize: true }) + .toggleClass('with-square-icons', !!useSquareIcons) .appendTo( this ); //Add icons - $.each( ['back', 'forward', 'pin', 'unpin', 'extend', 'diminish', 'new', 'warning', 'info', 'help', 'close'], function( index, id ){ - var iconOptions = options.icons[id], - classAndTitle = mandatoryHeaderIconClassAndTitle[id] || {}; - - if (iconOptions && iconOptions.onClick){ - var icon = iconOptions.icon || $.bsHeaderIcons[id]; - icon = $.isArray(icon) ? icon : [icon]; + let headerIcons = useSquareIcons ? bsHeaderIconsSquare : bsHeaderIcons; + ['back', 'forward', 'pin', 'unpin', 'extend', 'diminish', 'new', 'warning', 'info', 'help', 'close'].forEach( (id) => { + let iconOptions = options.icons[id]; + if (iconOptions && (iconOptions.onClick || (typeof iconOptions == 'function'))){ + if (typeof iconOptions == 'function') + iconOptions = {onClick: iconOptions}; + iconOptions = $.extend(true, {}, headerIcons[id] || {}, iconOptions); $._bsCreateIcon( - icon, + Array.isArray(iconOptions.icon) ? iconOptions.icon : [iconOptions.icon], $iconContainer, - iconOptions.title || classAndTitle.title || '', - (iconOptions.className || '') + ' header-icon ' + (classAndTitle.class || '') + iconOptions.title || '', + 'header-icon ' + (iconOptions.className || '') + ' ' + (iconOptions.class || '') ) .toggleClass('hidden', !!iconOptions.hidden) .toggleClass('disabled', !!iconOptions.disabled) @@ -79612,7 +79649,6 @@ options var objectWithFileClasses = 'border-0 w-100 h-100'; - //$.bsHeaderIcons = class-names for the different icons on the header $.bsExternalLinkIcon = 'fa-external-link-alt'; /********************************************************** @@ -80161,6 +80197,9 @@ jquery-bootstrap-modal-promise.js alwaysMaxHeight: BOOLEAN - If true the modal is always the full height of it parent + innerHeight : The fixed height of the content + innerMaxHeight : The fixed max-height of the content + flexWidth extraWidth megaWidth @@ -80176,15 +80215,18 @@ jquery-bootstrap-modal-promise.js minimized, extended: { type + showHeader (only minimized) if true the header is also shown in minimized-mode showHeaderOnClick (only minimized) - fixedContent + fixedContent, fixed: content or true. If true the content is equal to normal or extended/minimized noVerticalPadding noHorizontalPadding alwaysMaxHeight + innerHeight + innerMaxHeight content verticalButtons: BOOLEAN, default = options.verticalButtons, if true the buttons are vertical stacked and has width = 100%. If false and options.verticalButtons = true only normal gets vertival buttons scroll: boolean | 'vertical' | 'horizontal' - footer + footer: content or true. If true the content is equal to normal or extended/minimized } isExtended: boolean footer @@ -80432,9 +80474,9 @@ jquery-bootstrap-modal-promise.js //If options.extended.fixedContent == true and/or options.extended.footer == true => normal and extended uses same fixed and/or footer content if (options.extended) { //If common fixed content => add it as normal fixed content - if ((options.fixedContent === true) || (options.extended.fixedContent === true)) { + if ((options.fixedContent === true) || (options.extended.fixedContent === true) || (options.extended.fixed === true)) { options.fixedContent = options.fixedContent === true ? options.extended.fixedContent : options.fixedContent; - options.extended.fixedContent = options.extended.fixedContent === true ? options.fixedContent : options.extended.fixedContent; + options.extended.fixedContent = ((options.extended.fixedContent === true) || (options.extended.fixed === true)) ? options.fixedContent : options.extended.fixedContent; } //If common footer content => add it as extended footer content @@ -80443,6 +80485,15 @@ jquery-bootstrap-modal-promise.js options.extended.footer = options.extended.footer === true ? options.footer : options.extended.footer; } } + + //If options.minimized.fixedContent/fixed == true and/or options.minimized.footer == true => normal and minimized uses same fixed and/or footer content + if (options.minimized){ + if ((options.minimized.fixedContent === true) || (options.minimized.fixed === true)) + options.minimized.fixedContent = options.fixedContent; + + if (options.minimized.footer === true) + options.minimized.footer = options.footer; + } } @@ -80520,7 +80571,7 @@ jquery-bootstrap-modal-promise.js //Update header var $iconContainer = this.bsModal.$header.find('.header-icon-container').detach(); - updateElement(this.bsModal.$header, options, '_bsHeaderAndIcons'); + updateElement(this.bsModal.$header, options, '_bsHeaderAndIcons', $.BSMODAL_USE_SQUARE_ICONS); this.bsModal.$header.append($iconContainer); _updateFixedAndFooterInOptions(options); @@ -80586,9 +80637,22 @@ jquery-bootstrap-modal-promise.js return result ? 'alert-'+result : ''; } + function setInnerHeightAndInnerMaxHeight($elem, options){ + if (options.innerHeight) + $elem.css('--inner-height', typeof options.innerHeight == 'number' ? options.innerHeight + 'px' : options.innerHeight ); + if (options.innerMaxHeight) + $elem.css('--inner-max-height', typeof options.innerMaxHeight == 'number' ? options.innerMaxHeight + 'px' : options.innerMaxHeight ); + } + //Append fixed content (if any) + //If fixedContent.contetn exists => fixedContent is also the options for the fixed content //options.fixedContentOptions = options different from content for fixed-content - var fixedOptions = $.extend({}, options, options.fixedContentOptions || {}), + var fixedOptions = $.extend({}, + options, + {innerHeight:'auto', innerMaxheight: 'none'}, + options.fixedContent && options.fixedContent.content ? options.fixedContent : {}, + options.fixedContentOptions || {} + ), $modalFixedContent = parts.$fixedContent = $('
') .addClass('modal-body-fixed') @@ -80599,12 +80663,16 @@ jquery-bootstrap-modal-promise.js .toggleClass('pb-0', !!fixedOptions.noBottomPadding) .toggleClass('px-0', !!fixedOptions.noHorizontalPadding) .toggleClass('modal-body-semi-transparent', !!fixedOptions.semiTransparent) + .toggleClass('center-middle-content', !!fixedOptions.centerMiddle) + .toggleClass('with-border', !!(fixedOptions.withBorder || fixedOptions.bottomBorder || fixedOptions.border)) .addClass( getAlertClass(fixedOptions) ) .addClass(options.fixedClassName || '') .appendTo( this ); - if (options.fixedContent) - $modalFixedContent._bsAppendContent( options.fixedContent, options.fixedContentContext, null, options ); + if (options.fixedContent){ + $modalFixedContent._bsAppendContent( options.fixedContent.content ? options.fixedContent.content : options.fixedContent, options.fixedContentContext, null, options ); + setInnerHeightAndInnerMaxHeight($modalFixedContent, fixedOptions); + } //Append body and content var $modalBody = parts.$body = @@ -80614,14 +80682,16 @@ jquery-bootstrap-modal-promise.js .toggleClass('py-0', !!options.noVerticalPadding) .toggleClass('px-0', !!options.noHorizontalPadding) .toggleClass('modal-body-semi-transparent', !!options.semiTransparent) + .toggleClass('center-middle-content', !!options.centerMiddle) .addClass( getAlertClass(options) ) .addClass(options.className || '') .appendTo( this ); + setInnerHeightAndInnerMaxHeight($modalBody, options); + if (!options.content || (options.content === {})) $modalBody.addClass('modal-body-no-content'); - var $modalContent = parts.$content = hasScroll ? $modalBody @@ -80738,26 +80808,28 @@ jquery-bootstrap-modal-promise.js //Set bsModal.cssWidth this.bsModal.cssWidth[MODAL_SIZE_NORMAL] = getWidthFromOptions( options ); + + function useNormalWidth(options = {}){ + return (options.width == true) || + ( (options.flexWidth == undefined) && + (options.extraWidth == undefined) && + (options.megaWidth == undefined) && + (options.maxWidth == undefined) && + (options.fullWidth == undefined) && + (options.fullScreen == undefined) && + (options.fullScreenWithBorder == undefined) && + (options.width == undefined) + ); + } + if (options.minimized) - this.bsModal.cssWidth[MODAL_SIZE_MINIMIZED] = getWidthFromOptions(options.minimized); + //If options.minimized.width == true or none width-options is set in extended => use same width as normal-mode + this.bsModal.cssWidth[MODAL_SIZE_MINIMIZED] = useNormalWidth(options.minimized) ? this.bsModal.cssWidth[MODAL_SIZE_NORMAL] : getWidthFromOptions( options.minimized ); - if (options.extended){ + if (options.extended) //If options.extended.width == true or none width-options is set in extended => use same width as normal-mode - if ( (options.extended.width == true) || - ( (options.extended.flexWidth == undefined) && - (options.extended.extraWidth == undefined) && - (options.extended.megaWidth == undefined) && - (options.extended.maxWidth == undefined) && - (options.extended.fullWidth == undefined) && - (options.extended.fullScreen == undefined) && - (options.extended.fullScreenWithBorder == undefined) && - (options.extended.width == undefined) - ) - ) - this.bsModal.cssWidth[MODAL_SIZE_EXTENDED] = this.bsModal.cssWidth[MODAL_SIZE_NORMAL]; - else - this.bsModal.cssWidth[MODAL_SIZE_EXTENDED] = getWidthFromOptions( options.extended ); - } + this.bsModal.cssWidth[MODAL_SIZE_EXTENDED] = useNormalWidth(options.extended) ? this.bsModal.cssWidth[MODAL_SIZE_NORMAL] : this.bsModal.cssWidth[MODAL_SIZE_EXTENDED] = getWidthFromOptions( options.extended ); + var $modalContent = this.bsModal.$modalContent = $('
') @@ -80827,10 +80899,10 @@ jquery-bootstrap-modal-promise.js unpin : { className: 'show-for-modal-pinned', onClick: options.onPin ? modalUnpin : null }, extend : { className: iconExtendClassName, onClick: multiSize ? modalExtend : null, altEvents:'swipeup' }, diminish: { className: iconDiminishClassName, onClick: multiSize ? modalDiminish : null, altEvents:'swipedown' }, - new : { className: '', onClick: options.onNew ? $.proxy(options.onNew, this) : null }, - info : { className: '', onClick: options.onInfo ? $.proxy(options.onInfo, this) : null }, - warning : { className: '', onClick: options.onWarning ? $.proxy(options.onWarning, this) : null }, - help : { className: '', onClick: options.onHelp ? $.proxy(options.onHelp, this) : null }, + new : { onClick: options.onNew ? $.proxy(options.onNew, this) : null }, + info : { onClick: options.onInfo ? $.proxy(options.onInfo, this) : null }, + warning : { onClick: options.onWarning ? $.proxy(options.onWarning, this) : null }, + help : { onClick: options.onHelp ? $.proxy(options.onHelp, this) : null }, } }, options ); @@ -80873,7 +80945,7 @@ jquery-bootstrap-modal-promise.js if (!options.noHeader && (options.header || !$.isEmptyObject(options.icons) ) ){ var $modalHeader = this.bsModal.$header = $('
') - ._bsHeaderAndIcons( options ) + ._bsHeaderAndIcons( options, $.BSMODAL_USE_SQUARE_ICONS ) .appendTo( $modalContent ); //Add dbl-click on header to change to/from extended @@ -80889,6 +80961,12 @@ jquery-bootstrap-modal-promise.js //Create minimized content if (options.minimized){ this.bsModal.minimized = {}; + + if (options.minimized.showHeader){ + $modalContent.addClass('modal-minimized-full-header'); + options.minimized.showHeaderOnClick = false; + } + else { $modalContent.addClass('modal-minimized-hide-header'); var bsModalToggleMinimizedHeader = $.proxy(this._bsModalToggleMinimizedHeader, this); options.minimized.onClick = @@ -80896,9 +80974,10 @@ jquery-bootstrap-modal-promise.js bsModalToggleMinimizedHeader : modalExtend; - //Close header when a icon is clicked - if (options.minimized.showHeaderOnClick) - this.bsModal.$header.on('click', bsModalToggleMinimizedHeader); + //Close header when a icon is clicked + if (options.minimized.showHeaderOnClick) + this.bsModal.$header.on('click', bsModalToggleMinimizedHeader); + } $modalContent._bsModalBodyAndFooter( MODAL_SIZE_MINIMIZED/*'minimized'*/, options.minimized, this.bsModal.minimized, '', initSize, parentOptions ); @@ -80910,6 +80989,7 @@ jquery-bootstrap-modal-promise.js this.bsModal.cssHeight[MODAL_SIZE_MINIMIZED] = null; } + } //Create normal content @@ -81038,7 +81118,6 @@ jquery-bootstrap-modal-promise.js _bsModalSetHeightAndWidth - Set the height and width according to current cssHeight and cssWidth ******************************************************/ $.fn._bsModalSetHeightAndWidth = function(){ - var bsModal = this.bsModal, $modalContent = get$modalContent(this), $modalDialog = $modalContent.parent(), @@ -81046,6 +81125,11 @@ jquery-bootstrap-modal-promise.js cssHeight = bsModal.cssHeight[size], cssWidth = bsModal.cssWidth[size]; + if (!cssWidth){ + this._bsModalSetSize(MODAL_SIZE_NORMAL); + return; + } + //Set height $modalContent .toggleClass('modal-fixed-height', !!cssHeight) @@ -81108,7 +81192,6 @@ jquery-bootstrap-modal-promise.js this._bsModalSetSizeClass(size); this._bsModalSetHeightAndWidth(); - /* NOTE: 2021-04-16 Original this methods returns false to prevent onclick-event on the header. @@ -81223,6 +81306,21 @@ jquery-bootstrap-modal-promise.js options.extended.relativeHeightOffset = 0; } + //Set options for a modal inside a container + if (options.$container){ + options.show = true; + options.fullWidth = !options.width; + if (options.minimized){ + options.minimized.width = options.minimized.width || options.width; + options.minimized.fullWidth = !options.minimized.width; + } + if (options.extended){ + options.extended.width = options.extended.width || options.width; + options.extended.fullWidth = !options.extended.width; + options.extended.height = options.extended.height || true; + } + } + //Create the modal $result = @@ -81281,17 +81379,24 @@ jquery-bootstrap-modal-promise.js $result.getHeaderIcon('forward').css('visibility', 'hidden'); } - $result.on({ - 'show.bs.modal' : $.proxy(show_bs_modal, $result),//show_bs_modal, - 'shown.bs.modal' : shown_bs_modal, - 'hide.bs.modal' : $.proxy(hide_bs_modal, $result), - 'hidden.bs.modal': hidden_bs_modal - }); + if (options.$container){ + $result.addClass('show'); + $result.appendTo( options.$container ); + options.$container.addClass('modal-fixed-container'); + } + else { + $result.on({ + 'show.bs.modal' : show_bs_modal.bind($result), + 'shown.bs.modal' : shown_bs_modal, + 'hide.bs.modal' : hide_bs_modal.bind($result), + 'hidden.bs.modal': hidden_bs_modal + }); + $result.appendTo( $('body') ); + if (options.show) + $result.show(); + } - $result.appendTo( $('body') ); - if (options.show) - $result.show(); return $result; }; @@ -83525,7 +83630,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ; /** - * @license Highstock JS v11.4.0 (2024-03-05) + * @license Highstock JS v11.4.1 (2024-04-04) * * (c) 2009-2024 Torstein Honsi * @@ -83588,13 +83693,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * Constants * * */ - Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '11.4.0', Globals.win = (typeof window !== 'undefined' ? + Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '11.4.1', Globals.win = (typeof window !== 'undefined' ? window : {}), // eslint-disable-line node/no-unsupported-features/es-builtins Globals.doc = Globals.win.document, Globals.svg = (Globals.doc && Globals.doc.createElementNS && !!Globals.doc.createElementNS(Globals.SVG_NS, 'svg').createSVGRect), Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '', Globals.isChrome = Globals.userAgent.indexOf('Chrome') !== -1, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.hasBidiBug = (Globals.isFirefox && - parseInt(Globals.userAgent.split('Firefox/')[1], 10) < 4 // issue #38 + parseInt(Globals.userAgent.split('Firefox/')[1], 10) < 4 // Issue #38 ), Globals.marginNames = [ 'plotTop', 'marginRight', @@ -83684,7 +83789,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.theme * @type {Highcharts.Options} */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file return Globals; }); @@ -83747,9 +83852,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (stop) { throw new Error(message); } - // else ... + // Else ... if (win.console && - error.messages.indexOf(message) === -1 // prevent console flooting + error.messages.indexOf(message) === -1 // Prevent console flooting ) { console.warn(message); // eslint-disable-line no-console } @@ -84514,10 +84619,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ function normalizeTickInterval(interval, multiples, magnitude, allowDecimals, hasTickAmount) { let i, retInterval = interval; - // round to a tenfold of 1, 2, 2.5 or 5 + // Round to a tenfold of 1, 2, 2.5 or 5 magnitude = pick(magnitude, getMagnitude(interval)); const normalized = interval / magnitude; - // multiples for a linear scale + // Multiples for a linear scale if (!multiples) { multiples = hasTickAmount ? // Finer grained ticks when the tick amount is hard set, including @@ -84525,7 +84630,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : // Else, let ticks fall on rounder numbers [1, 2, 2.5, 5, 10]; - // the allowDecimals option + // The allowDecimals option if (allowDecimals === false) { if (magnitude === 1) { multiples = multiples.filter(function (num) { @@ -84537,10 +84642,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } } - // normalize the interval to the nearest multiple + // Normalize the interval to the nearest multiple for (i = 0; i < multiples.length; i++) { retInterval = multiples[i]; - // only allow tick amounts smaller than natural + // Only allow tick amounts smaller than natural if ((hasTickAmount && retInterval * magnitude >= interval) || (!hasTickAmount && @@ -84575,7 +84680,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ let sortValue, i; // Add index to each item for (i = 0; i < length; i++) { - arr[i].safeI = i; // stable sort index + arr[i].safeI = i; // Stable sort index } arr.sort(function (a, b) { sortValue = sortFunction(a, b); @@ -84583,7 +84688,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }); // Remove index from items for (i = 0; i < length; i++) { - delete arr[i].safeI; // stable sort index + delete arr[i].safeI; // Stable sort index } } /** @@ -84771,7 +84876,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Filter on the key if (typeof pathElement === 'undefined' || pathElement === '__proto__') { - return; // undefined + return; // Undefined } if (pathElement === 'this') { let thisProp; @@ -84786,7 +84891,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ typeof child === 'function' || typeof child.nodeType === 'number' || child === win) { - return; // undefined + return; // Undefined } // Else, proceed parent = child; @@ -85109,7 +85214,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const events = owner.hcEvents; // Allow click events added to points, otherwise they will be prevented by // the TouchPointer.pinch function after a pinch zoom operation (#7091). - if (H.Point && // without H a dependency loop occurs + if (H.Point && // Without H a dependency loop occurs el instanceof H.Point && el.series && el.series.chart) { @@ -85177,7 +85282,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ function removeAllEvents(eventCollection) { let types, len; if (!el.nodeName) { - return; // break on non-DOM events + return; // Break on non-DOM events } if (type) { types = {}; @@ -85401,7 +85506,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ win.jQuery.fn.highcharts = function () { const args = [].slice.call(arguments); - if (this[0]) { // this[0] is the renderTo div + if (this[0]) { // `this[0]` is the renderTo div // Create the chart if (args[0]) { new H[ // eslint-disable-line computed-property-spacing, no-new @@ -85799,7 +85904,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * @namespace Highcharts */ - ''; // detach doclets above + ''; // Detach doclets above return Utilities; }); @@ -86435,7 +86540,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ theme: { /** - * zIndex of the button. + * The z-index of the button. * * @type {number} * @apioption chart.resetZoomButton.theme.zIndex @@ -87300,7 +87405,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // UTC time with no timezone handling if (this.useUTC || - // leap calculation in UTC only + // Leap calculation in UTC only (hasNewSafariBug && unit === 'FullYear')) { return date['setUTC' + unit](value); } @@ -87492,7 +87597,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } format = pick(format, '%Y-%m-%d %H:%M:%S'); const time = this, date = new this.Date(timestamp), - // get the basic time values + // Get the basic time values hours = this.get('Hours', date), day = this.get('Day', date), dayOfMonth = this.get('Date', date), month = this.get('Month', date), fullYear = this.get('FullYear', date), lang = H.defaultOptions.lang, langWeekdays = (lang && lang.weekdays), shortWeekdays = (lang && lang.shortWeekdays), // List all format keys. Custom formats can be added from the // outside. @@ -87569,7 +87674,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * The object definition */ resolveDTLFormat(f) { - if (!isObject(f, true)) { // check for string or array + if (!isObject(f, true)) { // Check for string or array f = splat(f); return { main: f[0], @@ -87604,45 +87709,45 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const time = this, Date = time.Date, tickPositions = [], higherRanks = {}, // When crossing DST, use the max. Resolves #6278. minDate = new Date(min), interval = normalizedInterval.unitRange, count = normalizedInterval.count || 1; - let i, minYear, // used in months and years as a basis for Date.UTC() + let i, minYear, // Used in months and years as a basis for Date.UTC() variableDayLength, minDay; startOfWeek = pick(startOfWeek, 1); if (defined(min)) { // #1300 time.set('Milliseconds', minDate, interval >= timeUnits.second ? 0 : // #3935 count * Math.floor(time.get('Milliseconds', minDate) / count)); // #3652, #3654 - if (interval >= timeUnits.second) { // second + if (interval >= timeUnits.second) { // Second time.set('Seconds', minDate, interval >= timeUnits.minute ? 0 : // #3935 count * Math.floor(time.get('Seconds', minDate) / count)); } - if (interval >= timeUnits.minute) { // minute + if (interval >= timeUnits.minute) { // Minute time.set('Minutes', minDate, interval >= timeUnits.hour ? 0 : count * Math.floor(time.get('Minutes', minDate) / count)); } - if (interval >= timeUnits.hour) { // hour + if (interval >= timeUnits.hour) { // Hour time.set('Hours', minDate, interval >= timeUnits.day ? 0 : count * Math.floor(time.get('Hours', minDate) / count)); } - if (interval >= timeUnits.day) { // day + if (interval >= timeUnits.day) { // Day time.set('Date', minDate, interval >= timeUnits.month ? 1 : Math.max(1, count * Math.floor(time.get('Date', minDate) / count))); } - if (interval >= timeUnits.month) { // month + if (interval >= timeUnits.month) { // Month time.set('Month', minDate, interval >= timeUnits.year ? 0 : count * Math.floor(time.get('Month', minDate) / count)); minYear = time.get('FullYear', minDate); } - if (interval >= timeUnits.year) { // year + if (interval >= timeUnits.year) { // Year minYear -= minYear % count; time.set('FullYear', minDate, minYear); } - // week is a special case that runs outside the hierarchy + // Week is a special case that runs outside the hierarchy if (interval === timeUnits.week) { - // get start of current week, independent of count + // Get start of current week, independent of count minDay = time.get('Day', minDate); time.set('Date', minDate, (time.get('Date', minDate) - minDay + startOfWeek + @@ -87675,14 +87780,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ i = 1; while (t < max) { tickPositions.push(t); - // if the interval is years, use Date.UTC to increase years + // If the interval is years, use Date.UTC to increase years if (interval === timeUnits.year) { t = time.makeTime(minYear + i * count, 0); - // if the interval is months, use Date.UTC to increase months + // If the interval is months, use Date.UTC to increase months } else if (interval === timeUnits.month) { t = time.makeTime(minYear, minMonth + i * count); - // if we're using global time, the interval is not fixed as it + // If we're using global time, the interval is not fixed as it // jumps one hour at the DST crossover } else if (variableDayLength && @@ -87693,17 +87798,17 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ else if (variableDayLength && interval === timeUnits.hour && count > 1) { - // make sure higher ranks are preserved across DST (#6797, + // Make sure higher ranks are preserved across DST (#6797, // #7621) t = time.makeTime(minYear, minMonth, minDateDate, minHours + i * count); - // else, the interval is fixed and we use simple addition + // Else, the interval is fixed and we use simple addition } else { t += interval * count; } i++; } - // push the last time + // Push the last time tickPositions.push(t); // Handle higher ranks. Mark new days if the time is on midnight // (#950, #1649, #1760, #3349). Use a reasonable dropout threshold @@ -87721,7 +87826,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }); } } - // record information on the chosen unit - for dynamic label formatter + // Record information on the chosen unit - for dynamic label formatter tickPositions.info = extend(normalizedInterval, { higherRanks, totalRange: interval * count @@ -87759,7 +87864,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ day: 3 }; let n = 'millisecond', - // for sub-millisecond data, #4223 + // For sub-millisecond data, #4223 lastN = n; for (n in timeUnits) { // eslint-disable-line guard-for-in // If the range is exactly one week and we're looking at a @@ -87851,7 +87956,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @return {number} * Timezone offset in minutes. */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file return Time; }); @@ -88923,7 +89028,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @type {Highcharts.FormatterCallbackFunction} */ labelFormatter: function () { - /** eslint-enable valid-jsdoc */ + // eslint-enable valid-jsdoc return this.name; }, /** @@ -89278,7 +89383,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ height: '13px' }, - // itemWidth: undefined, + /// itemWidth: undefined, /** * When this is true, the legend symbol width will be the same as * the symbol height, which in turn defaults to the font size of the @@ -89430,7 +89535,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @since 2.0 */ verticalAlign: 'bottom', - // width: undefined, + // Width: undefined, /** * The x offset of the legend relative to its horizontal alignment * `align` within chart.spacingLeft and chart.spacingRight. Negative @@ -90604,7 +90709,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @return {boolean|undefined} * Return false to prevent the default action, usually zoom. */ - (''); // detach doclets above + (''); // Detach doclets above return DefaultOptions; }); @@ -90748,7 +90853,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }); return ret; } - // it's NaN if gradient colors on a column chart + // It's NaN if gradient colors on a column chart if (rgba && isNumber(rgba[0])) { if (format === 'rgb' || (!format && rgba[3] === 1)) { return 'rgb(' + rgba[0] + ',' + rgba[1] + ',' + rgba[2] + ')'; @@ -91006,7 +91111,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @return {Highcharts.Color} * Color instance */ - (''); // detach doclets above + (''); // Detach doclets above return Color; }); @@ -91120,7 +91225,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * */ update() { - const elem = this.elem, prop = this.prop, // if destroyed, it is null + const elem = this.elem, prop = this.prop, // If destroyed, it is null now = this.now, step = this.options.step; // Animation setter defined from outside if (this[prop + 'Setter']) { @@ -91253,9 +91358,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * they can be animated in parallel. */ initPath(elem, fromD, toD) { - const startX = elem.startX, endX = elem.endX, end = toD.slice(), // copy + const startX = elem.startX, endX = elem.endX, end = toD.slice(), // Copy isArea = elem.isArea, positionFactor = isArea ? 2 : 1; - let shift, fullLength, i, reverse, start = fromD && fromD.slice(); // copy + let shift, fullLength, i, reverse, start = fromD && fromD.slice(); // Copy if (!start) { return [end, end]; } @@ -91289,7 +91394,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // need to append a copy of the last point. if (isArea) { const z = arr.pop(); - arr.push(arr[arr.length - 1], z); // append point and the Z + arr.push(arr[arr.length - 1], z); // Append point and the Z } } } @@ -92148,7 +92253,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.ASTNode#textContent * @type {string|undefined} */ - (''); // keeps doclets above in file + (''); // Keeps doclets above in file return AST; }); @@ -92393,7 +92498,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Format the replacement if (valueAndFormat.length && typeof replacement === 'number') { const segment = valueAndFormat.join(':'); - if (floatRegex.test(segment)) { // float + if (floatRegex.test(segment)) { // Float const decimals = parseInt((segment.match(decRegex) || ['', '-1'])[1], 10); if (replacement !== null) { replacement = numberFormatter(replacement, decimals, lang.decimalPoint, segment.indexOf(',') > -1 ? lang.thousandsSep : ''); @@ -92450,21 +92555,21 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Expose decimals from exponential notation (#7042) fractionDigits = decimals + +exponent[1]; if (fractionDigits >= 0) { - // remove too small part of the number while keeping the notation + // Remove too small part of the number while keeping the notation exponent[0] = (+exponent[0]).toExponential(fractionDigits) .split('e')[0]; decimals = fractionDigits; } else { - // fractionDigits < 0 + // `fractionDigits < 0` exponent[0] = exponent[0].split('.')[0] || 0; if (decimals < 20) { - // use number instead of exponential notation (#7405) + // Use number instead of exponential notation (#7405) number = (exponent[0] * Math.pow(10, exponent[1])) .toFixed(decimals); } else { - // or zero + // Or zero number = 0; } exponent[1] = 0; @@ -92583,7 +92688,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ RendererRegistry.rendererTypes[rendererType] = rendererClass; if (!defaultRenderer || setAsDefault) { defaultRenderer = rendererType; - H.Renderer = rendererClass; // compatibility + H.Renderer = rendererClass; // Compatibility } } RendererRegistry.registerRendererType = registerRendererType; @@ -92836,9 +92941,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * Property value. */ _defaultGetter(key) { - let ret = pick(this[key + 'Value'], // align getter + let ret = pick(this[key + 'Value'], // Align getter this[key], this.element ? this.element.getAttribute(key) : null, 0); - if (/^[\-0-9\.]+$/.test(ret)) { // is numerical + if (/^[\-0-9\.]+$/.test(ret)) { // Is numerical ret = parseFloat(ret); } return ret; @@ -92897,7 +93002,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ parent.element : renderer.box).appendChild(element); } - // fire an event for internal hooks + // Fire an event for internal hooks if (this.onAdd) { this.onAdd(); } @@ -92988,10 +93093,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ this.alignByTranslate = alignByTranslate; if (!box || isString(box)) { this.alignTo = alignTo = box || 'renderer'; - // prevent duplicates, like legendGroup after resize + // Prevent duplicates, like legendGroup after resize erase(alignedObjects, this); alignedObjects.push(this); - box = void 0; // reassign it below + box = void 0; // Reassign it below } // When called on resize, no arguments are supplied } @@ -93003,9 +93108,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ box = pick(box, renderer[alignTo], renderer); // Assign variables const align = alignOptions.align, vAlign = alignOptions.verticalAlign; - // default: left align + // Default: left align x = (box.x || 0) + (alignOptions.x || 0); - // default: top align + // Default: top align y = (box.y || 0) + (alignOptions.y || 0); // Align if (align === 'right') { @@ -93083,7 +93188,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ animOptions.duration = 0; } if (animOptions.duration !== 0) { - // allows using a callback with the global animation without + // Allows using a callback with the global animation without // overwriting it if (complete) { animOptions.complete = complete; @@ -93249,17 +93354,17 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ attr(hash, val, complete, continueAnimation) { const element = this.element, symbolCustomAttribs = SVGElement.symbolCustomAttribs; let key, hasSetSymbolSize, ret = this, skipAttr, setter; - // single key-value pair + // Single key-value pair if (typeof hash === 'string' && typeof val !== 'undefined') { key = hash; hash = {}; hash[key] = val; } - // used as a getter: first argument is a string, second is undefined + // Used as a getter: first argument is a string, second is undefined if (typeof hash === 'string') { ret = (this[hash + 'Getter'] || this._defaultGetter).call(this, hash, element); - // setter + // Setter } else { objectEach(hash, function eachAttribute(val, key) { @@ -93341,7 +93446,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ strokeWidth = strokeWidth || rect.strokeWidth || 0; // Math.round because strokeWidth can sometimes have roundoff errors const normalizer = Math.round(strokeWidth) % 2 / 2; - // normalize for crisp edges + // Normalize for crisp edges rect.x = Math.floor(rect.x || wrapper.x || 0) + normalizer; rect.y = Math.floor(rect.y || wrapper.y || 0) + normalizer; rect.width = Math.floor((rect.width || wrapper.width || 0) - 2 * normalizer); @@ -93562,7 +93667,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ .replace(/dot/g, '1,3,') .replace('dash', '4,3,') .replace(/,$/, '') - .split(','); // ending comma + .split(','); // Ending comma i = v.length; while (i--) { v[i] = '' + (pInt(v[i]) * pick(strokeWidth, NaN)); @@ -93582,10 +93687,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ let parentToClean = (element.nodeName === 'SPAN' && wrapper.parentGroup || void 0), grandParent, i; - // remove events + // Remove events element.onclick = element.onmouseout = element.onmouseover = element.onmousemove = element.point = null; - stop(wrapper); // stop running animations + stop(wrapper); // Stop running animations if (wrapper.clipPath && ownerSVGElement) { const clipPath = wrapper.clipPath; // Look for existing references to this clipPath and remove them @@ -93607,7 +93712,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ wrapper.stops.length = 0; wrapper.stops = void 0; } - // remove element + // Remove element wrapper.safeRemoveChild(element); // In case of useHTML, clean up empty containers emulating SVG groups // (#1960, #2393, #2697). @@ -93619,7 +93724,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ delete parentToClean.div; parentToClean = grandParent; } - // remove from alignObjects + // Remove from alignObjects if (wrapper.alignTo) { erase(renderer.alignedObjects, wrapper); } @@ -93790,7 +93895,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (!bBox || bBox.width < 0) { bBox = { x: 0, y: 0, width: 0, height: 0 }; } - // useHTML within SVG + // Use HTML within SVG } else { bBox = wrapper.htmlGetBBox(); @@ -94110,7 +94215,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // Set attributes for the const textAttribs = { - // dx/dy options must by set on (parent), the + // `dx`/`dy` options must by set on (parent), the // rest should be set on x: 0, y: 0 @@ -94705,7 +94810,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * @typedef {"bottom"|"middle"|"top"} Highcharts.VerticalAlignValue */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file return SVGElement; }); @@ -94859,7 +94964,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (value) { this.needsBox = true; } - // for animation getter (#6776) + // For animation getter (#6776) this.fill = value; this.boxAttr(key, value); } @@ -95013,13 +95118,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Determine y based on the baseline const textY = this.baseline ? 0 : this.baselineOffset; let textX = pick(this.paddingLeft, this.padding); - // compensate for alignment + // Compensate for alignment if (defined(this.widthSetting) && this.bBox && (this.textAlign === 'center' || this.textAlign === 'right')) { textX += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width); } - // update if anything changed + // Update if anything changed if (textX !== text.x || textY !== text.y) { text.attr('x', textX); // #8159 - prevent misplaced data labels in treemap @@ -95031,13 +95136,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ text.attr('y', textY); } } - // record current values + // Record current values text.x = textX; text.y = textY; } } widthSetter(value) { - // width:auto => null + // `width:auto` => null this.widthSetting = isNumber(value) ? value : void 0; } getPaddedWidth() { @@ -95049,7 +95154,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ paddingRight); } xSetter(value) { - this.x = value; // for animation getter + this.x = value; // For animation getter if (this.alignFactor) { value -= this.alignFactor * this.getPaddedWidth(); // Force animation even when setting to the same value (#7898) @@ -95111,6 +95216,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * */ /* eslint-disable require-jsdoc, valid-jsdoc */ + /** + * + */ function arc(cx, cy, w, h, options) { const arc = []; if (options) { @@ -95222,18 +95330,21 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } } - else if ( // replace bottom + else if ( // Replace bottom anchorY > h && anchorX < w - safeDistance) { path.splice(5, 1, ['L', anchorX + halfDistance, y + h], ['L', anchorX, y + h + arrowLength], ['L', anchorX - halfDistance, y + h], ['L', x + r, y + h]); } - else if ( // replace top + else if ( // Replace top anchorY < 0 && anchorX > safeDistance) { path.splice(1, 1, ['L', anchorX - halfDistance, y], ['L', anchorX, y - arrowLength], ['L', anchorX + halfDistance, y], ['L', w - r, y]); } return path; } + /** + * + */ function circle(x, y, w, h) { // Return a full arc return arc(x + w / 2, y + h / 2, w / 2, h / 2, { @@ -95242,6 +95353,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ open: false }); } + /** + * + */ function diamond(x, y, w, h) { return [ ['M', x + w / 2, y], @@ -95252,6 +95366,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ]; } // #15291 + /** + * + */ function rect(x, y, w, h, options) { if (options && options.r) { return roundedRect(x, y, w, h, options); @@ -95264,6 +95381,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ['Z'] ]; } + /** + * + */ function roundedRect(x, y, w, h, options) { const r = options?.r || 0; return [ @@ -95276,9 +95396,12 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ['A', r, r, 0, 0, 1, x, y + h - r], ['L', x, y + r], ['A', r, r, 0, 0, 1, x + r, y], - ['Z'] // top-left corner + ['Z'] // Top-left corner ]; } + /** + * + */ function triangle(x, y, w, h) { return [ ['M', x + w / 2, y], @@ -95287,6 +95410,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ['Z'] ]; } + /** + * + */ function triangleDown(x, y, w, h) { return [ ['M', x, y], @@ -95390,7 +95516,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } else if (textStr !== '') { if (tempParent) { - // attach it to the DOM to read offset width and font size + // Attach it to the DOM to read offset width and font size tempParent.appendChild(textNode); } // Step 1. Parse the markup safely and directly into a tree @@ -95526,7 +95652,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ parentElement.insertBefore(doc.createTextNode(line), textNode); // Insert a break const br = doc.createElementNS(SVG_NS, 'tspan'); - br.textContent = '\u200B'; // zero-width space + br.textContent = '\u200B'; // Zero-width space attr(br, { dy, x }); parentElement.insertBefore(br, textNode); }); @@ -95607,7 +95733,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Handle breaks if (tagName === 'br') { attributes['class'] = 'highcharts-br'; // eslint-disable-line dot-notation - node.textContent = '\u200B'; // zero-width space + node.textContent = '\u200B'; // Zero-width space // Trim whitespace off the beginning of new lines const nextNode = nodes[i + 1]; if (nextNode && nextNode.textContent) { @@ -95657,7 +95783,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ let str; let actualWidth; const getSubStringLength = function (charEnd, concatenatedEnd) { - // charEnd is used when finding the character-by-character + // `charEnd` is used when finding the character-by-character // break for ellipsis, concatenatedEnd is used for word-by-word // break for word wrapping. const end = concatenatedEnd || charEnd; @@ -95679,7 +95805,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } return lengths[end]; }; - svgElement.rotation = 0; // discard rotation when computing box + svgElement.rotation = 0; // Discard rotation when computing box actualWidth = getSubStringLength(textNode.textContent.length); if (startAt + actualWidth > width) { // Do a binary search for the index where to truncate the text @@ -95908,7 +96034,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ this.url = this.getReferenceURL(); // Add description const desc = this.createElement('desc').add(); - desc.element.appendChild(doc.createTextNode('Created with Highcharts 11.4.0')); + desc.element.appendChild(doc.createTextNode('Created with Highcharts 11.4.1')); this.defs = this.createElement('defs').add(); this.allowHTML = allowHTML; this.forExport = forExport; @@ -95936,9 +96062,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ top: (Math.ceil(rect.top) - rect.top) + 'px' }); }; - // run the fix now + // Run the fix now subPixelFix(); - // run it on resize + // Run it on resize renderer.unSubPixelFix = addEvent(win, 'resize', subPixelFix); } } @@ -96044,10 +96170,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } if (hasInternalReferenceBug) { // Scan alert #[72]: Loop for nested patterns - return replaceNested(win.location.href.split('#')[0], // remove hash - [/<[^>]*>/g, ''], // wing cut HTML - [/([\('\)])/g, '\\$1'], // escape parantheses and quotes - [/ /g, '%20'] // replace spaces (needed for Safari only) + return replaceNested(win.location.href.split('#')[0], // Remove hash + [/<[^>]*>/g, ''], // Wing cut HTML + [/([\('\)])/g, '\\$1'], // Escape parantheses and quotes + [/ /g, '%20'] // Replace spaces (needed for Safari only) ); } } @@ -96467,7 +96593,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (isArray(path)) { attribs.d = path; } - else if (isObject(path)) { // attributes + else if (isObject(path)) { // Attributes extend(attribs, path); } return this.createElement('path').attr(attribs); @@ -96817,7 +96943,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ symbol(symbol, x, y, width, height, options) { const ren = this, imageRegex = /^url\((.*?)\)$/, isImage = imageRegex.test(symbol), sym = (!isImage && (this.symbols[symbol] ? symbol : 'circle')), - // get the symbol definition function + // Get the symbol definition function symbolFn = (sym && this.symbols[sym]); let obj, path, imageSrc, centerImage; if (symbolFn) { @@ -96829,7 +96955,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (!ren.styledMode) { obj.attr('fill', 'none'); } - // expando properties for use in animate and attr + // Expando properties for use in animate and attr extend(obj, { symbolName: (sym || void 0), x: x, @@ -97644,7 +97770,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.SymbolOptionsObject#start * @type {number|undefined} */ - (''); // keeps doclets above in transpiled file + (''); // Keeps doclets above in transpiled file return SVGRenderer; }); @@ -100237,7 +100363,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @type {Highcharts.ColorType} */ tickColor: "#333333" /* Palette.neutralColor80 */ - // tickWidth: 1 + // `tickWidth: 1` }; /** * The Z axis or depth axis for 3D plots. @@ -101241,7 +101367,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ {}); } } - // set properties for access in render method + // Set properties for access in render method /** * True if the tick is the first one on the axis. * @name Highcharts.Tick#isFirst @@ -101324,7 +101450,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ tick.label = label = tick.createLabel(str, labelOptions); // Base value to detect change for new calls to getBBox tick.rotation = 0; - // update + // Update } else if (label && label.textStr !== str && !animateLabels) { // When resetting text, also reset the width if dynamically set @@ -101710,7 +101836,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ let mark = tick.mark; const isNewMark = !mark; if (tickSize) { - // negate the length + // Negate the length if (axis.opposite) { tickSize[0] = -tickSize[0]; } @@ -101773,9 +101899,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ opacity !== 0) { tick.handleOverflow(xy); } - // apply step + // Apply step if (step && index % step) { - // show those indices dividable by step + // Show those indices dividable by step show = false; } // Set the new position, and show or hide @@ -101847,7 +101973,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.TimeTicksInfoObject#totalRange * @type {number} */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file return Tick; }); @@ -101984,8 +102110,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @type {number} */ axis.side = pick(userOptions.side, axis.side, (horiz ? - (axis.opposite ? 0 : 2) : // top : bottom - (axis.opposite ? 1 : 3)) // right : left + (axis.opposite ? 0 : 2) : // Top : bottom + (axis.opposite ? 1 : 3)) // Right : left ); /** * Current options for the axis after merge of defaults and user's @@ -104075,7 +104201,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ width: axis.len + 'px' }); } - // hide or show the title depending on whether showEmpty is set + // Hide or show the title depending on whether showEmpty is set axis.axisTitle[display ? 'show' : 'hide'](display); } /** @@ -104096,7 +104222,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ticks[pos] = new Tick(axis, pos); } else { - ticks[pos].addLabel(); // update labels depending on tick interval + ticks[pos].addLabel(); // Update labels depending on tick interval } } /** @@ -104134,7 +104260,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const axis = this, { chart, horiz, options, side, ticks, tickPositions, coll } = axis, invertedSide = (chart.inverted && !axis.isZAxis ? [1, 0, 3, 2][side] : side), hasData = axis.hasData(), axisTitleOptions = options.title, labelOptions = options.labels, hasCrossing = isNumber(options.crossing), axisOffset = chart.axisOffset, clipOffset = chart.clipOffset, directionFactor = [-1, 1, 1, -1][side]; - let showAxis, titleOffset = 0, titleOffsetOption, titleMargin = 0, labelOffset = 0, // reset + let showAxis, titleOffset = 0, titleOffsetOption, titleMargin = 0, labelOffset = 0, // Reset labelOffsetPadded, lineHeightCorrection; // For reuse in Axis.render axis.showAxis = showAxis = hasData || options.showEmpty; @@ -104144,7 +104270,6 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (hasData || axis.isLinked) { // Generate ticks tickPositions.forEach(function (pos) { - // i is not used here, but may be used in overrides axis.generateTick(pos); }); axis.renderUnsquish(); @@ -104155,7 +104280,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ { 1: 'left', 3: 'right' }[side] === axis.labelAlign); if (pick(labelOptions.reserveSpace, hasCrossing ? false : null, axis.labelAlign === 'center' ? true : null, axis.reserveSpaceDefault)) { tickPositions.forEach(function (pos) { - // get the highest offset + // Get the highest offset labelOffset = Math.max(ticks[pos].getLabelSize(), labelOffset); }); } @@ -104164,7 +104289,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } axis.labelOffset = labelOffset * (axis.opposite ? -1 : 1); } - else { // doesn't have data + else { // Doesn't have data objectEach(ticks, function (tick, n) { tick.destroy(); delete ticks[n]; @@ -104186,9 +104311,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // Render the axis line axis.renderLine(); - // handle automatic or user set offset + // Handle automatic or user set offset axis.offset = directionFactor * pick(options.offset, axisOffset[side] ? axisOffset[side] + (options.margin || 0) : 0); - axis.tickRotCorr = axis.tickRotCorr || { x: 0, y: 0 }; // polar + axis.tickRotCorr = axis.tickRotCorr || { x: 0, y: 0 }; // Polar if (side === 0) { lineHeightCorrection = -axis.labelMetrics().h; } @@ -104248,7 +104373,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const chart = this.chart, opposite = this.opposite, offset = this.offset, horiz = this.horiz, lineLeft = this.left + (opposite ? this.width : 0) + offset, lineTop = chart.chartHeight - this.bottom - (opposite ? this.height : 0) + offset; if (opposite) { - lineWidth *= -1; // crispify the other way - #1480, #1687 + lineWidth *= -1; // Crispify the other way - #1480, #1687 } return chart.renderer .crispLine([ @@ -104302,28 +104427,28 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * X and Y positions for the title. */ getTitlePosition(axisTitle) { - // compute anchor points for each of the title align options + // Compute anchor points for each of the title align options const horiz = this.horiz, axisLeft = this.left, axisTop = this.top, axisLength = this.len, axisTitleOptions = this.options.title, margin = horiz ? axisLeft : axisTop, opposite = this.opposite, offset = this.offset, xOption = axisTitleOptions.x, yOption = axisTitleOptions.y, fontMetrics = this.chart.renderer.fontMetrics(axisTitle), // The part of a multiline text that is below the baseline of the // first line. Subtract 1 to preserve pixel-perfectness from the // old behaviour (v5.0.12), where only one line was allowed. textHeightOvershoot = axisTitle ? Math.max(axisTitle.getBBox(false, 0).height - fontMetrics.h - 1, 0) : 0, - // the position in the length direction of the axis + // The position in the length direction of the axis alongAxis = ({ low: margin + (horiz ? 0 : axisLength), middle: margin + axisLength / 2, high: margin + (horiz ? axisLength : 0) })[axisTitleOptions.align], - // the position in the perpendicular direction of the axis + // The position in the perpendicular direction of the axis offAxis = (horiz ? axisTop + this.height : axisLeft) + - (horiz ? 1 : -1) * // horizontal axis reverses the margin - (opposite ? -1 : 1) * // so does opposite axes + (horiz ? 1 : -1) * // Horizontal axis reverses the margin + (opposite ? -1 : 1) * // So does opposite axes (this.axisTitleMargin || 0) + [ -textHeightOvershoot, textHeightOvershoot, fontMetrics.f, - -textHeightOvershoot // left + -textHeightOvershoot // Left ][this.side], titlePosition = { x: horiz ? alongAxis + xOption : @@ -104429,7 +104554,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (axis.hasData() || isLinked) { const slideInTicks = axis.chart.hasRendered && axis.old && isNumber(axis.old.min); - // minor ticks + // Minor ticks if (axis.minorTickInterval && !axis.categories) { axis.getMinorTickPositions().forEach(function (pos) { axis.renderMinorTick(pos, slideInTicks); @@ -104479,8 +104604,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } }); } - // custom plot lines and bands - if (!axis._addedPlotLB) { // only first time + // Custom plot lines and bands + if (!axis._addedPlotLB) { // Only first time axis._addedPlotLB = true; (options.plotLines || []) .concat(options.plotBands || []) @@ -104489,7 +104614,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ .addPlotBandOrLine(plotLineOptions); }); } - } // end if hasData + } // End if hasData // Remove inactive ticks [ticks, minorTicks, alternateBands].forEach(function (coll) { const forDestruction = [], delay = animation.duration, destroyInactiveItems = function () { @@ -104560,14 +104685,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ redraw() { if (this.visible) { - // render the axis + // Render the axis this.render(); - // move plot lines and bands + // Move plot lines and bands this.plotLinesAndBands.forEach(function (plotLine) { plotLine.render(); }); } - // mark associated series as dirty and ready for redraw + // Mark associated series as dirty and ready for redraw this.series.forEach(function (series) { series.isDirty = true; }); @@ -104610,8 +104735,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } // Destroy elements - ['axisLine', 'axisTitle', 'axisGroup', - 'gridGroup', 'labelGroup', 'cross', 'scrollbar'].forEach(function (prop) { + [ + 'axisLine', 'axisTitle', 'axisGroup', + 'gridGroup', 'labelGroup', 'cross', 'scrollbar' + ].forEach(function (prop) { if (axis[prop]) { axis[prop] = axis[prop].destroy(); } @@ -104678,7 +104805,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } if (defined(pos)) { crossOptions = { - // value, only used on radial + // Value, only used on radial value: point && (this.isXAxis ? point.x : pick(point.stackY, point.y)), @@ -105103,7 +105230,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * @return {string} */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file return Axis; }); @@ -105211,9 +105338,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ normalizeTimeTickInterval(tickInterval, unitsOption) { const units = (unitsOption || [[ - // unit name + // Unit name 'millisecond', - // allowed multiples + // Allowed multiples [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] ], [ 'second', @@ -105237,31 +105364,31 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ 'year', null ]]); - let unit = units[units.length - 1], // default unit is years + let unit = units[units.length - 1], // Default unit is years interval = timeUnits[unit[0]], multiples = unit[1], i; - // loop through the units to find the one that best fits the + // Loop through the units to find the one that best fits the // tickInterval for (i = 0; i < units.length; i++) { unit = units[i]; interval = timeUnits[unit[0]]; multiples = unit[1]; if (units[i + 1]) { - // lessThan is in the middle between the highest multiple + // `lessThan` is in the middle between the highest multiple // and the next unit. const lessThan = (interval * multiples[multiples.length - 1] + timeUnits[units[i + 1][0]]) / 2; - // break and keep the current unit + // Break and keep the current unit if (tickInterval <= lessThan) { break; } } } - // prevent 2.5 years intervals, though 25, 250 etc. are allowed + // Prevent 2.5 years intervals, though 25, 250 etc. are allowed if (interval === timeUnits.year && tickInterval < 5 * interval) { multiples = [1, 2, 5]; } - // get the count + // Get the count const count = normalizeTickInterval(tickInterval / interval, multiples, unit[0] === 'year' ? // #1913, #2360 Math.max(getMagnitude(tickInterval / interval), 1) : 1); @@ -105362,7 +105489,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ function onAfterInit() { const axis = this; const log = axis.logarithmic; - // extend logarithmic axis + // Extend logarithmic axis if (log) { axis.lin2val = function (num) { return log.lin2log(num); @@ -105922,11 +106049,11 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ !path.isFlat) { // Apply defaults optionsLabel = merge({ - align: horiz && isBand && 'center', + align: horiz && isBand ? 'center' : void 0, x: horiz ? !isBand && 4 : 10, - verticalAlign: !horiz && isBand && 'middle', + verticalAlign: !horiz && isBand ? 'middle' : void 0, y: horiz ? isBand ? 16 : 10 : isBand ? 6 : -4, - rotation: horiz && !isBand && 90 + rotation: horiz && !isBand ? 90 : 0 }, optionsLabel); this.renderLabel(optionsLabel, path, isBand, zIndex); // Move out of sight @@ -105959,7 +106086,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ align: optionsLabel.textAlign || optionsLabel.align, rotation: optionsLabel.rotation, 'class': 'highcharts-plot-' + (isBand ? 'band' : 'line') + - '-label' + (optionsLabel.className || ''), + '-label ' + (optionsLabel.className || ''), zIndex }); if (!axis.chart.styledMode) { @@ -106634,7 +106761,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @extends xAxis.plotLines * @apioption yAxis.plotLines */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file return PlotLineOrBand; }); @@ -106754,9 +106881,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ let s; // Build the header s = [tooltip.tooltipFooterHeaderFormatter(items[0])]; - // build the values + // Build the values s = s.concat(tooltip.bodyFormatter(items)); - // footer + // Footer s.push(tooltip.tooltipFooterHeaderFormatter(items[0], true)); return s; } @@ -107334,10 +107461,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ tooltip.allowShared = !(!isArray(pointOrPoints) && pointOrPoints.series && pointOrPoints.series.noSharedTooltip); - // get the reference point coordinates (pie charts use tooltipPos) + // Get the reference point coordinates (pie charts use tooltipPos) tooltip.followPointer = (!tooltip.split && point.series.tooltipOptions.followPointer); const anchor = tooltip.getAnchor(pointOrPoints, mouseEvent), x = anchor[0], y = anchor[1]; - // shared tooltip, array is sent over + // Shared tooltip, array is sent over if (shared && tooltip.allowShared) { pointer.applyInactiveState(points); // Now set hover state for the chosen ones: @@ -107347,7 +107474,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }); formatterContext = point.getLabelConfig(); formatterContext.points = pointConfig; - // single point tooltip + // Single point tooltip } else { formatterContext = point.getLabelConfig(); @@ -107356,15 +107483,15 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const text = isString(formatString) ? format(formatString, formatterContext, chart) : formatter.call(formatterContext, tooltip); - // register the current series + // Register the current series const currentSeries = point.series; this.distance = pick(currentSeries.tooltipOptions.distance, 16); - // update the inner HTML + // Update the inner HTML if (text === false) { this.hide(); } else { - // update text + // Update text if (tooltip.split && tooltip.allowShared) { // #13868 this.renderSplit(text, points); } @@ -107419,7 +107546,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ return; } } - // show it + // Show it if (tooltip.isHidden && tooltip.label) { tooltip.label.attr({ opacity: 1 @@ -107772,10 +107899,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ box.x = Math.min(0, anchorPos[0]); box.y = Math.min(0, anchorPos[1]); box.width = (anchorPos[0] < 0 ? - Math.max(Math.abs(anchorPos[0]), (labelBBox.width - anchorPos[0])) : + Math.max(Math.abs(anchorPos[0]), labelBBox.width - anchorPos[0]) : Math.max(Math.abs(anchorPos[0]), labelBBox.width)); box.height = (anchorPos[1] < 0 ? - Math.max(Math.abs(anchorPos[1]), (labelBBox.height - Math.abs(anchorPos[1]))) : + Math.max(Math.abs(anchorPos[1]), labelBBox.height - Math.abs(anchorPos[1])) : Math.max(Math.abs(anchorPos[1]), labelBBox.height)); if (tooltip.tracker) { tooltip.tracker.attr(box); @@ -108014,7 +108141,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ /** * @typedef {"callout"|"circle"|"rect"} Highcharts.TooltipShapeValue */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file return Tooltip; }); @@ -108031,7 +108158,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const { animObject } = A; const { defaultOptions } = D; const { format } = F; - const { addEvent, erase, extend, fireEvent, getNestedProperty, isArray, isFunction, isNumber, isObject, pick, syncTimeout, removeEvent, uniqueKey } = U; + const { addEvent, erase, extend, fireEvent, getNestedProperty, isArray, isFunction, isNumber, isObject, merge, pick, syncTimeout, removeEvent, uniqueKey } = U; /* eslint-disable no-invalid-this, valid-jsdoc */ /* * * @@ -108180,7 +108307,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ applyOptions(options, x) { const point = this, series = point.series, pointValKey = series.options.pointValKey || series.pointValKey; options = Point.prototype.optionsToObject.call(this, options); - // copy options directly to point + // Copy options directly to point extend(point, options); point.options = point.options ? extend(point.options, options) : @@ -108264,7 +108391,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } }; if (point.legendItem) { - // pies have legend items + // Pies have legend items chart.legend.destroyItem(point); } if (hoverPoints) { @@ -108536,7 +108663,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ret[pointArrayMap[0]] = options; } else if (isArray(options)) { - // with leading x value + // With leading x value if (!keys && options.length > valueCount) { firstItemType = typeof options[0]; if (firstItemType === 'string') { @@ -108621,7 +108748,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ resolveColor() { const series = this.series, optionsChart = series.chart.options.chart, styledMode = series.chart.styledMode; let color, colors, colorCount = optionsChart.colorCount, colorIndex; - // remove points nonZonedColor for later recalculation + // Remove points nonZonedColor for later recalculation delete this.nonZonedColor; if (series.options.colorByPoint) { if (!styledMode) { @@ -108631,7 +108758,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } colorIndex = series.colorCounter; series.colorCounter++; - // loop back to zero + // Loop back to zero if (series.colorCounter === colorCount) { series.colorCounter = 0; } @@ -108715,7 +108842,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Loop over the point array map and replace unformatted values with // sprintf formatting markup (series.pointArrayMap || ['y']).forEach(function (key) { - key = '{point.' + key; // without the closing bracket + key = '{point.' + key; // Without the closing bracket if (valuePrefix || valueSuffix) { pointFormat = pointFormat.replace(RegExp(key + '}', 'g'), valuePrefix + key + '}' + valueSuffix); } @@ -108791,7 +108918,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ point.dataLabel = point.dataLabel.destroy(); // #2468 } } - // record changes in the parallel arrays + // Record changes in the parallel arrays i = point.index; series.updateParallelArrays(point, i); // Record the options to options.data. If the old or the new config @@ -108801,7 +108928,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ isObject(options, true)) ? point.options : pick(options, seriesOptions.data[i]); - // redraw + // Redraw series.isDirty = series.isDirtyData = true; if (!series.fixedBox && series.hasCartesianSeries) { // #1906, #2320 chart.isDirtyBox = true; @@ -108881,7 +109008,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const point = this, series = point.series, chart = series.chart; selected = pick(selected, !point.selected); this.selectedStaging = selected; - // fire the event with the default handler + // Fire the event with the default handler point.firePointEvent(selected ? 'select' : 'unselect', { accumulate: accumulate }, function () { /** * Whether the point is selected or not. @@ -108896,7 +109023,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ series.options.data[series.data.indexOf(point)] = point.options; point.setState(selected && 'select'); - // unselect all other points unless Ctrl or Cmd + click + // Unselect all other points unless Ctrl or Cmd + click if (!accumulate) { chart.getSelectedPoints().forEach(function (loopPoint) { const loopSeries = loopPoint.series; @@ -108962,7 +109089,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @function Highcharts.Point#importEvents */ manageEvent(eventType) { - const point = this, options = point.series.options.point || {}, userEvent = options.events?.[eventType]; + const point = this, options = merge(point.series.options.point, point.options), userEvent = options.events?.[eventType]; if (isFunction(userEvent) && (!point.hcEvents?.[eventType] || // Some HC modules, like marker-clusters, draggable-poins etc. @@ -109004,19 +109131,19 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ markerOptions.states && markerOptions.states[state || 'normal']) || {}), stateDisabled = markerStateOptions.enabled === false, pointMarker = point.marker || {}, chart = series.chart, hasMarkers = (markerOptions && series.markerAttribs); let halo = series.halo, markerAttribs, pointAttribs, pointAttribsAnimation, stateMarkerGraphic = series.stateMarkerGraphic, newSymbol; - state = state || ''; // empty string + state = state || ''; // Empty string if ( - // already has this state + // Already has this state (state === point.state && !move) || - // selected points don't respond to hover + // Selected points don't respond to hover (point.selected && state !== 'select') || - // series' state options is disabled + // Series' state options is disabled (stateOptions.enabled === false) || - // general point marker's state options is disabled + // General point marker's state options is disabled (state && (stateDisabled || (normalDisabled && markerStateOptions.enabled === false))) || - // individual point marker's state options is disabled + // Individual point marker's state options is disabled (state && pointMarker.states && pointMarker.states[state] && @@ -109067,7 +109194,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } else { - // if a graphic is not applied to each point in the normal state, + // If a graphic is not applied to each point in the normal state, // create a shared graphic for the hover state if (state && markerStateOptions) { newSymbol = pointMarker.symbol || series.symbol; @@ -109369,7 +109496,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @param {Highcharts.PointInteractionEventObject} event * Event that occurred. */ - ''; // keeps doclets above in JS file. + ''; // Keeps doclets above in JS file. return Point; }); @@ -109384,7 +109511,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * */ const { parse: color } = Color; - const { charts, composed } = H; + const { charts, composed, isTouchDevice } = H; const { addEvent, attr, css, extend, find, fireEvent, isNumber, isObject, objectEach, offset, pick, pushUnique, splat } = U; /* * * @@ -109472,7 +109599,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ Pointer.unbindDocumentTouchEnd = (Pointer.unbindDocumentTouchEnd()); } } - // memory and CPU leak + // Memory and CPU leak clearInterval(pointer.tooltipTimeout); objectEach(pointer, function (_val, prop) { pointer[prop] = void 0; @@ -109991,6 +110118,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ constructor(chart, options) { this.hasDragged = 0; + this.pointerCaptureEventsToUnbind = []; this.eventsToUnbind = []; // Store references this.options = options; @@ -110535,7 +110663,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ tooltip.shared : false); let hoverPoint = p || chart.hoverPoint, hoverSeries = hoverPoint && hoverPoint.series || chart.hoverSeries; - const // onMouseOver or already hovering a series with directTouch + const // `onMouseOver` or already hovering a series with directTouch isDirectTouch = (!e || e.type !== 'touchmove') && (!!p || ((hoverSeries && hoverSeries.directTouch) && pointer.isDirectTouch)), hoverData = this.getHoverData(hoverPoint, hoverSeries, series, isDirectTouch, shared, e); // Update variables from hoverData. @@ -110670,6 +110798,54 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (!Pointer.unbindDocumentTouchEnd) { Pointer.unbindDocumentTouchEnd = addEvent(ownerDoc, 'touchend', this.onDocumentTouchEnd.bind(this), { passive: false }); } + this.setPointerCapture(); + addEvent(this.chart, 'redraw', this.setPointerCapture.bind(this)); + } + /** + * Sets, or removes on update, pointer events using pointer capture for + * tooltip.followTouchMove if any series has findNearestPointBy that + * includes the y dimension. + * @private + * @function Highcharts.Pointer#setPointerCapture + */ + setPointerCapture() { + // Only for touch + if (!isTouchDevice) { + return; + } + const pointer = this, events = pointer.pointerCaptureEventsToUnbind, chart = pointer.chart, container = chart.container, followTouchMove = pick(chart.options.tooltip?.followTouchMove, true), shouldHave = followTouchMove && chart.series.some((series) => series.options.findNearestPointBy + .indexOf('y') > -1); + if (!pointer.hasPointerCapture && shouldHave) { + // Add + // Bind + events.push(addEvent(container, 'pointerdown', (e) => { + if (e.target?.hasPointerCapture(e.pointerId)) { + e.target?.releasePointerCapture(e.pointerId); + } + }), addEvent(container, 'pointermove', (e) => { + chart.pointer?.getPointFromEvent(e)?.onMouseOver(e); + })); + if (!chart.styledMode) { + css(container, { 'touch-action': 'none' }); + } + // Mostly for styled mode + container.className += ' highcharts-no-touch-action'; + pointer.hasPointerCapture = true; + } + else if (pointer.hasPointerCapture && !shouldHave) { + // Remove + // Unbind + events.forEach((e) => e()); + events.length = 0; + if (!chart.styledMode) { + css(container, { + 'touch-action': pick(chart.options.chart.style?.['touch-action'], 'manipulation') + }); + } + // Mostly for styled mode + container.className = container.className.replace(' highcharts-no-touch-action', ''); + pointer.hasPointerCapture = false; + } } /** * Sets the index of the hovered chart and leaves the previous hovered @@ -110926,7 +111102,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.SelectEventObject#yAxis * @type {Array} */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file return Pointer; }); @@ -111185,7 +111361,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ destroyItem(item) { const checkbox = item.checkbox, legendItem = item.legendItem || {}; - // destroy SVG elements + // Destroy SVG elements for (const key of ['group', 'label', 'line', 'symbol']) { if (legendItem[key]) { legendItem[key] = legendItem[key].destroy(); @@ -111325,10 +111501,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ seriesOptions && seriesOptions.showCheckbox), useHTML = options.useHTML, itemClassName = item.options.className; let label = legendItem.label, - // full width minus text width + // Full width minus text width itemExtraWidth = symbolWidth + symbolPadding + itemDistance + (showCheckbox ? 20 : 0); - if (!label) { // generate it once, later move it + if (!label) { // Generate it once, later move it // Generate the group box, a group to hold the symbol and text. Text // is to be appended in Legend class. legendItem.group = renderer @@ -111346,7 +111522,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ symbolWidth + symbolPadding : -symbolPadding, legend.baseline || 0, useHTML); if (!chart.styledMode) { - // merge to prevent modifying original (#1021) + // Merge to prevent modifying original (#1021) label.css(merge(item.visible ? itemStyle : itemHiddenStyle)); @@ -111397,7 +111573,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // Always update the text legend.setText(item); - // calculate the positions for the next line + // Calculate the positions for the next line const bBox = label.getBBox(); const fontMetricsH = (legend.fontMetrics && legend.fontMetrics.h) || 0; item.itemWidth = item.checkboxOffset = @@ -111407,7 +111583,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ legend.maxItemWidth = Math.max(legend.maxItemWidth, item.itemWidth); legend.totalItemWidth += item.itemWidth; legend.itemHeight = item.itemHeight = Math.round(legendItem.labelHeight || - // use bBox for multiline (#16398) + // Use bBox for multiline (#16398) (bBox.height > fontMetricsH * 1.5 ? bBox.height : fontMetricsH)); } /** @@ -111432,16 +111608,16 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ this.lastLineHeight + itemMarginBottom); } - this.lastLineHeight = 0; // reset for next line (#915, #3976) + this.lastLineHeight = 0; // Reset for next line (#915, #3976) } // Set the edge positions this.lastItemY = itemMarginTop + this.itemY + itemMarginBottom; this.lastLineHeight = Math.max(// #915 itemHeight, this.lastLineHeight); - // cache the position of the newly generated or reordered items + // Cache the position of the newly generated or reordered items legendItem.x = this.itemX; legendItem.y = this.itemY; - // advance + // Advance if (horizontal) { this.itemX += itemWidth; } @@ -111450,9 +111626,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ itemMarginTop + itemHeight + itemMarginBottom; this.lastLineHeight = itemHeight; } - // the width of the widest item + // The width of the widest item this.offsetWidth = this.widthOption || Math.max((horizontal ? this.itemX - padding - (item.checkbox ? - // decrease by itemDistance only when no checkbox #4853 + // Decrease by itemDistance only when no checkbox #4853 0 : itemDistance) : itemWidth) + padding, this.offsetWidth); } @@ -111593,7 +111769,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ render() { const legend = this, chart = legend.chart, renderer = chart.renderer, options = legend.options, padding = legend.padding, - // add each series or point + // Add each series or point allItems = legend.getAllItems(); let display, legendWidth, legendHeight, legendGroup = legend.group, allowedWidth, box = legend.box; legend.itemX = padding; @@ -111622,17 +111798,17 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ .add(); legend.contentGroup = renderer .g() - .attr({ zIndex: 1 }) // above background + .attr({ zIndex: 1 }) // Above background .add(legendGroup); legend.scrollGroup = renderer .g() .add(legend.contentGroup); } legend.renderTitle(); - // sort by legendIndex + // Sort by legendIndex stableSort(allItems, (a, b) => ((a.options && a.options.legendIndex) || 0) - ((b.options && b.options.legendIndex) || 0)); - // reversed legend + // Reversed legend if (options.reversed) { allItems.reverse(); } @@ -111695,7 +111871,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ height: legendHeight }, box.strokeWidth())); } - // hide the border if no items + // Hide the border if no items legendGroup[display ? 'show' : 'hide'](); // Open for responsiveness if (chart.styledMode && legendGroup.getStyle('display') === 'none') { @@ -111763,7 +111939,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ legend.clipRect = clipRect.destroy(); legend.contentGroup.clip(); } - // useHTML + // Use HTML if (legend.contentGroup.div) { legend.contentGroup.div.style.clip = height ? 'rect(' + padding + 'px,9999px,' + @@ -111817,11 +111993,11 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (lastY) { (allItems[i - 1].legendItem || {}).pageIx = len - 1; } - // add the last page if needed (#2617, #13683) + // Add the last page if needed (#2617, #13683) if ( - // check the last item + // Check the last item i === allItems.length - 1 && - // if adding next page is needed (#18768) + // If adding next page is needed (#18768) y + h - pages[len - 1] > clipHeight && y > pages[len - 1]) { pages.push(y); @@ -111921,7 +112097,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }); [this.down, this.downTracker].forEach(function (elem) { elem.attr({ - // adjust to text width + // Adjust to text width x: 18 + this.pager.getBBox().width, 'class': currentPage === pageCount ? 'highcharts-legend-nav-inactive' : @@ -112041,8 +112217,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ event = { browserEvent: event }; - // click the name or symbol - if (item.firePointEvent) { // point + // Click the name or symbol + if (item.firePointEvent) { // Point item.firePointEvent(strLegendItemClick, event, fnLegendItemClick); } else { @@ -112064,7 +112240,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ type: 'checkbox', className: 'highcharts-legend-checkbox', checked: item.selected, - defaultChecked: item.selected // required by IE7 + defaultChecked: item.selected // Required by IE7 }, legend.options.itemCheckboxStyle, legend.chart.container); addEvent(item.checkbox, 'click', function (event) { const target = event.target; @@ -112214,7 +112390,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.SeriesLegendItemClickEventObject#type * @type {"legendItemClick"} */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file return Legend; }); @@ -112384,7 +112560,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @optionparent plotOptions.series */ const seriesDefaults = { - // base series options + // Base series options /** * The SVG value used for the `stroke-linecap` and `stroke-linejoin` * of a line graph. Round means that lines are rounded in the ends and @@ -114411,8 +114587,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock */ marker: { - // lineWidth: base + 1, - // radius: base + 1 + // `lineWidth: base + 1`, + // `radius: base + 1` }, /** * Options for the halo appearing around the hovered point in @@ -114939,7 +115115,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * */ this.zoneAxis = 'y'; - /** eslint-enable valid-jsdoc */ + // eslint-enable valid-jsdoc } /* * * @@ -115085,21 +115261,21 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const series = this, seriesOptions = series.options, chart = series.chart; let axisOptions; fireEvent(this, 'bindAxes', null, function () { - // repeat for xAxis and yAxis + // Repeat for xAxis and yAxis (series.axisTypes || []).forEach(function (coll) { - // loop through the chart's axis objects - chart[coll].forEach(function (axis) { + // Loop through the chart's axis objects + (chart[coll] || []).forEach(function (axis) { axisOptions = axis.options; - // apply if the series xAxis or yAxis option matches + // Apply if the series xAxis or yAxis option matches // the number of the axis, or if undefined, use the // first axis if (pick(seriesOptions[coll], 0) === axis.index || (typeof seriesOptions[coll] !== 'undefined' && seriesOptions[coll] === axisOptions.id)) { - // register this series in the axis.series lookup + // Register this series in the axis.series lookup insertItem(series, axis.series); - // set this series.xAxis or series.yAxis reference + // Set this series.xAxis or series.yAxis reference /** * Read only. The unique xAxis object associated * with the series. @@ -115115,7 +115291,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @type {Highcharts.Axis} */ series[coll] = axis; - // mark dirty for redraw + // Mark dirty for redraw axis.isDirty = true; } }); @@ -115259,7 +115435,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ fireEvent(this, 'setOptions', e); // These may be modified by the event const typeOptions = e.plotOptions[this.type], userPlotOptions = (userOptions.plotOptions || {}), userPlotOptionsSeries = userPlotOptions.series || {}, defaultPlotOptionsType = (defaultOptions.plotOptions[this.type] || {}), userPlotOptionsType = userPlotOptions[this.type] || {}; - // use copy to prevent undetected changes (#9762) + // Use copy to prevent undetected changes (#9762) /** * Contains series options by the user without defaults. * @name Highcharts.Series#userOptions @@ -115350,7 +115526,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Pick up either the colorIndex option, or the series.colorIndex // after Series.update() setting = pick(prop === 'color' ? this.options.colorIndex : void 0, this[indexName]); - if (defined(setting)) { // after Series.update() + if (defined(setting)) { // After Series.update() i = setting; } else { @@ -115667,7 +115843,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (!updatedData) { // Reset properties series.xIncrement = null; - series.colorCounter = 0; // for series with colorByPoint (#1547) + series.colorCounter = 0; // For series with colorByPoint (#1547) // Update parallel arrays this.parallelArrays.forEach(function (key) { series[key + 'Data'].length = 0; @@ -115679,7 +115855,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // conditional for max performance. if (turboThreshold && dataLength > turboThreshold) { firstPoint = series.getFirstValidPoint(data); - if (isNumber(firstPoint)) { // assume all points are numbers + if (isNumber(firstPoint)) { // Assume all points are numbers for (i = 0; i < dataLength; i++) { xData[i] = this.autoIncrement(); yData[i] = data[i]; @@ -115748,16 +115924,16 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } series.data = []; series.options.data = series.userOptions.data = data; - // destroy old points + // Destroy old points i = oldDataLength; while (i--) { oldData[i]?.destroy(); } - // reset minRange (#878) + // Reset minRange (#878) if (xAxis) { xAxis.minRange = xAxis.userMinRange; } - // redraw + // Redraw series.isDirty = chart.isDirtyBox = true; series.isDirtyData = !!oldData; animation = false; @@ -115838,29 +116014,29 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ options.getExtremesFromAll, // #4599 logarithmic = xAxis?.logarithmic, isCartesian = series.isCartesian; let croppedData, cropped, cropStart = 0, xExtremes, min, max, - // copied during slice operation: + // Copied during slice operation: processedXData = series.xData, processedYData = series.yData, updatingNames = false; const dataLength = processedXData.length; if (xAxis) { - // corrected for log axis (#3053) + // Corrected for log axis (#3053) xExtremes = xAxis.getExtremes(); min = xExtremes.min; max = xExtremes.max; updatingNames = !!(xAxis.categories && !xAxis.names.length); } - // optionally filter out points outside the plot area + // Optionally filter out points outside the plot area if (isCartesian && series.sorted && !getExtremesFromAll && (!cropThreshold || dataLength > cropThreshold || series.forceCrop)) { - // it's outside current extremes + // It's outside current extremes if (processedXData[dataLength - 1] < min || processedXData[0] > max) { processedXData = []; processedYData = []; - // only crop if it's actually spilling out + // Only crop if it's actually spilling out } else if (series.yData && (processedXData[0] < min || processedXData[dataLength - 1] > max)) { @@ -115915,7 +116091,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } const processedData = series.getProcessedData(); // Record the properties - series.cropped = processedData.cropped; // undefined or true + series.cropped = processedData.cropped; // Undefined or true series.cropStart = processedData.cropStart; series.processedXData = processedData.xData; series.processedYData = processedData.yData; @@ -115973,7 +116149,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ data = series.data = arr; } if (keys && hasGroupedData) { - // grouped data has already applied keys (#6590) + // Grouped data has already applied keys (#6590) series.options.keys = false; } for (i = 0; i < processedDataLength; i++) { @@ -116011,7 +116187,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ points[i] = point; } } - // restore keys options (#6590) + // Restore keys options (#6590) series.options.keys = keys; // Hide cropped-away points - this only runs when the number of // points is above cropThreshold, or when switching view from @@ -116020,7 +116196,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ (processedDataLength !== (dataLength = data.length) || hasGroupedData)) { for (i = 0; i < dataLength; i++) { - // when has grouped data, clear all points + // When has grouped data, clear all points if (i === cropStart && !hasGroupedData) { i += processedDataLength; } @@ -116119,12 +116295,12 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || - !xAxis || // for colorAxis support + !xAxis || // For colorAxis support ((xData[i + shoulder] || x) >= xMin && (xData[i - shoulder] || x) <= xMax)); if (validValue && withinRange) { j = y.length; - if (j) { // array, like ohlc or range data + if (j) { // Array, like ohlc or range data while (j--) { if (isNumber(y[j])) { // #7380, #11513 activeYData[activeCounter++] = y[j]; @@ -116202,7 +116378,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @emits Highcharts.Series#events:translate */ translate() { - if (!this.processedXData) { // hidden series + if (!this.processedXData) { // Hidden series this.processData(); } this.generatePoints(); @@ -116273,7 +116449,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ point.percentage = defined(point.y) && stackItem.total ? (point.y / stackItem.total * 100) : void 0; point.stackY = yValue; - // in case of variwide series (where widths of points are + // In case of variwide series (where widths of points are // different in most cases), stack labels are positioned // wrongly, so the call of the setOffset is omitted here and // labels are correctly positioned later, at the end of the @@ -116319,7 +116495,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ plotX; // #1514, #5383, #5518 // Negative points #19028 point.negative = (point.y || 0) < (threshold || 0); - // some API data + // Some API data point.category = pick(categories && categories[point.x], point.x); // Determine auto enabling of markers (#3635, #5099) if (!point.isNull && point.visible !== false) { @@ -116558,7 +116734,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ hasPointMarker = !!point.marker; const shouldDrawMarker = ((globallyEnabled && typeof pointMarkerOptions.enabled === 'undefined') || pointMarkerOptions.enabled) && !point.isNull && point.visible !== false; - // only draw the point if y is defined + // Only draw the point if y is defined if (shouldDrawMarker) { // Shortcuts const symbol = pick(pointMarkerOptions.symbol, series.symbol, 'rect'); @@ -116605,7 +116781,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ verb = 'animate'; } } - if (graphic && verb === 'animate') { // update + if (graphic && verb === 'animate') { // Update // Since the marker group isn't clipped, each // individual marker must be toggled graphic[isInside ? 'show' : 'hide'](isInside) @@ -116667,7 +116843,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } point.hasImage = symbol && symbol.indexOf('url') === 0; if (point.hasImage) { - radius = 0; // and subsequently width and height is not set + radius = 0; // And subsequently width and height is not set } const pos = point.pos(); if (isNumber(radius) && pos) { @@ -117479,7 +117655,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (withEvent !== false) { fireEvent(series, 'addPoint', { point: point }); } - // redraw + // Redraw series.isDirty = true; series.isDirtyData = true; if (redraw) { @@ -117524,7 +117700,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (point) { point.destroy(); } - // redraw + // Redraw series.isDirty = true; series.isDirtyData = true; if (redraw) { @@ -117616,7 +117792,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ options = diffObjects(options, this.userOptions); fireEvent(this, 'update', { options: options }); const series = this, chart = series.chart, - // must use user options when changing type because series.options + // Must use user options when changing type because series.options // is merged in with type specific plotOptions oldOptions = series.userOptions, initialType = series.initialType || series.type, plotOptions = chart.options.plotOptions, initialSeriesProto = seriesTypes[initialType].prototype, groups = [ 'group', @@ -117679,8 +117855,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ preserve.push(key + 'Data'); }); if (options.data) { - // setData uses dataSorting options so we need to update them - // earlier + // `setData` uses `dataSorting` options so we need to update + // them earlier if (options.dataSorting) { extend(series.options.dataSorting, options.dataSorting); } @@ -117830,16 +118006,16 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ onMouseOver() { const series = this, chart = series.chart, hoverSeries = chart.hoverSeries, pointer = chart.pointer; pointer?.setHoverChartIndex(); - // set normal state to previous series + // Set normal state to previous series if (hoverSeries && hoverSeries !== series) { hoverSeries.onMouseOut(); } - // trigger the event, but to save processing time, + // Trigger the event, but to save processing time, // only if defined if (series.options.events.mouseOver) { fireEvent(series, 'mouseOver'); } - // hover this + // Hover this series.setState('hover'); /** * Contains the original hovered series. @@ -117857,19 +118033,19 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @emits Highcharts.Series#event:mouseOut */ onMouseOut() { - // trigger the event only if listeners exist + // Trigger the event only if listeners exist const series = this, options = series.options, chart = series.chart, tooltip = chart.tooltip, hoverPoint = chart.hoverPoint; // #182, set to null before the mouseOut event fires chart.hoverSeries = null; - // trigger mouse out on the point, which must be in this series + // Trigger mouse out on the point, which must be in this series if (hoverPoint) { hoverPoint.onMouseOut(); } - // fire the mouse out event + // Fire the mouse out event if (series && options.events.mouseOut) { fireEvent(series, 'mouseOut'); } - // hide the tooltip + // Hide the tooltip if (tooltip && !series.stickyTracking && (!tooltip.shared || series.noSharedTooltip)) { @@ -118399,7 +118575,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * @typedef {"hover"|"inactive"|"normal"|"select"} Highcharts.SeriesStateValue */ - ''; // detach doclets above + ''; // Detach doclets above /* * * * API Options @@ -118535,7 +118711,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.zIndex */ - ''; // include precedent doclets in transpiled + ''; // Include precedent doclets in transpiled return Series; }); @@ -118625,7 +118801,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ static chart(a, b, c) { return new Chart(a, b, c); } - /** Implementation */ + // Implementation constructor(a, /* eslint-disable @typescript-eslint/no-unused-vars */ b, c @@ -118685,7 +118861,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ init(userOptions, callback) { // Fire the event with a default function fireEvent(this, 'init', { args: arguments }, function () { - const options = merge(defaultOptions, userOptions), // do the merge + const options = merge(defaultOptions, userOptions), // Do the merge optionsChart = options.chart; /** * The original options given to the constructor or a chart factory @@ -118997,7 +119173,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // Adjust title layout (reflow multiline text) chart.layOutTitles(false); - // link stacked series + // Link stacked series i = series.length; while (i--) { serie = series[i]; @@ -119009,7 +119185,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } } - if (hasDirtyStacks) { // mark others as dirty + if (hasDirtyStacks) { // Mark others as dirty i = series.length; while (i--) { serie = series[i]; @@ -119037,17 +119213,17 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ fireEvent(serie, 'updatedData'); } }); - // handle added or removed series + // Handle added or removed series if (redrawLegend && legend && legend.options.enabled) { - // draw legend graphics + // Draw legend graphics legend.render(); chart.isDirtyLegend = false; } - // reset stacks + // Reset stacks if (hasStackedSeries) { chart.getStacks(); } - // set axes scales + // Set axes scales axes.forEach(function (axis) { axis.updateNames(); axis.setScale(); @@ -119059,13 +119235,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ isDirtyBox = true; } }); - // redraw axes + // Redraw axes axes.forEach(function (axis) { // Fire 'afterSetExtremes' only if extremes are set const key = axis.min + ',' + axis.max; if (axis.extKey !== key) { // #821, #4452 axis.extKey = key; - // prevent a recursive call to chart.redraw() (#1119) + // Prevent a recursive call to chart.redraw() (#1119) afterRedraw.push(function () { fireEvent(axis, 'afterSetExtremes', extend(axis.eventArgs, axis.getExtremes())); // #747, #751 delete axis.eventArgs; @@ -119075,14 +119251,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ axis.redraw(); } }); - // the plot areas size has changed + // The plot areas size has changed if (isDirtyBox) { chart.drawChartBox(); } // Fire an event before redrawing series, used by the boost module to // clear previous series renderings. fireEvent(chart, 'predraw'); - // redraw affected series + // Redraw affected series series.forEach(function (serie) { if ((isDirtyBox || serie.isDirty) && serie.visible) { serie.redraw(); @@ -119091,11 +119267,11 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // for a hidden series after setData(). Fixes #6012 serie.isDirtyData = false; }); - // move tooltip or reset + // Move tooltip or reset if (pointer) { pointer.reset(true); } - // redraw if canvas + // Redraw if canvas renderer.draw(); // Fire the events fireEvent(chart, 'redraw'); @@ -119260,7 +119436,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const options = this.options[name] = merge(this.options[name], explicitOptions); let elem = this[name]; if (elem && explicitOptions) { - this[name] = elem = elem.destroy(); // remove old + this[name] = elem = elem.destroy(); // Remove old } if (options && !elem) { elem = this.renderer.text(options.text, 0, 0, options.useHTML) @@ -119526,7 +119702,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // Make a reference to the chart from the div attr(renderTo, indexAttrName, chart.index); - // remove previous chart + // Remove previous chart renderTo.innerHTML = AST.emptyHTML; // If the container doesn't have an offsetWidth, it has or is a child of // a node that has display:none. We need to temporarily move it out to a @@ -119536,7 +119712,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (!optionsChart.skipClone && !renderTo.offsetWidth) { chart.temporaryDisplay(); } - // get the width and height + // Get the width and height chart.getChartSize(); const chartHeight = chart.chartHeight; let chartWidth = chart.chartWidth; @@ -119547,7 +119723,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (!chart.styledMode) { containerStyle = extend({ position: 'relative', - // needed for context menu (avoidscrollbars) and content + // Needed for context menu (avoidscrollbars) and content // overflow in IE overflow: 'hidden', width: chartWidth + 'px', @@ -119584,7 +119760,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } chart.containerBox = chart.getContainerBox(); - // cache the cursor (#1650) + // Cache the cursor (#1650) chart._cursor = container.style.cursor; // Initialize the renderer const Renderer = optionsChart.renderer || !svg ? @@ -119656,7 +119832,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } }); }; - // pre-render axes to get labels offset width + // Pre-render axes to get labels offset width if (chart.hasCartesianSeries) { getOffset(chart.axes); } @@ -119832,12 +120008,12 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // resize observer (#19027). setTimeout(() => { if (chart) { - fireEvent(chart, 'endResize', void 0, () => { - chart.isResizing -= 1; - }); + fireEvent(chart, 'endResize'); } }, animObject(globalAnimation).duration); } + // Handle resizing counter even if we've re-rendered or not (#20548). + chart.isResizing -= 1; } /** * Set the public chart properties. This is done before and after the @@ -119940,7 +120116,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ marginNames.forEach(function (m, side) { chart[m] = pick(chart.margin[side], chart.spacing[side]); }); - chart.axisOffset = [0, 0, 0, 0]; // top, right, bottom, left + chart.axisOffset = [0, 0, 0, 0]; // Top, right, bottom, left chart.clipOffset = [0, 0, 0, 0]; } /** @@ -120080,7 +120256,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ optionsChart[key] || // The default series class: (klass && klass.prototype[key]); - // requires it + // Requires it // 4. Check if any the chart's series require it i = seriesOptions && seriesOptions.length; while (!value && i--) { @@ -120324,7 +120500,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ destroy() { const chart = this, axes = chart.axes, series = chart.series, container = chart.container, parentNode = container && container.parentNode; let i; - // fire the chart.destroy event + // Fire the chart.destroy event fireEvent(chart, 'destroy'); // Delete the chart from charts lookup array if (chart.renderer.forExport) { @@ -120335,7 +120511,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } H.chartCount--; chart.renderTo.removeAttribute('data-highcharts-chart'); - // remove events + // Remove events removeEvent(chart); // ==== Destroy collections: // Destroy axes @@ -120373,7 +120549,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ discardElement(container); } } - // clean it all up + // Clean it all up objectEach(chart, function (val, key) { delete chart[key]; }); @@ -120393,7 +120569,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ chart.setChartSize(); // Set the common chart properties (mainly invert) from the given series chart.propFromSeries(); - // get axes + // Get axes chart.getAxes(); // Initialize the series const series = isArray(options.series) ? options.series : []; @@ -120450,6 +120626,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } /** * Emit console warning if the a11y module is not loaded. + * @private */ warnIfA11yModuleNotLoaded() { const { options, title } = this; @@ -120505,7 +120682,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const chart = this; let series; if (options) { // <- not necessary - redraw = pick(redraw, true); // defaults to true + redraw = pick(redraw, true); // Defaults to true fireEvent(chart, 'addSeries', { options: options }, function () { series = chart.initSeries(options); chart.isDirtyLegend = true; @@ -120636,7 +120813,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } }; let loadingDiv = chart.loadingDiv, loadingSpan = chart.loadingSpan; - // create the layer at the first call + // Create the layer at the first call if (!loadingDiv) { chart.loadingDiv = loadingDiv = createElement('div', { className: 'highcharts-loading highcharts-loading-hidden' @@ -121100,7 +121277,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @function Highcharts.Chart#transform */ transform(params) { - const { axes = this.axes, event, from = {}, reset, selection, to = {}, trigger } = params, { inverted, resetZoomButton } = this; + const { axes = this.axes, event, from = {}, reset, selection, to = {}, trigger } = params, { inverted } = this; let hasZoomed = false, displayButton; // Remove active points for shared tooltip this.hoverPoints?.forEach((point) => point.setState()); @@ -121120,11 +121297,15 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ continue; } let newMin = axis.toValue(minPx, true) + - minPointOffset * pointRangeDirection, newMax = axis.toValue(minPx + len / scale, true) - - ((minPointOffset * pointRangeDirection) || - // Polar zoom tests failed when this was not commented: - // (axis.isXAxis && axis.pointRangePadding) || - 0), allExtremes = axis.allExtremes; + // Don't apply offset for selection (#20784) + (selection ? 0 : minPointOffset * pointRangeDirection), newMax = axis.toValue(minPx + len / scale, true) - + (selection ? // Don't apply offset for selection (#20784) + 0 : + ((minPointOffset * pointRangeDirection) || + // Polar zoom tests failed when this was not + // commented: + // (axis.isXAxis && axis.pointRangePadding) || + 0)), allExtremes = axis.allExtremes; if (newMin > newMax) { [newMin, newMax] = [newMax, newMin]; } @@ -121224,11 +121405,11 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } else { // Show or hide the Reset zoom button - if (displayButton && !resetZoomButton) { + if (displayButton && !this.resetZoomButton) { this.showResetZoom(); } - else if (!displayButton && resetZoomButton) { - this.resetZoomButton = resetZoomButton.destroy(); + else if (!displayButton && this.resetZoomButton) { + this.resetZoomButton = this.resetZoomButton.destroy(); } this.redraw(trigger === 'zoom' && (this.options.chart.animation ?? this.pointCount < 100)); @@ -121251,7 +121432,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ collectionsWithInit: { - // collectionName: [ initializingMethod, [extraArguments] ] + // CollectionName: [ initializingMethod, [extraArguments] ] xAxis: [Chart.prototype.addAxis, [true]], yAxis: [Chart.prototype.addAxis, [false]], series: [Chart.prototype.addSeries] @@ -121439,7 +121620,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.ChartIsInsideOptionsObject#visiblePlotOnly * @type {boolean|undefined} */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file return Chart; }); @@ -121889,9 +122070,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const attr = { r: options.borderRadius || 0, text: str, - // set default padding to 5 as it is in datalabels #12308 + // Set default padding to 5 as it is in datalabels #12308 padding: pick(options.padding, 5), - visibility: 'hidden' // hidden until setOffset is called + visibility: 'hidden' // Hidden until setOffset is called }; if (!chart.styledMode) { attr.fill = options.backgroundColor; @@ -121901,7 +122082,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } this.label.attr(attr); if (!this.label.added) { - this.label.add(group); // add to the labels-group + this.label.add(group); // Add to the labels-group } } // Rank it higher than data labels (#8742) @@ -122073,7 +122254,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.StackItemObject#x * @type {number} */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file return StackItem; }); @@ -122642,7 +122823,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Build the line points.forEach(function (point, i) { const plotX = point.plotX, plotY = point.plotY, lastPoint = points[i - 1], isNull = point.isNull || typeof plotY !== 'number'; - // the path to this point from the previous + // The path to this point from the previous let pathToPoint; if ((point.leftCliff || (lastPoint && lastPoint.rightCliff)) && !connectCliffs) { @@ -122669,14 +122850,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ pathToPoint = [series.getPointSpline(points, point, i)]; } else if (step) { - if (step === 1) { // right + if (step === 1) { // Right pathToPoint = [[ 'L', lastPoint.plotX, plotY ]]; } - else if (step === 2) { // center + else if (step === 2) { // Center pathToPoint = [[ 'L', (lastPoint.plotX + plotX) / 2, @@ -122701,7 +122882,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ]); } else { - // normal line to next point + // Normal line to next point pathToPoint = [[ 'L', plotX, @@ -122713,7 +122894,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ xMap.push(point.x); if (step) { xMap.push(point.x); - if (step === 2) { // step = center (#8073) + if (step === 2) { // Step = center (#8073) xMap.push(point.x); } } @@ -122999,7 +123180,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.line.data.marker */ - ''; // include precedent doclets in transpiled + ''; // Include precedent doclets in transpiled return LineSeries; }); @@ -123216,7 +123397,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // Sort the keys (#1651) objectEach(stack, function (stackX, x) { - // nulled after switching between + // Nulled after switching between // grouping and not (#1651, #2336) if (stackX.total !== null) { keys.push(x); @@ -123546,7 +123727,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @default {highstock} 0.75 * @apioption series.area.fillOpacity */ - ''; // adds doclets above to transpiled + ''; // Adds doclets above to transpiled return AreaSeries; }); @@ -123619,11 +123800,11 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } leftContY += correction; rightContY += correction; - // to prevent false extremes, check that control points are + // To prevent false extremes, check that control points are // between neighbouring points' y values if (leftContY > lastY && leftContY > plotY) { leftContY = Math.max(lastY, plotY); - // mirror of left control point + // Mirror of left control point rightContY = 2 * plotY - leftContY; } else if (leftContY < lastY && leftContY < plotY) { @@ -123638,7 +123819,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ rightContY = Math.min(nextY, plotY); leftContY = 2 * plotY - rightContY; } - // record for drawing in next point + // Record for drawing in next point point.rightContX = rightContX; point.rightContY = rightContY; // Visualize control points for debugging @@ -123714,7 +123895,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ plotX, plotY ]; - // reset for updating series later + // Reset for updating series later lastPoint.rightContX = lastPoint.rightContY = void 0; return ret; } @@ -123818,7 +123999,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.spline.data */ - ''; // adds doclets above intro transpiled + ''; // Adds doclets above intro transpiled return SplineSeries; }); @@ -123993,7 +124174,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @default 0.75 * @apioption series.areaspline.fillOpacity */ - ''; // adds doclets above into transpiled + ''; // Adds doclets above into transpiled return AreaSplineSeries; }); @@ -124307,7 +124488,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ y: void 0 }, - // false doesn't work well: https://jsfiddle.net/highcharts/hz8fopan/14/ + // False doesn't work well: https://jsfiddle.net/highcharts/hz8fopan/14/ /** @ignore-option */ startFromThreshold: true, stickyTracking: false, @@ -124483,7 +124664,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.column.states.select */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file /* * * * Default Export @@ -124550,14 +124731,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ else { attr.translateY = translatedThreshold; } - // apply final clipping (used in Highcharts Stock) (#7083) + // Apply final clipping (used in Highcharts Stock) (#7083) // animation is done by scaleY, so clipping is for panes if (series.clipBox) { series.setClip(); } series.group.attr(attr); } - else { // run the animation + else { // Run the animation translateStart = Number(series.group.attr(translateProp)); series.group.animate({ scaleY: 1 }, extend(animObject(series.options.animation), { // Do the scale synchronously to ensure smooth @@ -124585,7 +124766,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ super.init.apply(this, arguments); const series = this; chart = series.chart; - // if the series is added dynamically, force redraw of other + // If the series is added dynamically, force redraw of other // series affected by a new column if (chart.hasRendered) { chart.series.forEach(function (otherSeries) { @@ -124668,8 +124849,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @function Highcharts.seriesTypes.column#crispCol */ crispCol(x, y, w, h) { - const borderWidth = this.borderWidth, xCrisp = -(borderWidth % 2 ? 0.5 : 0); - let right, yCrisp = borderWidth % 2 ? 0.5 : 1; + const borderWidth = this.borderWidth, xCrisp = -(borderWidth % 2 ? 0.5 : 0), yCrisp = borderWidth % 2 ? 0.5 : 1; + let right; // Horizontal. We need to first compute the exact right edge, then // round it and compute the width from there. if (this.options.crisp) { @@ -124774,7 +124955,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const series = this, chart = series.chart, options = series.options, dense = series.dense = series.closestPointRange * series.xAxis.transA < 2, borderWidth = series.borderWidth = pick(options.borderWidth, dense ? 0 : 1 // #3635 ), xAxis = series.xAxis, yAxis = series.yAxis, threshold = options.threshold, minPointLength = pick(options.minPointLength, 5), metrics = series.getColumnMetrics(), seriesPointWidth = metrics.width, seriesXOffset = series.pointXOffset = metrics.offset, dataMin = series.dataMin, dataMax = series.dataMax; - // postprocessed for border width + // Postprocessed for border width let seriesBarW = series.barW = Math.max(seriesPointWidth, 1 + 2 * borderWidth), translatedThreshold = series.translatedThreshold = yAxis.getThreshold(threshold); @@ -124807,9 +124988,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ isNumber(dataMax) && point.y === threshold && dataMax <= threshold && - // and if there's room for it (#7311) + // And if there's room for it (#7311) (yAxis.min || 0) < threshold && - // if all points are the same value (i.e zero) not draw + // If all points are the same value (i.e zero) not draw // as negative points (#10646), but only if there's room // for it (#14876) (dataMin !== dataMax || (yAxis.max || 0) <= threshold)) { @@ -124886,7 +125067,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ pointAttribs(point, state) { const options = this.options, p2o = this.pointAttrToOptions || {}, strokeOption = p2o.stroke || 'borderColor', strokeWidthOption = p2o['stroke-width'] || 'borderWidth'; let stateOptions, zone, brightness, fill = (point && point.color) || this.color, - // set to fill when borderColor null: + // Set to fill when borderColor null: stroke = ((point && point[strokeOption]) || options[strokeOption] || fill), dashstyle = (point && point.options.dashStyle) || options.dashStyle, strokeWidth = (point && point[strokeWidthOption]) || @@ -124947,7 +125128,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ drawPoints(points = this.points) { const series = this, chart = this.chart, options = series.options, renderer = chart.renderer, animationLimit = options.animationLimit || 250; let shapeArgs; - // draw the columns + // Draw the columns points.forEach(function (point) { const plotY = point.plotY; let graphic = point.graphic, hasGraphic = !!graphic, verb = graphic && chart.pointCount < animationLimit ? @@ -124980,7 +125161,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ verb = 'animate'; } } - if (graphic && hasGraphic) { // update + if (graphic && hasGraphic) { // Update graphic[verb](merge(shapeArgs)); } // Presentational @@ -125032,7 +125213,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (!series._hasTracking) { series.trackerGroups.forEach(function (key) { if (series[key]) { - // we don't always have dataLabelsGroup + // We don't always have dataLabelsGroup series[key] .addClass('highcharts-tracker') .on('mouseover', onMouseOver) @@ -125058,7 +125239,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ remove() { const series = this, chart = series.chart; - // column and bar series affects other series of the same type + // Column and bar series affects other series of the same type // as they are either stacked or grouped if (chart.hasRendered) { chart.series.forEach(function (otherSeries) { @@ -125111,7 +125292,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.ColumnMetricsObject#offset * @type {number} */ - ''; // detach doclets above + ''; // Detach doclets above return ColumnSeries; }); @@ -125502,7 +125683,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ point.graphic, textPathOptions); if (point.dataLabelPath && !textPathOptions.enabled) { - // clean the DOM + // Clean the DOM point.dataLabelPath = (point.dataLabelPath.destroy()); } } @@ -125711,7 +125892,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * @typedef {"allow"|"justify"} Highcharts.DataLabelsOverflowValue */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file return DataLabel; }); @@ -125863,7 +126044,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @optionparent plotOptions.bar */ BarSeries.defaultOptions = merge(ColumnSeries.defaultOptions, { - // nothing here yet + // Nothing here yet }); extend(BarSeries.prototype, { inverted: true @@ -125958,7 +126139,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.bar.states.select */ - ''; // gets doclets above into transpiled + ''; // Gets doclets above into transpiled return BarSeries; }); @@ -126145,7 +126326,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.scatter.data */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file /* * * * Default Export @@ -126201,15 +126382,12 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (jitter) { this.points.forEach(function (point, i) { ['x', 'y'].forEach(function (dim, j) { - let axis, plotProp = 'plot' + dim.toUpperCase(), min, max, translatedJitter; if (jitter[dim] && !point.isNull) { - axis = series[dim + 'Axis']; - translatedJitter = - jitter[dim] * axis.transA; - if (axis && !axis.isLog) { + const plotProp = `plot${dim.toUpperCase()}`, axis = series[`${dim}Axis`], translatedJitter = jitter[dim] * + axis.transA; + if (axis && !axis.logarithmic) { // Identify the outer bounds of the jitter range - min = Math.max(0, point[plotProp] - translatedJitter); - max = Math.min(axis.len, point[plotProp] + translatedJitter); + const min = Math.max(0, (point[plotProp] || 0) - translatedJitter), max = Math.min(axis.len, (point[plotProp] || 0) + translatedJitter); // Find a random position within this range point[plotProp] = min + (max - min) * unrandom(i + j * len); @@ -126325,17 +126503,17 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ for (i = 0; i < 4; ++i) { value = positions[i]; handleSlicingRoom = i < 2 || (i === 2 && /%$/.test(value)); - // i == 0: centerX, relative to width + // I == 0: centerX, relative to width // i == 1: centerY, relative to height // i == 2: size, relative to smallestSize // i == 3: innerSize, relative to size positions[i] = relativeLength(value, [plotWidth, plotHeight, smallestSize, positions[2]][i]) + (handleSlicingRoom ? slicingRoom : 0); } - // innerSize cannot be larger than size (#3632) + // Inner size cannot be larger than size (#3632) if (positions[3] > positions[2]) { positions[3] = positions[2]; } - // thickness overrides innerSize, need to be less than pie size (#6647) + // Thickness overrides innerSize, need to be less than pie size (#6647) if (isNumber(thickness) && thickness * 2 < positions[2] && thickness > 0) { positions[3] = positions[2] - thickness * 2; @@ -126345,7 +126523,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } CenteredUtilities.getCenter = getCenter; /** - * getStartAndEndRadians - Calculates start and end angles in radians. + * GetStartAndEndRadians - Calculates start and end angles in radians. * Used in series types such as pie and sunburst. * * @private @@ -126361,9 +126539,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * Returns an object containing start and end angles as radians. */ function getStartAndEndRadians(start, end) { - const startAngle = isNumber(start) ? start : 0, // must be a number - endAngle = ((isNumber(end) && // must be a number - end > startAngle && // must be larger than the start angle + const startAngle = isNumber(start) ? start : 0, // Must be a number + endAngle = ((isNumber(end) && // Must be a number + end > startAngle && // Must be larger than the start angle // difference must be less than 360 degrees (end - startAngle) < 360) ? end : @@ -126395,7 +126573,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.RadianAngles#start * @type {number} */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file return CenteredUtilities; }); @@ -126522,7 +126700,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ slice(sliced, redraw, animation) { const series = this.series, chart = series.chart; setAnimation(animation, chart); - // redraw is true by default + // Redraw is true by default redraw = pick(redraw, true); /** * Pie series only. Whether to display a slice offset from the @@ -126533,7 +126711,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // if called without an argument, toggle this.sliced = this.options.sliced = sliced = defined(sliced) ? sliced : !this.sliced; - // update userOptions.data + // Update userOptions.data series.options.data[series.data.indexOf(this)] = this.options; if (this.graphic) { @@ -126543,7 +126721,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } extend(PiePoint.prototype, { connectorShapes: { - // only one available before v7.0.0 + // Only one available before v7.0.0 fixedOffset: function (labelPosition, connectorPosition, options) { const breakAt = connectorPosition.breakAt, touchingSliceAt = connectorPosition.touchingSliceAt, lineSegment = options.softConnector ? [ 'C', @@ -126561,7 +126739,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ breakAt.x, breakAt.y ]; - // assemble the path + // Assemble the path return ([ ['M', labelPosition.x, labelPosition.y], lineSegment, @@ -126570,7 +126748,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }, straight: function (labelPosition, connectorPosition) { const touchingSliceAt = connectorPosition.touchingSliceAt; - // direct line to the slice + // Direct line to the slice return [ ['M', labelPosition.x, labelPosition.y], ['L', touchingSliceAt.x, touchingSliceAt.y] @@ -127282,7 +127460,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highmaps * @apioption series.pie.events */ - ''; // placeholder for transpiled doclets above + ''; // Placeholder for transpiled doclets above /* * * * Default Export @@ -127335,14 +127513,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ points.forEach(function (point) { const graphic = point.graphic, args = point.shapeArgs; if (graphic && args) { - // start values + // Start values graphic.attr({ - // animate from inner radius (#779) + // Animate from inner radius (#779) r: pick(point.startR, (series.center && series.center[3] / 2)), start: startAngleRad, end: startAngleRad }); - // animate + // Animate graphic.animate({ r: args.r, start: args.start, @@ -127461,7 +127639,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (series.group && !chart.styledMode) { series.group.shadow(series.options.shadow); } - // draw the slices + // Draw the slices series.points.forEach(function (point) { const animateTo = {}; graphic = point.graphic; @@ -127523,7 +127701,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ translate(positions) { fireEvent(this, 'translate'); this.generatePoints(); - const series = this, precision = 1000, // issue #172 + const series = this, precision = 1000, // Issue #172 options = series.options, slicedOffset = options.slicedOffset, radians = getStartAndEndRadians(options.startAngle, options.endAngle), startAngleRad = series.startAngleRad = radians.start, endAngleRad = series.endAngleRad = radians.end, circ = endAngleRad - startAngleRad, // 2 * Math.PI, points = series.points, ignoreHiddenPoint = options.ignoreHiddenPoint, len = points.length; let start, end, angle, @@ -127710,7 +127888,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // touches the right edge of the plot area. alignToConnectors: function (points, half, plotWidth, plotLeft) { let maxDataLabelWidth = 0, dataLabelWidth; - // find widest data label + // Find widest data label points.forEach(function (point) { dataLabelWidth = point.dataLabel.getBBox().width; if (dataLabelWidth > maxDataLabelWidth) { @@ -128051,7 +128229,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ function verifyDataLabelOverflow(overflow) { - let center = this.center, options = this.options, centerOption = options.center, minSize = options.minSize || 80, newSize = minSize, + const center = this.center, options = this.options, centerOption = options.center, minSize = options.minSize || 80; + let newSize = minSize, // If a size is set, return true and don't try to shrink the pie // to fit the labels. ret = options.size !== null; @@ -128063,9 +128242,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } else { // Auto center newSize = Math.max( - // horizontal overflow + // Horizontal overflow center[2] - overflow[1] - overflow[3], minSize); - // horizontal center + // Horizontal center center[0] += (overflow[3] - overflow[1]) / 2; } // Handle vertical size and center @@ -128074,9 +128253,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } else { // Auto center newSize = clamp(newSize, minSize, - // vertical overflow + // Vertical overflow center[2] - overflow[0] - overflow[2]); - // vertical center + // Vertical center center[1] += (overflow[0] - overflow[2]) / 2; } // If the size must be decreased, we need to run translate and @@ -128639,21 +128818,21 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Preserve the box for data labels path.length = 0; path.push(['M', ...a], - // top side + // Top side ['L', ...b], - // top right corner + // Top right corner ['A', rTop, rTop, 0, 0, 1, ...c], - // right side + // Right side ['L', ...d], - // bottom right corner + // Bottom right corner ['A', rBtm, rBtm, 0, 0, 1, ...e], - // bottom side + // Bottom side ['L', ...f], - // bottom left corner + // Bottom left corner ['A', rBtm, rBtm, 0, 0, 1, ...g], - // left side + // Left side ['L', ...h], - // top left corner + // Top left corner ['A', rTop, rTop, 0, 0, 1, ...a], ['Z']); return path; } @@ -128707,7 +128886,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @type {string} * @default end */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file return BorderRadius; }); @@ -128850,7 +129029,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @return {boolean} * Return `true` if it applies. */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file /* * * * API Options @@ -128963,7 +129142,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @since 5.0.0 * @apioption responsive.rules.condition.minWidth */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file return Responsive; }); @@ -129243,7 +129422,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ function afterProcessData() { const series = this; - if (series.xAxis && // not pies + if (series.xAxis && // Not pies series.processedYData && series.dataModify) { const processedXData = series.processedXData, processedYData = series.processedYData, length = processedYData.length, compareStart = series.options.compareStart === true ? 0 : 1; @@ -129253,7 +129432,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (series.pointArrayMap) { keyIndex = series.pointArrayMap.indexOf(series.options.pointValKey || series.pointValKey || 'y'); } - // find the first value for comparison + // Find the first value for comparison for (i = 0; i < length - compareStart; i++) { const compareValue = processedYData[i] && keyIndex > -1 ? processedYData[i][keyIndex] : processedYData[i]; @@ -129427,7 +129606,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ value = 100 * (value / compareValue) - (compareBase === 100 ? 0 : 100); } - // record for tooltip etc. + // Record for tooltip etc. if (typeof index !== 'undefined') { const point = this.series.points[index]; if (point) { @@ -129554,7 +129733,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highstock * @apioption plotOptions.series.cumulative */ - ''; // keeps doclets above in transpiled file + ''; // Keeps doclets above in transpiled file return DataModifyComposition; }); @@ -129657,7 +129836,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ 0) - (this.titleOffset ? this.titleOffset[2] : 0); } - if (xAxis && yAxis) { // false if navigator is disabled (#904) + if (xAxis && yAxis) { // False if navigator is disabled (#904) if (this.inverted) { xAxis.options.left = yAxis.options.left = navigator.left; } @@ -129863,9 +130042,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @function Highcharts.Axis#toFixedRange */ toFixedRange(pxMin, pxMax, fixedMin, fixedMax) { - const axis = this.axis, chart = axis.chart, overscroll = pick(axis.ordinal?.convertOverscroll(axis.options.overscroll), 0); + const axis = this.axis, halfPointRange = (axis.pointRange || 0) / 2; let newMin = pick(fixedMin, axis.translate(pxMin, true, !axis.horiz)), newMax = pick(fixedMax, axis.translate(pxMax, true, !axis.horiz)); - const fixedRange = chart && chart.fixedRange, halfPointRange = (axis.pointRange || 0) / 2; // Add/remove half point range to/from the extremes (#1172) if (!defined(fixedMin)) { newMin = correctFloat(newMin + halfPointRange); @@ -129873,17 +130051,6 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (!defined(fixedMax)) { newMax = correctFloat(newMax - halfPointRange); } - // Make sure panning to the edges does not decrease the zoomed range - if (fixedRange && axis.dataMin && axis.dataMax) { - const maxWithOverscroll = axis.dataMax + overscroll; - if (newMax >= maxWithOverscroll) { - newMin = correctFloat(maxWithOverscroll - fixedRange); - newMax = correctFloat(maxWithOverscroll); - } - if (newMin <= axis.dataMin) { - newMax = correctFloat(axis.dataMin + fixedRange); - } - } if (!isNumber(newMin) || !isNumber(newMax)) { // #1195, #7411 newMin = newMax = void 0; } @@ -130413,7 +130580,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highstock gantt * @apioption xAxis.maxRange */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file return NavigatorDefaults; }); @@ -131166,7 +131333,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ cursorToScrollbarPosition(normalizedEvent) { const scroller = this, options = scroller.options, minWidthDifference = options.minWidth > scroller.calculatedWidth ? options.minWidth : - 0; // minWidth distorts translation + 0; // `minWidth` distorts translation return { chartX: (normalizedEvent.chartX - scroller.x - scroller.xOffset) / @@ -131277,7 +131444,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ scroller.options = merge(ScrollbarDefaults, defaultOptions.scrollbar, options); scroller.options.margin = pick(scroller.options.margin, 10); scroller.chart = chart; - // backward compatibility + // Backward compatibility scroller.size = pick(scroller.options.size, scroller.options.height); // Init if (options.enabled) { @@ -131364,7 +131531,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ scroller.group.show(); scroller.x = x; scroller.y = y + this.trackBorderWidth; - scroller.width = width; // width with buttons + scroller.width = width; // Width with buttons scroller.height = height; scroller.xOffset = xOffset; scroller.yOffset = yOffset; @@ -131373,14 +131540,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ scroller.width = scroller.yOffset = width = yOffset = scroller.size; scroller.xOffset = xOffset = 0; scroller.yOffset = yOffset = buttonsEnabled ? scroller.size : 0; - // width without buttons + // Width without buttons scroller.barWidth = height - (buttonsEnabled ? width * 2 : 0); scroller.x = x = x + margin; } else { scroller.height = height = scroller.size; scroller.xOffset = xOffset = buttonsEnabled ? scroller.size : 0; - // width without buttons + // Width without buttons scroller.barWidth = width - (buttonsEnabled ? height * 2 : 0); scroller.y = scroller.y + margin; } @@ -131423,7 +131590,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ .attr({ zIndex: options.zIndex }) - .hide() // initially hide the scrollbar #15863 + .hide() // Initially hide the scrollbar #15863 .add(); // Draw the scrollbar group scroller.group = group; @@ -131777,7 +131944,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ left + height, navigatorTop - scrollButtonSize - outlineCorrection ], - // top right of zoomed range + // Top right of zoomed range ['L', left + height, verticalMin], ['L', left, verticalMin], ['M', left, zoomedMax], @@ -131790,9 +131957,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ]; if (maskInside) { path.push( - // upper left of zoomed range + // Upper left of zoomed range ['M', left + height, verticalMin - halfOutline], - // upper right of z.r. + // Upper right of z.r. [ 'L', left + height, @@ -131805,17 +131972,17 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ zoomedMin += left + scrollButtonSize - outlineCorrection; zoomedMax += left + scrollButtonSize - outlineCorrection; path = [ - // left + // Left ['M', left, lineTop], - // upper left of zoomed range + // Upper left of zoomed range ['L', zoomedMin, lineTop], - // lower left of z.r. + // Lower left of z.r. ['L', zoomedMin, lineBtm], - // lower right of z.r. + // Lower right of z.r. ['M', zoomedMax, lineBtm], - // upper right of z.r. + // Upper right of z.r. ['L', zoomedMax, lineTop], - // right + // Right [ 'L', left + navigatorSize + scrollButtonSize * 2, @@ -131824,9 +131991,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ]; if (maskInside) { path.push( - // upper left of zoomed range + // Upper left of zoomed range ['M', zoomedMin - halfOutline, lineTop], - // upper right of z.r. + // Upper right of z.r. ['L', zoomedMax + halfOutline, lineTop]); } } @@ -131956,8 +132123,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ rotationOriginY: (height + width) / 2 }); } - // zIndex = 6 for right handle, 7 for left. - // Can't be 10, because of the tooltip in inverted chart #2908 + // Z index is 6 for right handle, 7 for left. Can't be 10, + // because of the tooltip in inverted chart (#2908). navigator.handles[index].attr({ zIndex: 7 - index }) .addClass('highcharts-navigator-handle ' + 'highcharts-navigator-handle-' + @@ -132032,7 +132199,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } navigator.left = pick(xAxis.left, - // in case of scrollbar only, without navigator + // In case of scrollbar only, without navigator chart.plotLeft + scrollButtonSize + (inverted ? chart.plotWidth : 0)); let zoomedMax = navigator.size = navigatorSize = pick(xAxis.len, (inverted ? chart.plotHeight : chart.plotWidth) - @@ -132229,7 +132396,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ fixedMax = navigator.getUnionExtremes().dataMax; } } - if (left !== zoomedMin) { // it has actually moved + if (left !== zoomedMin) { // It has actually moved navigator.fixedWidth = range; // #1370 ext = xAxis.navigatorAxis.toFixedRange(left, left + range, fixedMin, fixedMax); if (defined(ext.min)) { // #7411 @@ -132312,9 +132479,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } else if (navigator.grabbedCenter) { navigator.hasDragged = true; - if (chartX < dragOffset) { // outside left + if (chartX < dragOffset) { // Outside left chartX = dragOffset; - // outside right + // Outside right } else if (chartX > navigatorSize + dragOffset - range) { @@ -132475,9 +132642,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ chart.xAxis[0] || { options: {} }; chart.isDirtyBox = true; if (navigator.navigatorEnabled) { - // an x axis is required for scrollbar also + // An x axis is required for scrollbar also navigator.xAxis = new Axis(chart, merge({ - // inherit base xAxis' break, ordinal options and overscroll + // Inherit base xAxis' break, ordinal options and overscroll breaks: baseXaxis.options.breaks, ordinal: baseXaxis.options.ordinal, overscroll: baseXaxis.options.overscroll @@ -132525,7 +132692,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // We've got one, now add it as base if (chart.series.length > 0 && !navigator.series) { navigator.setBaseSeries(); - navigator.unbindRedraw(); // reset + navigator.unbindRedraw(); // Reset } }); } @@ -132534,7 +132701,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ navigator.renderElements(); // Add mouse events navigator.addMouseEvents(); - // in case of scrollbar only, fake an x axis to get translation + // In case of scrollbar only, fake an x axis to get translation } else { navigator.xAxis = { @@ -132545,9 +132712,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ translate: function (value, reverse) { const axis = chart.xAxis[0], ext = axis.getExtremes(), scrollTrackWidth = axis.len - 2 * scrollButtonSize, min = numExt('min', axis.options.min, ext.dataMin), valueRange = numExt('max', axis.options.max, ext.dataMax) - min; return reverse ? - // from pixel to value + // From pixel to value (value * valueRange / scrollTrackWidth) + min : - // from value to pixel + // From value to pixel scrollTrackWidth * (value - min) / valueRange; }, toPixels: function (value) { @@ -132884,7 +133051,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ newMax = baseDataMax + overscroll; // If stickToMin is true, the new min value is set above if (!stickToMin) { - newMin = Math.max(baseDataMin, // don't go below data extremes (#13184) + newMin = Math.max(baseDataMin, // Don't go below data extremes (#13184) newMax - range, navigator.getBaseSeriesMin(navigatorSeries && navigatorSeries.xData ? navigatorSeries.xData[0] : -Number.MAX_VALUE)); @@ -132975,7 +133142,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }), // Make room for the navigator, can be placed around the chart: addEvent(this.chart, 'getMargins', function () { - let chart = this, navigator = chart.navigator, marginName = navigator.opposite ? + const chart = this, navigator = chart.navigator; + let marginName = navigator.opposite ? 'plotTop' : 'marginBottom'; if (chart.inverted) { marginName = navigator.opposite ? @@ -133269,15 +133437,15 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ return index; } let i = ordinalPositions.length - 1, distance; - if (index < 0) { // out of range, in effect panning to the left + if (index < 0) { // Out of range, in effect panning to the left index = ordinalPositions[0]; } - else if (index > i) { // out of range, panning to the right + else if (index > i) { // Out of range, panning to the right index = ordinalPositions[i]; } - else { // split it up + else { // Split it up i = Math.floor(index); - distance = index - i; // the decimal + distance = index - i; // The decimal } if (typeof distance !== 'undefined' && typeof ordinalPositions[i] !== 'undefined') { @@ -133299,7 +133467,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ function lin2val(val) { const axis = this, ordinal = axis.ordinal, localMin = axis.old ? axis.old.min : axis.min, localA = axis.old ? axis.old.transA : axis.transA; // Always use extendedPositions (#19816) - let positions = ordinal.getExtendedPositions(); + const positions = ordinal.getExtendedPositions(); // In some cases (especially in early stages of the chart creation) the // getExtendedPositions might return undefined. if (positions && positions.length) { @@ -133407,12 +133575,12 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ panning.type !== 'y' && xAxis.options.ordinal && xAxis.series.length) { - const mouseDownX = chart.mouseDownX, extremes = xAxis.getExtremes(), dataMax = extremes.dataMax, min = extremes.min, max = extremes.max, hoverPoints = chart.hoverPoints, closestPointRange = (xAxis.closestPointRange || + const mouseDownX = chart.mouseDownX, extremes = xAxis.getExtremes(), dataMin = extremes.dataMin, dataMax = extremes.dataMax, min = extremes.min, max = extremes.max, hoverPoints = chart.hoverPoints, closestPointRange = (xAxis.closestPointRange || (xAxis.ordinal && xAxis.ordinal.overscrollPointsRange)), pointPixelWidth = (xAxis.translationSlope * (xAxis.ordinal.slope || closestPointRange)), - // how many ordinal units did we move? + // How many ordinal units did we move? movedUnits = Math.round((mouseDownX - chartX) / pointPixelWidth), - // get index of all the chart's points + // Get index of all the chart's points extendedOrdinalPositions = xAxis.ordinal.getExtendedPositions(), extendedAxis = { ordinal: { positions: extendedOrdinalPositions, @@ -133420,7 +133588,12 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } }, index2val = xAxis.index2val, val2lin = xAxis.val2lin; let trimmedRange, ordinalPositions; - // we have an ordinal axis, but the data is equally spaced + // Make sure panning to the edges does not decrease the zoomed range + if ((min <= dataMin && movedUnits < 0) || + (max + overscroll >= dataMax && movedUnits > 0)) { + return; + } + // We have an ordinal axis, but the data is equally spaced if (!extendedAxis.ordinal.positions) { runBase = true; } @@ -133459,14 +133632,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ trimmedRange.max <= Math.max(dataMax, max) + overscroll) { xAxis.setExtremes(trimmedRange.min, trimmedRange.max, true, false, { trigger: 'pan' }); } - chart.mouseDownX = chartX; // set new reference for next run + chart.mouseDownX = chartX; // Set new reference for next run css(chart.container, { cursor: 'move' }); } } else { runBase = true; } - // revert to the linear chart.pan version + // Revert to the linear chart.pan version if (runBase || (panning && /y/.test(panning.type))) { if (overscroll) { xAxis.max = xAxis.dataMax + overscroll; @@ -133514,7 +133687,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (ordinalPositions[0] <= val && ordinalPositions[ordinalLength - 1] >= val) { ordinalIndex = getIndexInArray(ordinalPositions, val); - // final return value is based on ordinalIndex + // Final return value is based on ordinalIndex } else { extendedOrdinalPositions = @@ -133530,8 +133703,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ extendedOrdinalPositions[0]) / length; } - // OriginalPointReference is equal to the index of - // first point of ordinalPositions in extendedOrdinalPositions. + // `originalPointReference` is equal to the index of first point of + // ordinalPositions in extendedOrdinalPositions. const originalPositionsReference = getIndexInArray(extendedOrdinalPositions, ordinalPositions[0]); // If the searched value is outside the visiblePlotArea, // check if it is inside extendedOrdinalPositions. @@ -133626,13 +133799,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (series.reserveSpace() && (series .takeOrdinalPosition !== false || hasBreaks)) { - // concatenate the processed X data into the existing + // Concatenate the processed X data into the existing // positions, or the empty array ordinalPositions = ordinalPositions.concat(series.processedXData); len = ordinalPositions.length; - // remove duplicates (#1588) + // Remove duplicates (#1588) ordinalPositions.sort(function (a, b) { - // without a custom function it is sorted as strings + // Without a custom function it is sorted as strings return a - b; }); overscrollPointsRange = Math.min(overscrollPointsRange, pick( @@ -133669,12 +133842,12 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ordinalPositions.pop(); ordinalPositions.shift(); } - // cache the length + // Cache the length len = ordinalPositions.length; // Check if we really need the overhead of mapping axis data // against the ordinal positions. If the series consist of // evenly spaced data any way, we don't need any ordinal logic. - if (len > 2) { // two points have equal distance by default + if (len > 2) { // Two points have equal distance by default dist = ordinalPositions[1] - ordinalPositions[0]; i = len - 1; while (i-- && !useOrdinal) { @@ -133744,7 +133917,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } axis.isOrdinal = isOrdinal && useOrdinal; // #3818, #4196, #4926 - ordinal.groupIntervalFactor = null; // reset for next run + ordinal.groupIntervalFactor = null; // Reset for next run } /** * Faster way of using the Array.indexOf method. @@ -133846,12 +134019,12 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } fakeSeries.options = { dataGrouping: grouping ? { - firstAnchor: 'firstPoint', - anchor: 'middle', - lastAnchor: 'lastPoint', + firstAnchor: series.options.dataGrouping?.firstAnchor, + anchor: series.options.dataGrouping?.anchor, + lastAnchor: series.options.dataGrouping?.firstAnchor, enabled: true, forced: true, - // doesn't matter which, use the fastest + // Doesn't matter which, use the fastest approximation: 'open', units: [[ grouping.unitName, @@ -133975,7 +134148,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const ordinalPointPixelInterval = axis.translationSlope * (ordinal.slope || axis.closestPointRange || ordinal.overscrollPointsRange), - // toValue for the first point. + // `toValue` for the first point. shiftIndex = correctFloat((val - firstPointX) / ordinalPointPixelInterval); return Additions.findIndexOf(ordinalArray, firstPointVal, true) + shiftIndex; } @@ -134779,17 +134952,17 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const events = find(chartDestroyEvents, (e) => e[0] === chart); if (!events) { chartDestroyEvents.push([chart, [ - // redraw the scroller on setExtremes + // Redraw the scroller on setExtremes addEvent(chart.xAxis[0], 'afterSetExtremes', function (e) { if (rangeSelector) { rangeSelector.render(e.min, e.max); } }), - // redraw the scroller chart resize + // Redraw the scroller chart resize addEvent(chart, 'redraw', redraw) ]]); } - // do it now + // Do it now redraw(); } } @@ -134807,6 +134980,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } } + /** + * + */ function onChartGetMargins() { const rangeSelector = this.rangeSelector; if (rangeSelector) { @@ -134977,7 +135153,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const rangeSelector = this, chart = rangeSelector.chart, rangeOptions = rangeSelector.buttonOptions[i], baseAxis = chart.xAxis[0], unionExtremes = (chart.scroller && chart.scroller.getUnionExtremes()) || baseAxis || {}, type = rangeOptions.type, dataGrouping = rangeOptions.dataGrouping; let dataMin = unionExtremes.dataMin, dataMax = unionExtremes.dataMax, newMin, newMax = baseAxis && Math.round(Math.min(baseAxis.max, pick(dataMax, baseAxis.max))), // #1568 baseXAxisOptions, range = rangeOptions._range, rangeMin, minSetting, rangeSetting, ctx, ytdExtremes, addOffsetMin = true; - // chart has no data, base series is removed + // Chart has no data, base series is removed if (dataMin === null || dataMax === null) { return; } @@ -135032,7 +135208,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ dataMin = Number.MAX_VALUE; dataMax = Number.MIN_VALUE; chart.series.forEach((series) => { - // reassign it to the last item + // Reassign it to the last item const xData = series.xData; if (xData) { dataMin = Math.min(xData[0], dataMin); @@ -135088,7 +135264,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } else { // Existing axis object. Set extremes after render time. - baseAxis.setExtremes(newMin, newMax, pick(redraw, true), void 0, // auto animation + baseAxis.setExtremes(newMin, newMax, pick(redraw, true), void 0, // Auto animation { trigger: 'rangeSelectorButton', rangeSelectorButton: rangeOptions @@ -135268,7 +135444,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ computeButtonRange(rangeOptions) { const type = rangeOptions.type, count = rangeOptions.count || 1, - // these time intervals have a fixed number of milliseconds, as + // These time intervals have a fixed number of milliseconds, as // opposed to month, ytd and year fixedTimes = { millisecond: 1, @@ -135553,7 +135729,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }; // Hide away the input box input.onblur = () => { - // update extremes only when inputs are active + // Update extremes only when inputs are active if (input === H.doc.activeElement) { // Only when focused // Update also when no `change` event is triggered, like when // clicking inside the SVG (#4710) @@ -135565,7 +135741,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ input.blur(); // #4606 }; let keyDown = false; - // handle changes in the input boxes + // Handle changes in the input boxes input.onchange = () => { // Update extremes and blur input when clicking date input calendar if (!keyDown) { @@ -135602,7 +135778,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ getPosition() { const chart = this.chart, options = chart.options.rangeSelector, top = options.verticalAlign === 'top' ? chart.plotTop - chart.axisOffset[0] : - 0; // set offset only for verticalAlign top + 0; // Set offset only for verticalAlign top return { buttonTop: top + options.buttonPosition.y, inputTop: top + options.inputPosition.y - 10 @@ -135647,7 +135823,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (options.enabled === false) { return; } - // create the elements + // Create the elements if (!rendered) { this.group = renderer.g('range-selector-group') .attr({ @@ -135783,7 +135959,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }, void 0, dropdown); buttons[i] = renderer .button(rangeOptions.text, 0, 0, (e) => { - // extract events from button object and call + // Extract events from button object and call const buttonEvents = (rangeOptions.events && rangeOptions.events.click); let callDefaultEvent; if (buttonEvents) { @@ -135875,7 +136051,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ y: inputPosition.y, width: inputGroup.getBBox().width, align: inputPosition.align, - // fix wrong getBBox() value on right align + // Fix wrong getBBox() value on right align x: inputPosition.x + translateX - 2 }, true, chart.spacingBox); // Skip animation @@ -136030,7 +136206,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const inputGroupX = (inputGroup.alignAttr.translateX + inputGroup.alignOptions.x - xOffsetForExportButton + - // getBBox for detecing left margin + // `getBBox` for detecing left margin inputGroup.getBBox().x + // 2px padding to not overlap input and label 2); @@ -136404,7 +136580,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @return {number} * Parsed JavaScript time value. */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file return RangeSelector; }); @@ -136649,13 +136825,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ !isNumber(axis.max)) { return; } - const chart = axis.chart, log = axis.logarithmic, options = axis.crosshair.label, // the label's options - horiz = axis.horiz, // axis orientation - opposite = axis.opposite, // axis position - left = axis.left, // left position - top = axis.top, // top position + const chart = axis.chart, log = axis.logarithmic, options = axis.crosshair.label, // The label's options + horiz = axis.horiz, // Axis orientation + opposite = axis.opposite, // Axis position + left = axis.left, // Left position + top = axis.top, // Top position width = axis.width, tickInside = axis.options.tickPosition === 'inside', snap = axis.crosshair.snap !== false, e = event.e || (axis.cross && axis.cross.e), point = event.point; - let crossLabel = axis.crossLabel, // the svgElement + let crossLabel = axis.crossLabel, // The svgElement posx, posy, formatOption = options.format, formatFormat = '', limit, offset = 0, // Use last available event (#5287) min = axis.min, max = axis.max; @@ -136755,8 +136931,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Check the edges if (horiz) { limit = { - left: left - crossBox.x, - right: left + axis.width - crossBox.x + left, + right: left + axis.width }; } else { @@ -136811,7 +136987,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const key = options.top + ',' + options.height; // Do it only for the first Y axis of each pane if (!panes[key] && labelOptions.enabled) { - if (labelOptions.distance === 15 && // default + if (labelOptions.distance === 15 && // Default axis.side === 1) { labelOptions.distance = 0; } @@ -136907,7 +137083,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ y1 = axis2.pos; y2 = y1 + axis2.len; x1 = x2 = Math.round(transVal + axis.transB); - // outside plot area + // Outside plot area if (force !== 'pass' && (x1 < axisLeft || x1 > axisLeft + axis.width)) { if (force) { @@ -136928,7 +137104,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ x1 = axis2.pos; x2 = x1 + axis2.len; y1 = y2 = Math.round(axisTop + axis.height - transVal); - // outside plot area + // Outside plot area if (force !== 'pass' && (y1 < axisTop || y1 > axisTop + axis.height)) { if (force) { @@ -137036,7 +137212,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @function Highcharts.SVGRenderer#crispPolyLine */ function svgRendererCrispPolyLine(points, width) { - // points format: [['M', 0, 0], ['L', 100, 0]] + // Points format: [['M', 0, 0], ['L', 100, 0]] // normalize to a crisp line for (let i = 0; i < points.length; i = i + 2) { const start = points[i], end = points[i + 1]; @@ -137266,7 +137442,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highstock * @apioption series.hlc.data.close */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file /* * * * Default Export @@ -137332,17 +137508,17 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ getPointPath(point, graphic) { - // crisp vector coordinates + // Crisp vector coordinates const strokeWidth = graphic.strokeWidth(), series = point.series, crispCorr = (strokeWidth % 2) / 2, // #2596: crispX = Math.round(point.plotX) - crispCorr, halfWidth = Math.round(point.shapeArgs.width / 2); let plotClose = point.plotClose; - // the vertical stem + // The vertical stem const path = [ ['M', crispX, Math.round(point.yBottom)], ['L', crispX, Math.round(point.plotHigh)] ]; - // close + // Close if (point.close !== null) { plotClose = Math.round(point.plotClose) + crispCorr; path.push(['M', crispX, plotClose], ['L', crispX + halfWidth, plotClose]); @@ -137366,7 +137542,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (!chart.styledMode) { graphic.attr(series.pointAttribs(point, (point.selected && 'select'))); // #3897 } - // crisp vector coordinates + // Crisp vector coordinates path = series.getPointPath(point, graphic); graphic[!graphic ? 'attr' : 'animate']({ d: path }) .addClass(point.getClassName(), true); @@ -137397,7 +137573,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ return attribs; } toYData(point) { - // return a plain array for speedy calculation + // Return a plain array for speedy calculation return [point.high, point.low, point.close]; } /** @@ -137690,7 +137866,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highstock * @apioption series.ohlc.data.open */ - ''; // adds doclets above to transpiled + ''; // Adds doclets above to transpiled /* * * * Default Export @@ -137739,7 +137915,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ options.id !== 'highcharts-navigator-series') { extend(series, { pointValKey: OHLCSeries.prototype.pointValKey, - // keys: ohlcProto.keys, // @todo potentially nonsense + // Keys: ohlcProto.keys, // @todo potentially nonsense pointArrayMap: OHLCSeries.prototype.pointArrayMap, toYData: OHLCSeries.prototype.toYData }); @@ -137779,7 +137955,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ getPointPath(point, graphic) { const path = super.getPointPath(point, graphic), strokeWidth = graphic.strokeWidth(), crispCorr = (strokeWidth % 2) / 2, crispX = Math.round(point.plotX) - crispCorr, halfWidth = Math.round(point.shapeArgs.width / 2); let plotOpen = point.plotOpen; - // crisp vector coordinates + // Crisp vector coordinates if (point.open !== null) { plotOpen = Math.round(point.plotOpen) + crispCorr; path.push(['M', crispX, plotOpen], ['L', crispX - halfWidth, plotOpen]); @@ -137802,7 +137978,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ return attribs; } toYData(point) { - // return a plain array for speedy calculation + // Return a plain array for speedy calculation return [point.open, point.high, point.low, point.close]; } } @@ -137993,7 +138169,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highstock * @apioption series.candlestick.data */ - ''; // adds doclets above to transpiled + ''; // Adds doclets above to transpiled /* * * * Default Export @@ -138224,13 +138400,19 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * Flags on a line series * * @extends plotOptions.column - * @excluding animation, borderColor, borderRadius, borderWidth, + * @excluding animation, borderColor, borderWidth, * colorByPoint, cropThreshold, dataGrouping, pointPadding, * pointWidth, turboThreshold * @product highstock * @optionparent plotOptions.flags */ const FlagsSeriesDefaults = { + /** + * The corner radius of the border surrounding each flag. For `squarepin` + * shaped flags only. A number signifies pixels. A percentage string, like + * for example 50%, signifies a relative size. + */ + borderRadius: 0, /** * In case the flag is placed on a series, on what point key to place * it. Line and columns have one key, `y`. In range or OHLC-type series, @@ -138489,7 +138671,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highstock * @apioption series.flags.data.title */ - ''; // keeps doclets above in transpiled file + ''; // Keeps doclets above in transpiled file /* * * * Default Export @@ -138568,7 +138750,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ x -= Math.round((h - w) / 2); w = h; } - path = (symbols[shape])(x, y, w, h); + path = (symbols[shape])(x, y, w, h, options); if (anchorX && anchorY) { /** * If the label is below the anchor, draw the connecting line @@ -138674,7 +138856,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const series = this, options = series.options, chart = series.chart, points = series.points, optionsOnSeries = options.onSeries, onSeries = (optionsOnSeries && chart.get(optionsOnSeries)), step = onSeries && onSeries.options.step, onData = (onSeries && onSeries.points), inverted = chart.inverted, xAxis = series.xAxis, yAxis = series.yAxis; let cursor = points.length - 1, point, lastPoint, onKey = options.onKey || 'y', i = onData && onData.length, xOffset = 0, leftPoint, lastX, rightPoint, currentDataGrouping, distanceRatio; - // relate to a master series + // Relate to a master series if (onSeries && onSeries.visible && i) { xOffset = (onSeries.pointXOffset || 0) + (onSeries.barW || 0) / 2; currentDataGrouping = onSeries.currentDataGrouping; @@ -138691,7 +138873,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ typeof leftPoint[onKey] !== 'undefined') { if (point.x <= lastX) { // #803 point.plotY = leftPoint[onKey]; - // interpolate between points, #666 + // Interpolate between points, #666 if (leftPoint.x < point.x && !step) { rightPoint = onData[i + 1]; @@ -138746,13 +138928,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } else { - // the distance ratio, between 0 and 1 + // The distance ratio, between 0 and 1 distanceRatio = (point.x - leftPoint.x) / (rightPoint.x - leftPoint.x); point.plotY += distanceRatio * - // the plotY distance + // The plotY distance (rightPoint[onKey] - leftPoint[onKey]); point.y += distanceRatio * @@ -138762,7 +138944,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } cursor--; - i++; // check again for points in the same x position + i++; // Check again for points in the same x position if (cursor < 0) { break; } @@ -138798,7 +138980,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ point.shapeArgs = {}; // 847 } } - // if multiple flags appear at the same x, order them into a stack + // If multiple flags appear at the same x, order them into a stack lastPoint = points[i - 1]; if (lastPoint && lastPoint.plotX === point.plotX) { if (typeof lastPoint.stackIndex === 'undefined') { @@ -138833,7 +139015,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const { noop } = H; const { distribute } = R; const { series: Series, seriesTypes: { column: ColumnSeries } } = SeriesRegistry; - const { addEvent, defined, extend, merge, objectEach, wrap } = U; + const { addEvent, defined, extend, isNumber, merge, objectEach, wrap } = U; /* * * * Classes @@ -138868,7 +139050,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ drawPoints() { - const series = this, points = series.points, chart = series.chart, renderer = chart.renderer, inverted = chart.inverted, options = series.options, optionsY = options.y, yAxis = series.yAxis, boxesMap = {}, boxes = []; + const series = this, points = series.points, chart = series.chart, renderer = chart.renderer, inverted = chart.inverted, options = series.options, optionsY = options.y, yAxis = series.yAxis, boxesMap = {}, boxes = [], borderRadius = isNumber(options.borderRadius) ? + options.borderRadius : 0; let plotX, plotY, shape, i, point, graphic, stackIndex, anchorY, attribs, outsideRight, centered; i = points.length; while (i--) { @@ -138885,7 +139068,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ (typeof stackIndex !== 'undefined' && (stackIndex * options.stackDistance)); } - // skip connectors for higher level stacked points + // Skip connectors for higher level stacked points point.anchorX = stackIndex ? void 0 : point.plotX; anchorY = stackIndex ? void 0 : point.plotY; centered = shape !== 'flag'; @@ -138901,7 +139084,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // Create the flag if (!graphic) { - graphic = point.graphic = renderer.label('', null, null, shape, null, null, options.useHTML) + graphic = point.graphic = renderer.label('', 0, void 0, shape, void 0, void 0, options.useHTML) .addClass('highcharts-point') .add(series.markerGroup); // Add reference to the point for tracker (#6303) @@ -138914,7 +139097,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ align: centered ? 'center' : 'left', width: options.width, height: options.height, - 'text-align': options.textAlign + 'text-align': options.textAlign, + r: borderRadius }); if (!chart.styledMode) { graphic @@ -138993,10 +139177,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (options.useHTML && series.markerGroup) { wrap(series.markerGroup, 'on', function (proceed) { return SVGElement.prototype.on.apply( - // for HTML + // For HTML // eslint-disable-next-line no-invalid-this proceed.apply(this, [].slice.call(arguments, 1)), - // and for SVG + // And for SVG [].slice.call(arguments, 1)); }); } @@ -139113,7 +139297,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ /** * @typedef {"circlepin"|"flag"|"squarepin"} Highcharts.FlagsShapeValue */ - ''; // detach doclets above + ''; // Detach doclets above return FlagsSeries; }); @@ -139381,7 +139565,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ groupingSize >= this.basePointRange) { gapSize = groupingSize; } - // extension for ordinal breaks + // Extension for ordinal breaks let current, next; while (i--) { // Reassign next if it is not visible @@ -139395,7 +139579,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } if (next.x - current.x > gapSize) { const xRange = (current.x + next.x) / 2; - points.splice(// insert after this one + points.splice(// Insert after this one i + 1, 0, { isNull: true, x: xRange @@ -139758,7 +139942,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ const ApproximationRegistry = { - // approximations added programmatically + // Approximations added programmatically }; /* * * @@ -139882,7 +140066,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (low === null && high === null) { return null; } - // else, return is undefined + // Else, return is undefined } /** * @private @@ -139945,10 +140129,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ const common = { - // enabled: null, // (true for stock charts, false for basic), + /// enabled: null, // (true for stock charts, false for basic), // forced: undefined, groupPixelWidth: 2, - // the first one is the point or start value, the second is the start + // The first one is the point or start value, the second is the start // value if we're dealing with range, the third one is the end value if // dealing with a range dateTimeLabelFormats: { @@ -139993,7 +140177,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ '-%Y' ] } - // smoothed = false, // enable this for navigator series only + /// smoothed = false, // enable this for navigator series only }; /** * Extends common options @@ -140033,7 +140217,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const units = [ [ 'millisecond', - [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples + [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // Allowed multiples ], [ 'second', [1, 2, 5, 10, 15, 30] @@ -140562,8 +140746,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ function groupData(xData, yData, groupPositions, approximation) { const series = this, data = series.data, dataOptions = series.options && series.options.data, groupedXData = [], groupedYData = [], groupMap = [], dataLength = xData.length, - // when grouping the fake extended axis for panning, - // we don't need to consider y + // When grouping the fake extended axis for panning, we don't need to + // consider y handleYData = !!yData, values = [], pointArrayMap = series.pointArrayMap, pointArrayMapLength = pointArrayMap && pointArrayMap.length, extendedPointArrayMap = ['x'].concat(pointArrayMap || ['y']), groupAll = (this.options.dataGrouping && this.options.dataGrouping.groupAll); let pointX, pointY, groupedY, pos = 0, start = 0; @@ -140587,13 +140771,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ for (let i = 0; i <= dataLength; i++) { // Start with the first point within the X axis range (#2696) if (xData[i] < groupPositions[0]) { - continue; // with next point + continue; // With next point } - // when a new group is entered, summarize and initialize + // When a new group is entered, summarize and initialize // the previous group while ((typeof groupPositions[pos + 1] !== 'undefined' && xData[i] >= groupPositions[pos + 1]) || - i === dataLength) { // get the last group + i === dataLength) { // Get the last group // get group x and y pointX = groupPositions[pos]; series.dataGroupInfo = { @@ -140617,30 +140801,30 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ delete series.dataGroupInfo.options[key]; }); } - // push the grouped data + // Push the grouped data if (typeof groupedY !== 'undefined') { groupedXData.push(pointX); groupedYData.push(groupedY); groupMap.push(series.dataGroupInfo); } - // reset the aggregate arrays + // Reset the aggregate arrays start = i; for (let j = 0; j < valuesLen; j++) { - values[j].length = 0; // faster than values[j] = [] + values[j].length = 0; // Faster than values[j] = [] values[j].hasNulls = false; } // Advance on the group positions pos += 1; - // don't loop beyond the last group + // Don't loop beyond the last group if (i === dataLength) { break; } } - // break out + // Break out if (i === dataLength) { break; } - // for each raw data point, push it to an array that contains all values + // For each raw data point, push it to an array that contains all values // for this specific group if (pointArrayMap) { const index = (series.options.dataGrouping && @@ -140760,17 +140944,17 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ function onTooltipHeaderFormatter(e) { const chart = this.chart, time = chart.time, labelConfig = e.labelConfig, series = labelConfig.series, point = labelConfig.point, options = series.options, tooltipOptions = series.tooltipOptions, dataGroupingOptions = options.dataGrouping, xAxis = series.xAxis; let xDateFormat = tooltipOptions.xDateFormat, xDateFormatEnd, currentDataGrouping, dateTimeLabelFormats, labelFormats, formattedKey, formatString = tooltipOptions[e.isFooter ? 'footerFormat' : 'headerFormat']; - // apply only to grouped series + // Apply only to grouped series if (xAxis && xAxis.options.type === 'datetime' && dataGroupingOptions && isNumber(labelConfig.key)) { - // set variables + // Set variables currentDataGrouping = series.currentDataGrouping; dateTimeLabelFormats = dataGroupingOptions.dateTimeLabelFormats || // Fallback to commonOptions (#9693) DataGroupingDefaults.common.dateTimeLabelFormats; - // if we have grouped data, use the grouping information to get the + // If we have grouped data, use the grouping information to get the // right format if (currentDataGrouping) { labelFormats = dateTimeLabelFormats[currentDataGrouping.unitName]; @@ -140781,7 +140965,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ xDateFormat = labelFormats[1]; xDateFormatEnd = labelFormats[2]; } - // if not grouped, and we don't have set the xDateFormat option, get the + // If not grouped, and we don't have set the xDateFormat option, get the // best fit, so if the least distance between points is one minute, show // it, but if the least distance is one day, skip hours and minutes etc. } @@ -140797,7 +140981,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (series.chart.styledMode) { formatString = this.styledModeFormat(formatString); } - // return the replaced format + // Return the replaced format e.text = format(formatString, { point: extend(labelConfig.point, { key: formattedKey }), series: series @@ -140882,7 +141066,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.Point#dataGroup * @type {Highcharts.DataGroupingInfoObject|undefined} */ - (''); // detach doclets above + (''); // Detach doclets above /* * * * API Options @@ -141179,7 +141363,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @default 10 * @apioption plotOptions.column.dataGrouping.groupPixelWidth */ - ''; // required by JSDoc parsing + ''; // Required by JSDoc parsing return DataGroupingComposition; }); @@ -141254,7 +141438,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ return isNumber(axisMin) && isNumber(axisMax) && coord.value >= (axisMin - minPointOffset) && coord.value <= (axisMax + minPointOffset) && - // don't count navigator axis + // Don't count navigator axis !coord.axis.options.isInternal; })[0]; // If the axes overlap, return the first axis that was found. } @@ -141531,7 +141715,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ })); ; /** - * @license Highcharts JS v11.4.0 (2024-03-05) + * @license Highcharts JS v11.4.1 (2024-04-04) * * (c) 2009-2024 Torstein Honsi * @@ -141657,6 +141841,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ e.isInsidePlot = chart.pane.some((pane) => isInsidePane(e.x, e.y, pane.center, pane.axis && pane.axis.normalizedStartAngleRad, pane.axis && pane.axis.normalizedEndAngleRad)); } } + /** + * + */ function onPointerAfterGetHoverData(eventArgs) { const chart = this.chart; if (eventArgs.hoverPoint && @@ -142087,7 +142274,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ /** * @typedef {"arc"|"circle"|"solid"} Highcharts.PaneBackgroundShapeValue */ - ''; // keeps doclets above in JS file + ''; // Keeps doclets above in JS file return Pane; }); @@ -142412,7 +142599,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ polarPlotY: point.polarPlotY, rectPlotX: point.rectPlotX, yBottom: point.yBottom, - // plotHighX is for polar charts + // `plotHighX` is for polar charts plotX: pick(point.plotHighX, point.plotX), plotY: point.plotHigh, isNull: point.isNull @@ -142436,7 +142623,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ left: 'right', center: 'center', right: 'left' - }[step]; // swap for reading in getGraphPath + }[step]; // Swap for reading in getGraphPath } const higherPath = getGraphPath.call(this, highPoints); const higherAreaPath = getGraphPath.call(this, highAreaPoints); @@ -142904,7 +143091,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.arearange.data.low */ - ''; // adds doclets above to transpiled file + ''; // Adds doclets above to transpiled file return AreaRangeSeries; }); @@ -143073,7 +143260,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @default 0.75 * @apioption series.areasplinerange.fillOpacity */ - ''; // adds doclets above to transpiled file + ''; // Adds doclets above to transpiled file return AreaSplineRangeSeries; }); @@ -143519,7 +143706,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts * @apioption series.boxplot.data.whiskerDashStyle */ - ''; // keeps doclets above separate + ''; // Keeps doclets above separate /* * * * Default Export @@ -143569,7 +143756,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ translate() { const series = this, yAxis = series.yAxis, pointArrayMap = series.pointArrayMap; super.translate.apply(series); - // do the translation on each point dimension + // Do the translation on each point dimension series.points.forEach(function (point) { pointArrayMap.forEach(function (key) { if (point[key] !== null) { @@ -143585,14 +143772,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ drawPoints() { const series = this, points = series.points, options = series.options, chart = series.chart, renderer = chart.renderer, - // error bar inherits this series type but doesn't do quartiles + // Error bar inherits this series type but doesn't do quartiles doQuartiles = series.doQuartiles !== false, whiskerLength = series.options.whiskerLength; let q1Plot, q3Plot, highPlot, lowPlot, medianPlot, medianPath, crispCorr, crispX = 0, boxPath, graphic, width, left, right, halfWidth, pointWiskerLength; for (const point of points) { graphic = point.graphic; const verb = graphic ? 'animate' : 'attr', shapeArgs = point.shapeArgs, boxAttr = {}, stemAttr = {}, whiskersAttr = {}, medianAttr = {}, color = point.color || series.color; if (typeof point.plotY !== 'undefined') { - // crisp vector coordinates + // Crisp vector coordinates width = Math.round(shapeArgs.width); left = Math.floor(shapeArgs.x); right = left + width; @@ -143667,10 +143854,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ crispCorr = (point.stem.strokeWidth() % 2) / 2; crispX = left + halfWidth + crispCorr; d = [ - // stem up + // Stem up ['M', crispX, q3Plot], ['L', crispX, highPlot], - // stem down + // Stem down ['M', crispX, q1Plot], ['L', crispX, lowPlot] ]; @@ -143722,7 +143909,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } } - // return a plain array for speedy calculation + // Return a plain array for speedy calculation toYData(point) { return [point.low, point.q1, point.median, point.q3, point.high]; } @@ -143734,9 +143921,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * */ BoxPlotSeries.defaultOptions = merge(ColumnSeries.defaultOptions, BoxPlotSeriesDefaults); extend(BoxPlotSeries.prototype, { - // array point configs are mapped to this + // Array point configs are mapped to this pointArrayMap: ['low', 'q1', 'median', 'q3', 'high'], - // defines the top of the tracker + // Defines the top of the tracker pointValKey: 'high', // Disable data labels for box plot drawDataLabels: noop, @@ -144228,7 +144415,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ -connectorDistance : connectorDistance; // Set options for centered labels if (labelsAlign === 'center') { - connectorLength = 0; // do not use connector + connectorLength = 0; // Do not use connector options.connectorDistance = 0; range.labelAttribs.align = 'center'; } @@ -144456,7 +144643,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.BubbleLegendFormatterContextObject#value * @type {number} */ - ''; // detach doclets above + ''; // Detach doclets above return BubbleLegendItem; }); @@ -144504,24 +144691,26 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // Create legend with bubbleLegend legend.render(); - chart.getMargins(); - chart.axes.forEach(function (axis) { - if (axis.visible) { // #11448 - axis.render(); - } - if (!bubbleLegendOptions.placed) { - axis.setScale(); - axis.updateNames(); - // Disable axis animation on init - objectEach(axis.ticks, function (tick) { - tick.isNew = true; - tick.isNewLabel = true; - }); - } - }); + // Calculate margins after first rendering the bubble legend + if (!bubbleLegendOptions.placed) { + chart.getMargins(); + chart.axes.forEach(function (axis) { + if (axis.visible) { // #11448 + axis.render(); + } + if (!bubbleLegendOptions.placed) { + axis.setScale(); + axis.updateNames(); + // Disable axis animation on init + objectEach(axis.ticks, function (tick) { + tick.isNew = true; + tick.isNewLabel = true; + }); + } + }); + chart.getMargins(); + } bubbleLegendOptions.placed = true; - // After recalculate axes, calculate margins again. - chart.getMargins(); // Call default 'drawChartBox' method. proceed.call(chart, options, callback); // Check bubble legend sizes and correct them if necessary. @@ -144607,7 +144796,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ legendItem = items[i].legendItem || {}; legendItem2 = (items[i + 1] || {}).legendItem || {}; if (legendItem.labelHeight) { - // for bubbleLegend + // For bubbleLegend items[i].itemHeight = legendItem.labelHeight; } if ( // Line break @@ -145031,7 +145220,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ height: 2 * radius }; } - else { // below zThreshold + else { // Below zThreshold // #1691 point.shapeArgs = point.plotY = point.dlBox = void 0; point.isInside = false; // #17281 @@ -145341,7 +145530,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ /** * @typedef {"area"|"width"} Highcharts.BubbleSizeByValue */ - ''; // detach doclets above + ''; // Detach doclets above /* * * * API Options @@ -145430,7 +145619,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @excluding enabled, enabledThreshold, height, radius, width * @apioption series.bubble.marker */ - ''; // adds doclets above to transpiled file + ''; // Adds doclets above to transpiled file return BubbleSeries; }); @@ -145562,7 +145751,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ translate() { return columnProto.translate.apply(this); } - // public crispCol(): BBoxObject { + // Public crispCol(): BBoxObject { // return columnProto.crispCol.apply(this, arguments as any); // } // public drawPoints(): void { @@ -145577,7 +145766,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ pointAttribs() { return columnProto.pointAttribs.apply(this, arguments); } - // public adjustForMissingColumns(): number { + // Public adjustForMissingColumns(): number { // return columnProto.adjustForMissingColumns.apply(this, arguments); // } // public animate(): void { @@ -145610,7 +145799,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (isNumber(plotHigh) && isNumber(plotY)) { point.plotHigh = safeBounds(plotHigh); point.plotLow = safeBounds(plotY); - // adjust shape + // Adjust shape y = point.plotHigh; height = pick(point.rectPlotY, point.plotY) - point.plotHigh; // Adjust for minPointLength @@ -145647,7 +145836,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ xAxis.left - chart.plotLeft + x + width / 2, yAxis.pos - chart.plotTop + y + height / 2, height - ]; // don't inherit from column tooltip position - #3372 + ]; // Don't inherit from column tooltip position - #3372 } } }); @@ -145674,10 +145863,6 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ getSymbol: noop, drawTracker: columnProto.drawTracker, getColumnMetrics: columnProto.getColumnMetrics - // pointAttribs: columnProto.pointAttribs, - // polarArc: columnProto.polarArc - // translate3dPoints: columnProto.translate3dPoints, - // translate3dShapes: columnProto.translate3dShapes }); SeriesRegistry.registerSeriesType('columnrange', ColumnRangeSeries); /* * @@ -145771,7 +145956,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.columnrange.states.select */ - ''; // adds doclets above into transpiled + ''; // Adds doclets above into transpiled return ColumnRangeSeries; }); @@ -145893,7 +146078,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.columnpyramid.data */ - ''; // keeps doclets above separate + ''; // Keeps doclets above separate /* * * * Default Export @@ -145944,7 +146129,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ), yAxis = series.yAxis, threshold = options.threshold, minPointLength = pick(options.minPointLength, 5), metrics = series.getColumnMetrics(), pointWidth = metrics.width, pointXOffset = series.pointXOffset = metrics.offset; let translatedThreshold = series.translatedThreshold = yAxis.getThreshold(threshold), - // postprocessed for border width + // Postprocessed for border width seriesBarW = series.barW = Math.max(pointWidth, 1 + 2 * borderWidth); if (chart.inverted) { @@ -145965,7 +146150,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Don't draw too far outside plot area // (#1303, #2241, #4264) barW = seriesBarW / 2, barY = Math.min(plotY, yBottom), barH = Math.max(plotY, yBottom) - barY; - let barX = point.plotX + pointXOffset, stackTotal, stackHeight, topPointY, topXwidth, bottomXwidth, invBarPos, x1, x2, x3, x4, y1, y2; + let barX = point.plotX + pointXOffset, stackTotal, stackHeight, topXwidth, bottomXwidth, invBarPos, x1, x2, x3, x4, y1, y2; // Adjust for null or missing points if (options.centerInCategory) { barX = series.adjustForMissingColumns(barX, pointWidth, point, metrics); @@ -145987,25 +146172,24 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ]; stackTotal = threshold + (point.total || point.y); - // overwrite stacktotal (always 100 / -100) + // Overwrite stacktotal (always 100 / -100) if (options.stacking === 'percent') { stackTotal = threshold + (point.y < 0) ? -100 : 100; } - // get the highest point (if stack, extract from total) - topPointY = yAxis.toPixels((stackTotal), true); - // calculate height of stack (in pixels) + // Get the highest point (if stack, extract from total) + const topPointY = yAxis.toPixels((stackTotal), true); + // Calculate height of stack (in pixels) stackHeight = chart.plotHeight - topPointY - (chart.plotHeight - translatedThreshold); - // topXwidth and bottomXwidth = width of lines from the center - // calculated from tanges proportion. - // Cannot be a NaN #12514 + // `topXwidth` and `bottomXwidth` = width of lines from the center + // calculated from tanges proportion. Cannot be a NaN #12514. topXwidth = stackHeight ? (barW * (barY - topPointY)) / stackHeight : 0; - // like topXwidth, but with height of point + // Like topXwidth, but with height of point bottomXwidth = stackHeight ? (barW * (barY + barH - topPointY)) / stackHeight : 0; @@ -146027,20 +146211,20 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ y1 = barY; y2 = barY + barH + minPointLength; } - // inverted chart + // Inverted chart if (chart.inverted) { invBarPos = yAxis.width - barY; stackHeight = topPointY - (yAxis.width - translatedThreshold); - // proportion tanges + // Proportion tanges topXwidth = (barW * (topPointY - invBarPos)) / stackHeight; bottomXwidth = (barW * (topPointY - (invBarPos - barH))) / stackHeight; - x1 = barX + barW + topXwidth; // top bottom - x2 = x1 - 2 * topXwidth; // top top - x3 = barX - bottomXwidth + barW; // bottom top - x4 = barX + bottomXwidth + barW; // bottom bottom + x1 = barX + barW + topXwidth; // Top bottom + x2 = x1 - 2 * topXwidth; // Top top + x3 = barX - bottomXwidth + barW; // Bottom top + x4 = barX + bottomXwidth + barW; // Bottom bottom y1 = barY; y2 = barY + barH - minPointLength; if (point.y < 0) { @@ -146054,7 +146238,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ y: y1, width: x2 - x1, height: barH, - // path of pyramid + // Path of pyramid d: [ ['M', x1, y1], ['L', x2, y1], @@ -146221,7 +146405,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts * @apioption series.errorbar.data */ - ''; // adds doclets above to transpiled file + ''; // Adds doclets above to transpiled file /* * * * Default Export @@ -146281,7 +146465,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } toYData(point) { - // return a plain array for speedy calculation + // Return a plain array for speedy calculation return [point.low, point.high]; } } @@ -146297,7 +146481,6 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } }, { order: 0 }); extend(ErrorBarSeries.prototype, { - // pointClass: ErrorBarPoint, // just a declaration pointArrayMap: ['low', 'high'], pointValKey: 'high', doQuartiles: false @@ -146437,7 +146620,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const graphic = point.graphic, shapeArgs = point.shapeArgs, d = shapeArgs.d, dialOptions = merge(options.dial, point.dial); // #1233 if (graphic) { graphic.animate(shapeArgs); - shapeArgs.d = d; // animate alters it + shapeArgs.d = d; // Animate alters it } else { point.graphic = @@ -146490,11 +146673,11 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ series.points.forEach((point) => { const graphic = point.graphic; if (graphic) { - // start value + // Start value graphic.attr({ rotation: series.yAxis.startAngleRad * 180 / Math.PI }); - // animate + // Animate graphic.animate({ rotation: point.shapeArgs.rotation }, series.options.animation); @@ -146825,8 +147008,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Prototype members }); extend(GaugeSeries.prototype, { - // chart.angular will be set to true when a gauge series is present, - // and this will be used on the axes + // `chart.angular` will be set to true when a gauge series is present, and + // this will be used on the axes angular: true, directTouch: true, drawGraph: noop, @@ -146902,7 +147085,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts * @apioption series.gauge.data */ - ''; // adds the doclets above in the transpiled file + ''; // Adds the doclets above in the transpiled file return GaugeSeries; }); @@ -146989,11 +147172,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * @private * - * @param {global.Event} event - * Browser event, before normalization. * @param {Highcharts.Point} point * The point that event occurred. - * + * @param {global.Event} event + * Browser event, before normalization. */ function onMouseMove(point, event) { if (point.fixedPosition && point.inDragMode) { @@ -147112,7 +147294,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ function onChartAfterPrint() { if (this.graphLayoutsLookup) { this.graphLayoutsLookup.forEach((layout) => { - // return to default simulation + // Return to default simulation layout.updateSimulation(); }); this.redraw(); @@ -147656,7 +147838,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts * @apioption series.packedbubble.marker */ - ''; // adds doclets above to transpiled file + ''; // Adds doclets above to transpiled file return PackedBubbleSeriesDefaults; }); @@ -147688,7 +147870,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * Link that connects two nodes * @param {number} force * Force calculated in `repulsiveForceFunction` - * @param {Highcharts.PositionObject} distance + * @param {Highcharts.PositionObject} distanceXY * Distance between two nodes e.g. `{x, y}` */ function attractive(link, force, distanceXY) { @@ -147729,12 +147911,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ function barycenter() { - let gravitationalConstant = this.options.gravitationalConstant, xFactor = this.barycenter.xFactor, yFactor = this.barycenter.yFactor; - // To consider: - xFactor = (xFactor - (this.box.left + this.box.width) / 2) * - gravitationalConstant; - yFactor = (yFactor - (this.box.top + this.box.height) / 2) * - gravitationalConstant; + const gravitationalConstant = this.options.gravitationalConstant || 0, xFactor = (this.barycenter.xFactor - + (this.box.left + this.box.width) / 2) * gravitationalConstant, yFactor = (this.barycenter.yFactor - + (this.box.top + this.box.height) / 2) * gravitationalConstant; this.nodes.forEach(function (node) { if (!node.fixedPosition) { node.plotX -= @@ -147784,15 +147963,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @param {Highcharts.Point} node node that should be translated */ function integrate(layout, node) { - let friction = -layout.options.friction, maxSpeed = layout.options.maxSpeed, prevX = node.prevX, prevY = node.prevY, + const friction = -layout.options.friction, maxSpeed = layout.options.maxSpeed, prevX = node.prevX, prevY = node.prevY, // Apply friction: - diffX = ((node.plotX + node.dispX - - prevX) * friction), diffY = ((node.plotY + node.dispY - - prevY) * friction), abs = Math.abs, signX = abs(diffX) / (diffX || 1), // need to deal with 0 - signY = abs(diffY) / (diffY || 1); + frictionX = ((node.plotX + node.dispX - + prevX) * friction), frictionY = ((node.plotY + node.dispY - + prevY) * friction), abs = Math.abs, signX = abs(frictionX) / (frictionX || 1), // Need to deal with 0 + signY = abs(frictionY) / (frictionY || 1), // Apply max speed: - diffX = signX * Math.min(maxSpeed, Math.abs(diffX)); - diffY = signY * Math.min(maxSpeed, Math.abs(diffY)); + diffX = signX * Math.min(maxSpeed, Math.abs(frictionX)), diffY = signY * Math.min(maxSpeed, Math.abs(frictionY)); // Store for the next iteration: node.prevX = node.plotX + node.dispX; node.prevY = node.plotY + node.dispY; @@ -147815,7 +147993,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * Node that should be translated by force. * @param {number} force * Force calculated in `repulsiveForceFunction` - * @param {Highcharts.PositionObject} distance + * @param {Highcharts.PositionObject} distanceXY * Distance between two nodes e.g. `{x, y}` */ function repulsive(node, force, distanceXY) { @@ -148063,12 +148241,11 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * Node that should be translated */ function integrate(layout, node) { - let distanceR; node.dispX += node.dispX * layout.options.friction; node.dispY += node.dispY * layout.options.friction; - distanceR = node.temperature = layout.vectorLength({ + const distanceR = node.temperature = layout.vectorLength({ x: node.dispX, y: node.dispY }); @@ -149202,8 +149379,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ applyLimitBox(node, box) { const layout = this, factor = 0.01; let distanceXY, distanceR; - // parentNodeLimit should be used together - // with seriesInteraction: false + // `parentNodeLimit` should be used together with seriesInteraction: + // false if (layout.options.splitSeries && !node.isParentNode && layout.options.parentNodeLimit) { @@ -149363,7 +149540,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (series.is('packedbubble') && // #13574 series.reserveSpace()) { yData = series.yData || []; - // add data to array only if series is visible + // Add data to array only if series is visible for (let j = 0; j < yData.length; j++) { allDataPoints.push([ null, null, @@ -149460,7 +149637,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (zMin && zMax) { return [zMin, zMax]; } - // it is needed to deal with null + // It is needed to deal with null // and undefined values allSeries.forEach((series) => { series.yData.forEach((y) => { @@ -149483,9 +149660,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ checkOverlap(bubble1, bubble2) { - const diffX = bubble1[0] - bubble2[0], // diff of X center values - diffY = bubble1[1] - bubble2[1], // diff of Y center values - sumRad = bubble1[2] + bubble2[2]; // sum of bubble radius + const diffX = bubble1[0] - bubble2[0], // Diff of X center values + diffY = bubble1[1] - bubble2[1], // Diff of Y center values + sumRad = bubble1[2] + bubble2[2]; // Sum of bubble radius return (Math.sqrt(diffX * diffX + diffY * diffY) - Math.abs(sumRad)) < -0.001; } @@ -149557,7 +149734,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (!this.visible) { return; } - // layout is using nodes for position calculation + // Layout is using nodes for position calculation this.addLayout(); if (layoutOptions.splitSeries) { this.addSeriesLayout(); @@ -149603,7 +149780,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ drawGraph() { - // if the series is not using layout, don't add parent nodes + // If the series is not using layout, don't add parent nodes if (!this.layout || !this.layout.options.splitSeries) { return; } @@ -149644,7 +149821,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } drawTracker() { const parentNode = this.parentNode; - // chart = series.chart, + // Chart = series.chart, // pointer = chart.pointer, // onMouseOver = function (e: PointerEvent): void { // const point = pointer.getPointFromEvent(e); @@ -149762,10 +149939,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ placeBubbles(allDataPoints) { const checkOverlap = this.checkOverlap, positionBubble = this.positionBubble, bubblePos = []; let stage = 1, j = 0, k = 0, calculatedBubble, arr = [], i; - // sort all points + // Sort all points const sortedArr = allDataPoints.sort((a, b) => b[2] - a[2]); if (sortedArr.length) { - // create first bubble in the middle of the chart + // Create first bubble in the middle of the chart bubblePos.push([ [ 0, @@ -149773,7 +149950,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ sortedArr[0][2], sortedArr[0][3], sortedArr[0][4] - ] // point index + ] // Point index ]); // 0 level bubble if (sortedArr.length > 1) { bubblePos.push([ @@ -149781,7 +149958,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ 0, (0 - sortedArr[1][2] - sortedArr[0][2]), - // move bubble above first one + // Move bubble above first one sortedArr[1][2], sortedArr[1][3], sortedArr[1][4] @@ -149790,28 +149967,28 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // first two already positioned so starting from 2 for (i = 2; i < sortedArr.length; i++) { sortedArr[i][2] = sortedArr[i][2] || 1; - // in case if radius is calculated as 0. - calculatedBubble = positionBubble(bubblePos[stage][j], bubblePos[stage - 1][k], sortedArr[i]); // calculate initial bubble position + // In case if radius is calculated as 0. + calculatedBubble = positionBubble(bubblePos[stage][j], bubblePos[stage - 1][k], sortedArr[i]); // Calculate initial bubble position if (checkOverlap(calculatedBubble, bubblePos[stage][0])) { - /* if new bubble is overlapping with first bubble + /* If new bubble is overlapping with first bubble * in current level (stage) */ bubblePos.push([]); k = 0; - /* reset index of bubble, used for + /* Reset index of bubble, used for * positioning the bubbles around it, * we are starting from first bubble in next * stage because we are changing level to higher */ bubblePos[stage + 1].push(positionBubble(bubblePos[stage][j], bubblePos[stage][0], sortedArr[i])); // (last bubble, 1. from curr stage, new bubble) - stage++; // the new level is created, above current - j = 0; // set the index of bubble in curr level to 0 + stage++; // The new level is created, above current + j = 0; // Set the index of bubble in curr level to 0 } else if (stage > 1 && bubblePos[stage - 1][k + 1] && checkOverlap(calculatedBubble, bubblePos[stage - 1][k + 1])) { - /* if new bubble is overlapping with one of the prev + /* If new bubble is overlapping with one of the prev * stage bubbles, it means that - bubble, used for * positioning the bubbles around it has changed * so we need to recalculate it @@ -149821,19 +149998,19 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // (last bubble, prev stage bubble, new bubble) j++; } - else { // simply add calculated bubble + else { // Simply add calculated bubble j++; bubblePos[stage].push(calculatedBubble); } } } this.chart.stages = bubblePos; - // it may not be necessary but adding it just in case - + // It may not be necessary but adding it just in case - // it is containing all of the bubble levels this.chart.rawPositions = [] .concat.apply([], bubblePos); - // bubble positions merged into one array + // Bubble positions merged into one array this.resizeRadius(); arr = this.chart.rawPositions; } @@ -149877,27 +150054,27 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @return {Array} Bubble with correct positions */ positionBubble(lastBubble, newOrigin, nextBubble) { - const sqrt = Math.sqrt, asin = Math.asin, acos = Math.acos, pow = Math.pow, abs = Math.abs, distance = sqrt(// dist between lastBubble and newOrigin + const sqrt = Math.sqrt, asin = Math.asin, acos = Math.acos, pow = Math.pow, abs = Math.abs, distance = sqrt(// Dist between lastBubble and newOrigin pow((lastBubble[0] - newOrigin[0]), 2) + pow((lastBubble[1] - newOrigin[1]), 2)), alfa = acos( - // from cosinus theorem: alfa is an angle used for + // From cosinus theorem: alfa is an angle used for // calculating correct position (pow(distance, 2) + pow(nextBubble[2] + newOrigin[2], 2) - - pow(nextBubble[2] + lastBubble[2], 2)) / (2 * (nextBubble[2] + newOrigin[2]) * distance)), beta = asin(// from sinus theorem. + pow(nextBubble[2] + lastBubble[2], 2)) / (2 * (nextBubble[2] + newOrigin[2]) * distance)), beta = asin(// From sinus theorem. abs(lastBubble[0] - newOrigin[0]) / distance), - // providing helping variables, related to angle between + // Providing helping variables, related to angle between // lastBubble and newOrigin gamma = (lastBubble[1] - newOrigin[1]) < 0 ? 0 : Math.PI, - // if new origin y is smaller than last bubble y value + // If new origin y is smaller than last bubble y value // (2 and 3 quarter), // add Math.PI to final angle delta = (lastBubble[0] - newOrigin[0]) * (lastBubble[1] - newOrigin[1]) < 0 ? 1 : -1, // (1st and 3rd quarter) finalAngle = gamma + alfa + beta * delta, cosA = Math.cos(finalAngle), sinA = Math.sin(finalAngle), posX = newOrigin[0] + (newOrigin[2] + nextBubble[2]) * sinA, - // center of new origin + (radius1 + radius2) * sinus A + // Center of new origin + (radius1 + radius2) * sinus A posY = newOrigin[1] - (newOrigin[2] + nextBubble[2]) * cosA; return [ posX, @@ -149905,7 +150082,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ nextBubble[2], nextBubble[3], nextBubble[4] - ]; // the same as described before + ]; // The same as described before } render() { const dataLabels = []; @@ -149941,7 +150118,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ resizeRadius() { const chart = this.chart, positions = chart.rawPositions, min = Math.min, max = Math.max, plotLeft = chart.plotLeft, plotTop = chart.plotTop, chartHeight = chart.plotHeight, chartWidth = chart.plotWidth; let minX, maxX, minY, maxY, radius; - minX = minY = Number.POSITIVE_INFINITY; // set initial values + minX = minY = Number.POSITIVE_INFINITY; // Set initial values maxX = maxY = Number.NEGATIVE_INFINITY; for (const position of positions) { radius = position[2]; @@ -149956,14 +150133,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ (chartHeight - plotTop) / bBox[1] ], smallerDimension = min.apply([], spaceRatio); if (Math.abs(smallerDimension - 1) > 1e-10) { - // if bBox is considered not the same width as possible size + // If bBox is considered not the same width as possible size for (const position of positions) { position[2] *= smallerDimension; } this.placeBubbles(positions); } else { - /** if no radius recalculation is needed, we need to position + /** If no radius recalculation is needed, we need to position * the whole bubbles in center of chart plotarea * for this, we are adding two parameters, * diffY and diffX, that are related to differences @@ -149982,9 +150159,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ seriesBox() { - const chart = this.chart, data = this.data, max = Math.max, min = Math.min, - // bBox = [xMin, xMax, yMin, yMax] - bBox = [ + const chart = this.chart, data = this.data, max = Math.max, min = Math.min, bBox = [ chart.plotLeft, chart.plotLeft + chart.plotWidth, chart.plotTop, @@ -150050,13 +150225,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ let point, radius, positions; this.processedXData = this.xData; this.generatePoints(); - // merged data is an array with all of the data from all series + // Merged data is an array with all of the data from all series if (!defined(chart.allDataPoints)) { chart.allDataPoints = this.accumulateAllPoints(); - // calculate radius for all added data + // Calculate radius for all added data this.getPointRadius(); } - // after getting initial radius, calculate bubble positions + // After getting initial radius, calculate bubble positions if (useSimulation) { positions = chart.allDataPoints; } @@ -150067,7 +150242,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Set the shape and arguments to be picked up in drawPoints for (const position of positions) { if (position[3] === index) { - // update the series points with the val from positions + // Update the series points with the val from positions // array point = data[position[4]]; radius = pick(position[2], void 0); @@ -150113,7 +150288,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ onMouseDown: DragNodesComposition.onMouseDown, onMouseMove: DragNodesComposition.onMouseMove, redrawHalo: DragNodesComposition.redrawHalo, - searchPoint: noop // solving #12287 + searchPoint: noop // Solving #12287 }); SeriesRegistry.registerSeriesType('packedbubble', PackedBubbleSeries); /* * @@ -150161,7 +150336,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @type {string} * @since 7.0.0 */ - ''; // detach doclets above + ''; // Detach doclets above return PackedBubbleSeries; }); @@ -150284,7 +150459,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.polygon.data */ - ''; // keeps doclets above separate + ''; // Keeps doclets above separate /* * * * Default Export @@ -150396,7 +150571,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ x: 0, y: void 0, style: { - textOverflow: 'none' // wrap lines by default (#7248) + textOverflow: 'none' // Wrap lines by default (#7248) } }, maxPadding: 0, @@ -150559,7 +150734,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ return () => { if (this.isRadial && this.tickPositions && - // undocumented option for now, but working + // Undocumented option for now, but working this.options.labels && this.options.labels.allowOverlap !== true) { return this.tickPositions @@ -151071,14 +151246,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ centerSlot = 0; } if (angle > centerSlot && angle < 180 - centerSlot) { - align = 'left'; // right hemisphere + align = 'left'; // Right hemisphere } else if (angle > 180 + centerSlot && angle < 360 - centerSlot) { - align = 'right'; // left hemisphere + align = 'right'; // Left hemisphere } else { - align = 'center'; // top or bottom + align = 'center'; // Top or bottom } } else { @@ -151120,7 +151295,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (reducedAngle2 > 70 && reducedAngle2 < 110) { align = 'center'; } - // auto Y translation + // Auto Y translation if (reducedAngle1 < 15 || (reducedAngle1 >= 180 && reducedAngle1 < 195)) { translateY = labelBBox.height * 0.3; @@ -151141,7 +151316,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ translateY = labelDir === 'start' ? labelBBox.height : -labelBBox.height * 0.25; } - // auto X translation + // Auto X translation if (reducedAngle2 < 15) { translateX = labelDir === 'start' ? -labelBBox.height * 0.15 : labelBBox.height * 0.15; @@ -151235,7 +151410,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // Call uber method axisProto.setAxisTranslation.call(this); // Set transA and minPixelPadding - if (this.center) { // it's not defined the first time + if (this.center) { // It's not defined the first time if (this.isCircular) { this.transA = (this.endAngleRad - this.startAngleRad) / ((this.max - this.min) || 1); @@ -151358,25 +151533,25 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ let align, verticalAlign; if (options.align === null) { if (angle > 20 && angle < 160) { - align = 'left'; // right hemisphere + align = 'left'; // Right hemisphere } else if (angle > 200 && angle < 340) { - align = 'right'; // left hemisphere + align = 'right'; // Left hemisphere } else { - align = 'center'; // top or bottom + align = 'center'; // Top or bottom } options.align = align; } if (options.verticalAlign === null) { if (angle < 45 || angle > 315) { - verticalAlign = 'bottom'; // top part + verticalAlign = 'bottom'; // Top part } else if (angle > 135 && angle < 225) { - verticalAlign = 'top'; // bottom part + verticalAlign = 'top'; // Bottom part } else { - verticalAlign = 'middle'; // left or right + verticalAlign = 'middle'; // Left or right } options.verticalAlign = verticalAlign; } @@ -151406,13 +151581,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // 1 means control points midway between points, 2 means 1/3 from // the point, 3 is 1/4 etc; - const prevPointInd = ((i - 1 < 0) ? segment.length - (1 + addedNumber) : i - 1), nextPointInd = (i + 1 > segment.length - 1) ? addedNumber : i + 1, previousPoint = segment[prevPointInd], nextPoint = segment[nextPointInd], previousX = previousPoint.plotX, previousY = previousPoint.plotY, nextX = nextPoint.plotX, nextY = nextPoint.plotY, plotX = segment[i].plotX, // actual point + const prevPointInd = ((i - 1 < 0) ? segment.length - (1 + addedNumber) : i - 1), nextPointInd = (i + 1 > segment.length - 1) ? addedNumber : i + 1, previousPoint = segment[prevPointInd], nextPoint = segment[nextPointInd], previousX = previousPoint.plotX, previousY = previousPoint.plotY, nextX = nextPoint.plotX, nextY = nextPoint.plotY, plotX = segment[i].plotX, // Actual point plotY = segment[i].plotY; leftContX = (smoothing * plotX + previousX) / denom; leftContY = (smoothing * plotY + previousY) / denom; rightContX = (smoothing * plotX + nextX) / denom; rightContY = (smoothing * plotY + nextY) / denom; - // distance left control point + // Distance left control point const dLControlPoint = Math.sqrt(Math.pow(leftContX - plotX, 2) + Math.pow(leftContY - plotY, 2)), dRControlPoint = Math.sqrt(Math.pow(rightContX - plotX, 2) + Math.pow(rightContY - plotY, 2)), leftContAngle = Math.atan2(leftContY - plotY, leftContX - plotX), rightContAngle = Math.atan2(rightContY - plotY, rightContX - plotX); jointAngle = (Math.PI / 2) + ((leftContAngle + rightContAngle) / 2); // Ensure the right direction, jointAngle should be in the same quadrant @@ -151426,7 +151601,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ leftContY = plotY + Math.sin(jointAngle) * dLControlPoint; rightContX = plotX + Math.cos(Math.PI + jointAngle) * dRControlPoint; rightContY = plotY + Math.sin(Math.PI + jointAngle) * dRControlPoint; - // push current point's connectors into returned object + // Push current point's connectors into returned object const ret = { rightContX: rightContX, rightContY: rightContY, @@ -151435,13 +151610,16 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ plotX: plotX, plotY: plotY }; - // calculate connectors for previous and next point and push them inside + // Calculate connectors for previous and next point and push them inside // returned object if (calculateNeighbours) { ret.prevPointCont = getConnectors(segment, prevPointInd, false, connectEnds); } return ret; } + /** + * + */ function onChartAfterDrawChartBox() { (this.pane || []).forEach((pane) => { pane.render(); @@ -151465,6 +151643,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } } + /** + * + */ function onChartGetAxes() { if (!this.pane) { this.pane = []; @@ -151778,11 +151959,11 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // inside labelPos = this.yAxis.postTranslate( - // angle + // Angle ((shapeArgs.start || 0) + (shapeArgs.end || 0)) / 2 - this .xAxis.startAngleRad, - // radius + // Radius point.barX + point.pointWidth / 2); alignTo = merge(alignTo, { @@ -152001,7 +152182,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ if (this.options.connectEnds !== false && typeof firstValid !== 'undefined') { - this.connectEnds = true; // re-used in splines + this.connectEnds = true; // Re-used in splines points.splice(points.length, 0, points[firstValid]); popLastPoint = true; } @@ -152044,7 +152225,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ret[isXAxis ? 'xAxis' : 'yAxis'].push({ axis: axis, value: axis.translate(isXAxis ? - Math.PI - Math.atan2(x, y) : // angle + Math.PI - Math.atan2(x, y) : // Angle // distance from center Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)), true) }); @@ -152093,12 +152274,12 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ r = shapeArgs && shapeArgs.r; innerR = shapeArgs && shapeArgs.innerR; if (graphic && shapeArgs) { - // start values + // Start values graphic.attr({ r: paneInnerR, innerR: paneInnerR }); - // animate + // Animate graphic.animate({ r: r, innerR: innerR @@ -152150,11 +152331,11 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ function wrapSplineSeriesGetPointSpline(proceed, segment, point, i) { let ret, connectors; if (this.chart.polar) { - // moveTo or lineTo + // `moveTo` or `lineTo` if (!i) { ret = ['M', point.plotX, point.plotY]; } - else { // curve from last point to this + else { // Curve from last point to this connectors = getConnectors(segment, i, true, this.connectEnds); const rightContX = connectors.prevPointCont && connectors.prevPointCont.rightContX; @@ -152731,7 +152912,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts * @apioption series.waterfall.data.isSum */ - ''; // adds doclets above to transpiled file + ''; // Adds doclets above to transpiled file /* * * * Default Export @@ -152885,7 +153066,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const prevStack = yAxis.waterfall.stacks[this.stackKey], isPos = prevY > 0 ? -prevBox.height : 0; if (prevStack && prevBox && box) { const prevStackX = prevStack[i - 1]; - // y position of the connector is different when series are + // Y position of the connector is different when series are // stacked, yAxis is reversed and it also depends on point's // value let yPos; @@ -153056,7 +153237,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ waterfallStacks = yAxis.waterfall.stacks; stackedYNeg = this.stackedYNeg = []; stackedYPos = this.stackedYPos = []; - // the visible y range can be different when stacking is set to + // The visible y range can be different when stacking is set to // overlap and different when it's set to normal if (stacking === 'overlap') { objectEach(waterfallStacks[this.stackKey], function (stackX) { @@ -153110,7 +153291,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }, shapeArgs || {}); point.box = box; const range = [0, yValue], pointY = point.y || 0; - // code responsible for correct positions of stacked points + // Code responsible for correct positions of stacked points // starts here if (stacking) { if (actualStack) { @@ -153157,7 +153338,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } if (!point.isSum) { - // the connectorThreshold property is later used in + // The connectorThreshold property is later used in // getCrispPath function to draw a connector line in a // correct place actualStackX.connectorThreshold = @@ -153184,10 +153365,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } else { - // up points + // Up points y = Math.max(previousY, previousY + pointY) + range[0]; box.y = yAxis.translate(y, false, true, false, true); - // sum points + // Sum points if (point.isSum) { box.y = yAxis.translate(range[1], false, true, false, true); box.height = Math.min(yAxis.translate(range[0], false, true, false, true), yAxis.len) - box.y; // #4256 @@ -153203,7 +153384,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ hPos = range[1] + previousIntermediate; } if (yAxis.reversed) { - // swapping values + // Swapping values yPos ^= hPos; hPos ^= yPos; yPos ^= hPos; @@ -153294,7 +153475,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ })); ; /** - * @license Highmaps JS v11.4.0 (2024-03-05) + * @license Highmaps JS v11.4.1 (2024-04-04) * * Highmaps as a plugin for Highcharts or Highcharts Stock. * @@ -153515,7 +153696,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ point[key][method](); } }); - this.series.buildKDTree(); // rebuild kdtree #13195 + this.series.buildKDTree(); // Rebuild kdtree #13195 } ColorAxisComposition.pointSetVisible = pointSetVisible; /** @@ -154288,7 +154469,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ axis.reversed = userOptions.reversed || !horiz; axis.opposite = !horiz; super.init(chart, userOptions, 'colorAxis'); - // Super.init saves the extended user options, now replace it with the + // `super.init` saves the extended user options, now replace it with the // originals this.userOptions = userOptions; if (isArray(chart.userOptions.colorAxis)) { @@ -154384,6 +154565,10 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ }); legend.render(); this.chart.getMargins(true); + // If not drilling down/up + if (!this.chart.series.some((series) => series.isDrilling)) { + axis.isDirty = true; // Flag to fire drawChartBox + } // First time only if (!axis.added) { axis.added = true; @@ -154471,7 +154656,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ let colorValArray, colorKey, colorValIndex, pointArrayMap, calculatedExtremes, cSeries, i = series.length, yData, j; this.dataMin = Infinity; this.dataMax = -Infinity; - while (i--) { // x, y, value, other + while (i--) { // X, y, value, other cSeries = series[i]; colorKey = cSeries.colorKey = pick(cSeries.options.colorKey, cSeries.colorKey, cSeries.pointValKey, cSeries.zoneAxis, 'y'); pointArrayMap = cSeries.pointArrayMap; @@ -154772,7 +154957,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * @typedef {"linear"|"logarithmic"} Highcharts.ColorAxisTypeValue */ - ''; // detach doclet above + ''; // Detach doclet above return ColorAxis; }); @@ -155030,7 +155215,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @since 4.2.4 */ mouseWheelSensitivity: 1.1 - // enabled: false, + // Enabled: false, // enableButtons: null, // inherit from enabled // enableTouchZoom: null, // inherit from enabled // enableDoubleClickZoom: null, // inherit from enabled @@ -155207,6 +155392,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * Functions * * */ + /** + * + */ function bottomButton(x, y, w, h, options) { if (options) { const r = options?.r || 0; @@ -155215,11 +155403,17 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } return symbols.roundedRect(x, y, w, h, options); } + /** + * + */ function compose(SVGRendererClass) { symbols = SVGRendererClass.prototype.symbols; symbols.bottombutton = bottomButton; symbols.topbutton = topButton; } + /** + * + */ function topButton(x, y, w, h, options) { if (options) { const r = options?.r || 0; @@ -155586,7 +155780,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ return (this.value !== null && this.value !== Infinity && this.value !== -Infinity && - // undefined is allowed, but NaN is not (#17279) + // Undefined is allowed, but NaN is not (#17279) (this.value === void 0 || !isNaN(this.value))); } /** @@ -155683,7 +155877,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ tooltip: { followTouchMove: false } - }, userOptions // user's options + }, userOptions // User's options ); super.init(options, callback); } @@ -155876,8 +156070,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * Test for point in polygon. Polygon defined as array of [x,y] points. * @private */ - const pointInPolygon = function (point, polygon) { - let i, j, rel1, rel2, c = false, x = point.x, y = point.y; + const pointInPolygon = function ({ x, y }, polygon) { + let i, j, rel1, rel2, c = false; for (i = 0, j = polygon.length - 1; i < polygon.length; j = i++) { rel1 = polygon[i][1] > y; rel2 = polygon[j][1] > y; @@ -157464,7 +157658,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * @typedef {Object} Highcharts.TopoJSON */ - ''; // detach doclets above + ''; // Detach doclets above return GeoJSONComposition; }); @@ -158554,7 +158748,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } } /* - const mergeCollections = < + Const mergeCollections = < T extends Array >(a: T, b: T): T => { b.forEach((newer, i): void => { @@ -159335,9 +159529,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * The animation to apply to a the redraw */ update(options, redraw = true, animation) { - const newProjection = options.projection; - let isDirtyProjection = newProjection && ((Projection.toString(newProjection) !== - Projection.toString(this.options.projection))), isDirtyInsets = false; + const newProjection = options.projection, isDirtyProjection = newProjection && ((Projection.toString(newProjection) !== + Projection.toString(this.options.projection))); + let isDirtyInsets = false; merge(true, this.userOptions, options); merge(true, this.options, options); // If anything changed with the insets, destroy them all and create @@ -159377,7 +159571,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // Fit to natural bounds if center/zoom are not explicitly given if (!options.center && - // do not fire fitToBounds if user don't want to set zoom + // Do not fire fitToBounds if user don't want to set zoom Object.hasOwnProperty.call(options, 'zoom') && !isNumber(options.zoom)) { this.fitToBounds(void 0, void 0, false); @@ -159608,7 +159802,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const { noop } = H; const { splitPath } = MapChart; const { - // indirect dependency to keep product size low + // Indirect dependency to keep product size low column: ColumnSeries, scatter: ScatterSeries } = SeriesRegistry.seriesTypes; const { extend, find, fireEvent, getNestedProperty, isArray, defined, isNumber, isObject, merge, objectEach, pick, splat } = U; /* * @@ -159858,7 +160052,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ .animate({ animator: 1 }, animOptions, function () { if (typeof renderer.globalAnimation !== 'boolean' && renderer.globalAnimation.complete) { - // fire complete only from this place + // Fire complete only from this place renderer.globalAnimation.complete({ applyDrilldown: true }); @@ -160928,7 +161122,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * API Options * * */ - ''; // adds doclets above to transpiled file + ''; // Adds doclets above to transpiled file return MapPointSeries; }); @@ -161409,7 +161603,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ -connectorDistance : connectorDistance; // Set options for centered labels if (labelsAlign === 'center') { - connectorLength = 0; // do not use connector + connectorLength = 0; // Do not use connector options.connectorDistance = 0; range.labelAttribs.align = 'center'; } @@ -161637,7 +161831,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.BubbleLegendFormatterContextObject#value * @type {number} */ - ''; // detach doclets above + ''; // Detach doclets above return BubbleLegendItem; }); @@ -161685,24 +161879,26 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } // Create legend with bubbleLegend legend.render(); - chart.getMargins(); - chart.axes.forEach(function (axis) { - if (axis.visible) { // #11448 - axis.render(); - } - if (!bubbleLegendOptions.placed) { - axis.setScale(); - axis.updateNames(); - // Disable axis animation on init - objectEach(axis.ticks, function (tick) { - tick.isNew = true; - tick.isNewLabel = true; - }); - } - }); + // Calculate margins after first rendering the bubble legend + if (!bubbleLegendOptions.placed) { + chart.getMargins(); + chart.axes.forEach(function (axis) { + if (axis.visible) { // #11448 + axis.render(); + } + if (!bubbleLegendOptions.placed) { + axis.setScale(); + axis.updateNames(); + // Disable axis animation on init + objectEach(axis.ticks, function (tick) { + tick.isNew = true; + tick.isNewLabel = true; + }); + } + }); + chart.getMargins(); + } bubbleLegendOptions.placed = true; - // After recalculate axes, calculate margins again. - chart.getMargins(); // Call default 'drawChartBox' method. proceed.call(chart, options, callback); // Check bubble legend sizes and correct them if necessary. @@ -161788,7 +161984,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ legendItem = items[i].legendItem || {}; legendItem2 = (items[i + 1] || {}).legendItem || {}; if (legendItem.labelHeight) { - // for bubbleLegend + // For bubbleLegend items[i].itemHeight = legendItem.labelHeight; } if ( // Line break @@ -162212,7 +162408,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ height: 2 * radius }; } - else { // below zThreshold + else { // Below zThreshold // #1691 point.shapeArgs = point.plotY = point.dlBox = void 0; point.isInside = false; // #17281 @@ -162522,7 +162718,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ /** * @typedef {"area"|"width"} Highcharts.BubbleSizeByValue */ - ''; // detach doclets above + ''; // Detach doclets above /* * * * API Options @@ -162611,7 +162807,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @excluding enabled, enabledThreshold, height, radius, width * @apioption series.bubble.marker */ - ''; // adds doclets above to transpiled file + ''; // Adds doclets above to transpiled file return BubbleSeries; }); @@ -162709,7 +162905,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ } updateParallelArrays(point, i, iArgs) { super.updateParallelArrays.call(this, point, i, iArgs); - let processedXData = this.processedXData, xData = this.xData; + const processedXData = this.processedXData, xData = this.xData; if (processedXData && xData) { processedXData.length = xData.length; } @@ -162983,7 +163179,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * Map bubble with mapmarker symbol * @apioption series.mapbubble.marker */ - ''; // adds doclets above to transpiled file + ''; // Adds doclets above to transpiled file return MapBubbleSeries; }); @@ -163080,7 +163276,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @private */ isValid() { - // undefined is allowed + // Undefined is allowed return (this.value !== Infinity && this.value !== -Infinity); } @@ -163729,7 +163925,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @product highcharts highstock * @apioption series.heatmap.data.marker.states.select.heightPlus */ - ''; // keeps doclets above separate + ''; // Keeps doclets above separate /* * * * Default Export @@ -163953,7 +164149,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ const options = this.options; // #3758, prevent resetting in setData options.pointRange = pick(options.pointRange, options.colsize || 1); - // general point range + // General point range this.yAxis.axisPointRange = options.rowsize || 1; // Bind new symbol names symbols.ellipse = symbols.circle; @@ -164131,7 +164327,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.PointOptionsObject#value * @type {number|null|undefined} */ - ''; // detach doclets above + ''; // Detach doclets above return HeatmapSeries; }); @@ -164161,7 +164357,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ })); ; /** - * @license Highcharts JS v11.4.0 (2024-03-05) + * @license Highcharts JS v11.4.1 (2024-04-04) * * Exporting module * @@ -165422,7 +165618,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ fullscreen.origHeight = chart.chartHeight; // Handle exitFullscreen() method when user clicks 'Escape' button. if (fullscreen.browserProps) { - const unbindChange = addEvent(chart.container.ownerDocument, // chart's document + const unbindChange = addEvent(chart.container.ownerDocument, // Chart's document fullscreen.browserProps.fullscreenChange, function () { // Handle lack of async of browser's // fullScreenChange event. @@ -165537,7 +165733,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @param {global.Event} event * The event that occurred. */ - (''); // keeps doclets above separated from following code + (''); // Keeps doclets above separated from following code /* * * * API Options @@ -165570,7 +165766,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @requires modules/full-screen * @apioption chart.events.fullscreenOpen */ - (''); // keeps doclets above in transpiled file + (''); // Keeps doclets above in transpiled file return Fullscreen; }); @@ -165703,9 +165899,12 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @param {RequestInit} [fetchOptions] * Additional attributes for the post request */ + /** + * + */ function post(url, data, fetchOptions) { const formData = new win.FormData(); - // add the data + // Add the data objectEach(data, function (val, name) { formData.append(name, val); }); @@ -165774,7 +165973,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @name Highcharts.AjaxSettingsObject#url * @type {string} */ - (''); // keeps doclets above in JS file + (''); // Keeps doclets above in JS file return HttpUtilities; }); @@ -165970,9 +166169,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ return void 0; } const { childNodes, origDisplay, resetParams } = chart.printReverseInfo; - // put the chart back in + // Put the chart back in chart.moveContainers(chart.renderTo); - // restore all body content + // Restore all body content [].forEach.call(childNodes, function (node, i) { if (node.nodeType === 1) { node.style.display = (origDisplay[i] || ''); @@ -166017,14 +166216,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ ]; chart.setSize(printMaxWidth, void 0, false); } - // hide all body content + // Hide all body content [].forEach.call(printReverseInfo.childNodes, function (node, i) { if (node.nodeType === 1) { printReverseInfo.origDisplay[i] = node.style.display; node.style.display = 'none'; } }); - // pull out the chart + // Pull out the chart chart.moveContainers(body); // Storage details for undo action after printing chart.printReverseInfo = printReverseInfo; @@ -166170,7 +166369,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ boxShadow: '3px 3px 10px #888' }, navOptions.menuStyle)); } - // hide on mouse out + // Hide on mouse out menu.hideMenu = function () { css(menu, { display: 'none' }); if (button) { @@ -166200,7 +166399,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ menu.hideMenu(); } })); - // create the items + // Create the items items.forEach(function (item) { if (typeof item === 'string') { item = chart.options.exporting @@ -166255,14 +166454,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ chart.exportMenuHeight = menu.offsetHeight; } const menuStyle = { display: 'block' }; - // if outside right, right align it + // If outside right, right align it if (x + chart.exportMenuWidth > chartWidth) { menuStyle.right = (chartWidth - x - width - menuPadding) + 'px'; } else { menuStyle.left = (x - menuPadding) + 'px'; } - // if outside bottom, bottom align it + // If outside bottom, bottom align it if (y + height + chart.exportMenuHeight > chartHeight && button.alignOptions.verticalAlign !== 'top') { menuStyle.bottom = (chartHeight - y - menuPadding) + 'px'; @@ -166362,9 +166561,9 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ function exportChart(exportingOptions, chartOptions) { const svg = this.getSVGForExport(exportingOptions, chartOptions); - // merge the options + // Merge the options exportingOptions = merge(this.options.exporting, exportingOptions); - // do the post + // Do the post HU.post(exportingOptions.url, { filename: exportingOptions.filename ? exportingOptions.filename.replace(/\//g, '-') : @@ -166413,13 +166612,13 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ if (typeof s === 'string') { filename = s .toLowerCase() - .replace(/<\/?[^>]+(>|$)/g, '') // strip HTML tags + .replace(/<\/?[^>]+(>|$)/g, '') // Strip HTML tags .replace(/[\s_]+/g, '-') - .replace(/[^a-z0-9\-]/g, '') // preserve only latin - .replace(/^[\-]+/g, '') // dashes in the start - .replace(/[\-]+/g, '-') // dashes in a row + .replace(/[^a-z0-9\-]/g, '') // Preserve only latin + .replace(/^[\-]+/g, '') // Dashes in the start + .replace(/[\-]+/g, '-') // Dashes in a row .substr(0, 24) - .replace(/[\-]+$/g, ''); // dashes in the end; + .replace(/[\-]+$/g, ''); // Dashes in the end; } if (!filename || filename.length < 5) { filename = 'chart'; @@ -166457,14 +166656,14 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // ... and likewise with time, avoid that undefined time properties are // merged over legacy global time options options.time = merge(chart.userOptions.time, chartOptions && chartOptions.time); - // create a sandbox where a new chart will be generated + // Create a sandbox where a new chart will be generated const sandbox = createElement('div', null, { position: 'absolute', top: '-9999em', width: chart.chartWidth + 'px', height: chart.chartHeight + 'px' }, doc.body); - // get the source size + // Get the source size const cssWidth = chart.renderTo.style.width, cssHeight = chart.renderTo.style.height, sourceWidth = options.exporting.sourceWidth || options.chart.width || (/px$/.test(cssWidth) && parseInt(cssWidth, 10)) || @@ -166472,7 +166671,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ options.chart.height || (/px$/.test(cssHeight) && parseInt(cssHeight, 10)) || 400; - // override some options + // Override some options extend(options.chart, { animation: false, renderTo: sandbox, @@ -166481,7 +166680,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ width: sourceWidth, height: sourceHeight }); - options.exporting.enabled = false; // hide buttons in print + options.exporting.enabled = false; // Hide buttons in print delete options.data; // #3004 // prepare for replicating the chart options.series = []; @@ -166546,7 +166745,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ svg = chartCopy.getChartHTML(); fireEvent(this, 'getSVG', { chartCopy: chartCopy }); svg = chart.sanitizeSVG(svg, options); - // free up memory + // Free up memory options = null; chartCopy.destroy(); discardElement(sandbox); @@ -166681,7 +166880,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ // add these if (!defaultStyles[node.nodeName]) { /* - if (!dummySVG) { + If (!dummySVG) { dummySVG = doc.createElementNS(H.SVG_NS, 'svg'); dummySVG.setAttribute('version', '1.1'); doc.body.appendChild(dummySVG); @@ -166825,7 +167024,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ */ function print() { const chart = this; - if (chart.isPrinting) { // block the button while in printing mode + if (chart.isPrinting) { // Block the button while in printing mode return; } printingChart = chart; @@ -166837,7 +167036,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ setTimeout(() => { win.focus(); // #1510 win.print(); - // allow the browser to prepare before reverting + // Allow the browser to prepare before reverting if (!G.isSafari) { setTimeout(() => { chart.afterPrint(); @@ -166916,8 +167115,8 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ .replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, // eslint-disable-line max-len '$1="rgb($2)" $1-opacity="$3"') // Replace HTML entities, issue #347 - .replace(/ /g, '\u00A0') // no-break space - .replace(/­/g, '\u00AD'); // soft hyphen + .replace(/ /g, '\u00A0') // No-break space + .replace(/­/g, '\u00AD'); // Soft hyphen return svg; } })(Exporting || (Exporting = {})); @@ -166997,7 +167196,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * @typedef {"image/png"|"image/jpeg"|"application/pdf"|"image/svg+xml"} Highcharts.ExportingMimeTypeValue */ - (''); // keeps doclets above in transpiled file + (''); // Keeps doclets above in transpiled file /* * * * API Options @@ -167029,7 +167228,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * @requires modules/exporting * @apioption chart.events.beforePrint */ - (''); // keeps doclets above in transpiled file + (''); // Keeps doclets above in transpiled file return Exporting; }); @@ -167047,7 +167246,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ })); ; /** - * @license Highcharts JS v11.4.0 (2024-03-05) + * @license Highcharts JS v11.4.1 (2024-04-04) * * Client side exporting module * @@ -167225,7 +167424,7 @@ var _0x2132=['(3(H,g){3 a(){}a.3A=3(){4 c=26.5H,n=c.6J(/(86|7q|7o|7n|7l|5P(?=\\/ * * */ const OfflineExportingDefaults = { - libURL: 'https://code.highcharts.com/11.4.0/lib/', + libURL: 'https://code.highcharts.com/11.4.1/lib/', // When offline-exporting is loaded, redefine the menu item definitions // related to download. menuItemDefinitions: { @@ -192541,9 +192740,23 @@ if (ns.DEV_VERSION) $.ICONFONT_PREFIXES = ['fa.?', 'wi']; //Set icon for the different icons on the header of modal windows etc. + $.BSMODAL_USE_SQUARE_ICONS = true; + let icon_fa_prefix = 'far fa-'; $._set_bsHeaderIcons({ pin : ['far fa-thumbtack fa-inside-circle', $.FONTAWESOME_PREFIX + ' fa-circle'], unpin : ['fas fa-thumbtack fa-inside-circle', $.FONTAWESOME_PREFIX + ' fa-circle'], + }, { + back : icon_fa_prefix + 'arrow-left', + forward : icon_fa_prefix + 'arrow-right', + pin : icon_fa_prefix + 'thumbtack fa-sm', + unpin : icon_fa_prefix + 'thumbtack fa-sm', + extend : icon_fa_prefix + 'square-plus', + diminish: icon_fa_prefix + 'square-minus', + new : icon_fa_prefix + 'window-maximize', + warning : icon_fa_prefix + 'exclamation fa-size-15', + info : icon_fa_prefix + 'info fa-sm', + help : icon_fa_prefix + 'question fa-sm', + close : icon_fa_prefix + 'xmark' }); //Set icon and name for different message type @@ -215321,23 +215534,27 @@ leaflet-bootstrap-control-legend.js ******************************************************************* ******************************************************************/ - L.BsLegend_defaultOptions = { - show : true, //Show or hide the legend at init - showContent: true, //Show or hide the content at init - showIcons : true, //Show or hide the icon-buttons t the header at init - isExtended : true, //Extend/diminish the legend at init + L.BsLegend_close_icon = ['fa-map fa-scale-x-08', 'fa-slash fa-scale-x-08']; + L.BsLegend_close_title = {da:'Skjul', en:'Hide'}; + L.BsLegend_defaultOptions = function(){ + return { + show : true, //Show or hide the legend at init + showContent: true, //Show or hide the content at init + showIcons : true, //Show or hide the icon-buttons t the header at init + isExtended : true, //Extend/diminish the legend at init - //closeIconOptions = options for the close-icon in the header that removes the layer - closeIconOptions: { - icon : ['fa-map fa-scale-x-08', 'fa-slash fa-scale-x-08'], - className: 'fa-map-margin-right', - title : {da:'Skjul', en:'Hide'}, - } + //closeIconOptions = options for the close-icon in the header that removes the layer + closeIconOptions: { + icon : L.BsLegend_close_icon, + className: $.BSMODAL_USE_SQUARE_ICONS ? null : 'fa-map-margin-right', + title : L.BsLegend_close_title + } + }; }; L.BsLegend = function( options ){ - this.options = $.extend(true, {semiTransparent: true}, L.BsLegend_defaultOptions, options); + this.options = $.extend(true, {semiTransparent: true}, L.BsLegend_defaultOptions(), options); this.index = options.index; }; diff --git a/demo/index.html b/demo/index.html index 6054e0d..98c7355 100644 --- a/demo/index.html +++ b/demo/index.html @@ -92,8 +92,8 @@ + -