renalware-core 2.0.149 → 2.0.151
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -2
- data/app/assets/config/renalware/core/manifest.js +1 -0
- data/app/assets/images/renalware/icons/align-justify.svg +3 -0
- data/app/assets/images/renalware/icons/bar-chart.svg +1 -0
- data/app/assets/images/renalware/icons/chart-bar.svg +1 -0
- data/app/assets/images/renalware/icons/chart.svg +3 -0
- data/app/assets/images/renalware/icons/list-bullet.svg +1 -0
- data/app/assets/images/renalware/icons/list.svg +8 -0
- data/app/assets/javascripts/renalware/README.md +25 -1
- data/app/assets/javascripts/renalware/components/dialogs.js.erb +3 -1
- data/app/assets/javascripts/renalware/components/hd.js +2 -2
- data/app/assets/javascripts/renalware/components/letters.js +1 -1
- data/app/assets/javascripts/renalware/components/masonry.run.js +2 -2
- data/app/assets/javascripts/renalware/components/patient_menu.js +1 -1
- data/app/assets/javascripts/renalware/components/toggler.js +1 -1
- data/app/assets/javascripts/renalware/rollup_compiled.css +87457 -0
- data/app/assets/javascripts/renalware/rollup_compiled.js +3148 -3
- data/app/assets/stylesheets/renalware/core.scss +1 -0
- data/app/assets/stylesheets/renalware/modules/_hd.scss +8 -4
- data/app/assets/stylesheets/renalware/modules/_pathology.scss +8 -1
- data/app/assets/stylesheets/renalware/modules/_pd.scss +35 -0
- data/app/assets/stylesheets/renalware/partials/_charting.scss +17 -0
- data/app/assets/stylesheets/renalware/partials/_forms.scss +5 -1
- data/app/assets/stylesheets/renalware/partials/_simple_form.scss +8 -0
- data/app/assets/stylesheets/renalware/partials/_utilities.scss +12 -0
- data/app/assets/stylesheets/tailwind/tailwind.css +3 -0
- data/app/components/renalware/application_component.rb +2 -1
- data/app/components/renalware/events/{biopsies_component.html.slim → event_list_component.html.slim} +5 -4
- data/app/components/renalware/events/event_list_component.rb +77 -0
- data/app/components/renalware/hd/administer_prescription_dropdown_component.rb +1 -5
- data/app/components/renalware/hd/prescription_last_administration_component.html.slim +0 -1
- data/app/components/renalware/hd/prescription_last_administration_component.rb +8 -7
- data/app/components/renalware/letters/unread_electronic_ccs_component.rb +1 -0
- data/app/components/renalware/pathology/chart_component.html.slim +5 -0
- data/app/components/renalware/pathology/chart_component.rb +40 -0
- data/app/components/renalware/pathology/sparkline_component.html.slim +15 -0
- data/app/components/renalware/pathology/sparkline_component.rb +135 -0
- data/app/components/renalware/patients/side_menu_component.rb +2 -11
- data/app/components/renalware/pd/adequacy_results_component.html.slim +9 -0
- data/app/components/renalware/pd/adequacy_results_component.rb +39 -0
- data/app/components/renalware/pd/pet_results_component.html.slim +37 -0
- data/app/components/renalware/pd/pet_results_component.rb +84 -0
- data/app/{views/renalware/surveys/_eq5d_summary_part.html.slim → components/renalware/surveys/eq5d_component.html.slim} +5 -5
- data/app/{models/renalware/surveys/eq5d_summary_part.rb → components/renalware/surveys/eq5d_component.rb} +7 -5
- data/app/{views/renalware/surveys/_pos_s_summary_part.html.slim → components/renalware/surveys/pos_s_component.html.slim} +6 -9
- data/app/{models/renalware/surveys/pos_s_summary_part.rb → components/renalware/surveys/pos_s_component.rb} +9 -5
- data/app/components/renalware/system/admin_menu_component.rb +2 -2
- data/app/components/renalware/system/article_component.html.slim +3 -0
- data/app/components/renalware/system/article_component.rb +9 -0
- data/app/controllers/renalware/admissions/consults_controller.rb +1 -1
- data/app/controllers/renalware/concerns/pdf_renderable.rb +1 -1
- data/app/controllers/renalware/hd/scheduling/diaries_controller.rb +1 -1
- data/app/controllers/renalware/medications/prescriptions_controller.rb +1 -1
- data/app/controllers/renalware/pathology/charts_controller.rb +21 -0
- data/app/controllers/renalware/pathology/current_observation_results_controller.rb +1 -1
- data/app/controllers/renalware/pathology/historical_observation_results_controller.rb +1 -1
- data/app/controllers/renalware/pathology/nearest_observation_results_controller.rb +52 -0
- data/app/controllers/renalware/pathology/observation_requests_controller.rb +1 -1
- data/app/controllers/renalware/pathology/observations_controller.rb +26 -2
- data/app/controllers/renalware/pathology/requests/requests_controller.rb +7 -5
- data/app/controllers/renalware/pd/adequacy_completions_controller.rb +18 -0
- data/app/controllers/renalware/pd/adequacy_results_controller.rb +98 -0
- data/app/controllers/renalware/pd/pet_completions_controller.rb +18 -0
- data/app/controllers/renalware/pd/pet_results_controller.rb +122 -0
- data/app/controllers/renalware/pd/unified_pet_adequacies_controller.rb +102 -0
- data/app/controllers/renalware/renal/aki_alerts_controller.rb +1 -1
- data/app/controllers/renalware/renal/registry_preflight_checks_controller.rb +55 -19
- data/app/documents/renalware/age.rb +3 -1
- data/app/helpers/renalware/application_helper.rb +7 -7
- data/app/helpers/renalware/article_helper.rb +3 -3
- data/app/helpers/renalware/boolean_helper.rb +15 -0
- data/app/helpers/renalware/clipboard_helper.rb +2 -3
- data/app/helpers/renalware/dashboards_helper.rb +2 -2
- data/app/helpers/renalware/definition_list_helper.rb +3 -3
- data/app/helpers/renalware/devise_helper.rb +1 -1
- data/app/helpers/renalware/form_helper.rb +2 -2
- data/app/helpers/renalware/letters_helper.rb +1 -1
- data/app/helpers/renalware/link_helper.rb +1 -1
- data/app/helpers/renalware/mdm_helper.rb +1 -0
- data/app/helpers/renalware/navigation_helper.rb +1 -1
- data/app/helpers/renalware/patient_helper.rb +2 -2
- data/app/helpers/renalware/snippets_helper.rb +9 -10
- data/app/helpers/renalware/toggle_helper.rb +6 -6
- data/app/helpers/renalware/tooltip_helper.rb +14 -16
- data/app/inputs/clock_picker_input.rb +3 -3
- data/app/inputs/date_picker_input.rb +3 -3
- data/app/inputs/simple_time_input.rb +3 -3
- data/app/inputs/trix_editor_input.rb +2 -0
- data/app/javascript/renalware/controllers/blas_controller.js +37 -0
- data/app/javascript/renalware/controllers/modal_controller.js +137 -0
- data/app/javascript/renalware/controllers/pathology/sparklines_controller.js +206 -0
- data/app/javascript/renalware/controllers/pd/pet_charts_controller.js +169 -0
- data/app/javascript/renalware/controllers/session_controller.js +1 -1
- data/app/javascript/renalware/controllers/simple_toggle_controller.js +17 -0
- data/app/javascript/renalware/controllers/tabs_controller.js +43 -0
- data/app/javascript/renalware/controllers/toggle_controller.js +2 -2
- data/app/javascript/renalware/index.js +10 -0
- data/app/models/concerns/renalware/patients_ransack_helper.rb +2 -0
- data/app/models/renalware/clinics/body_surface_area.rb +40 -0
- data/app/models/renalware/clinics/clinic_visit.rb +21 -1
- data/app/models/renalware/clinics/total_body_water.rb +63 -0
- data/app/models/renalware/events/advanced_care_plan.rb +24 -0
- data/app/models/renalware/events/clinical_frailty_score.rb +24 -0
- data/app/models/renalware/feeds/hl7_message.rb +1 -0
- data/app/models/renalware/hd/prescription_last_administration_query.rb +4 -0
- data/app/models/renalware/hd/session_forms/pdf_renderer.rb +1 -1
- data/app/models/renalware/hd/sessions/auditable_session_collection.rb +4 -1
- data/app/models/renalware/letters/html_renderer.rb +1 -1
- data/app/models/renalware/letters/printing/duplex_interleaved_pdf_renderer.rb +1 -1
- data/app/models/renalware/letters/recipient_address_pdf_renderer.rb +1 -1
- data/app/models/renalware/pathology/nearest_observations_query.rb +44 -0
- data/app/models/renalware/pathology/observations_jsonb_serializer.rb +1 -1
- data/app/models/renalware/patient.rb +16 -1
- data/app/models/renalware/patients/alert.rb +1 -0
- data/app/models/renalware/patients/ingestion/update_master_patient_index.rb +1 -0
- data/app/models/renalware/patients/patient_hospital_identifiers.rb +1 -0
- data/app/models/renalware/pd.rb +2 -0
- data/app/models/renalware/pd/adequacy_calculated_attributes.rb +159 -0
- data/app/models/renalware/pd/adequacy_result.rb +76 -0
- data/app/models/renalware/pd/apd/glucose_calculator.rb +1 -0
- data/app/models/renalware/pd/patient.rb +4 -0
- data/app/models/renalware/pd/pet_dextrose_concentration.rb +17 -0
- data/app/models/renalware/pd/pet_result.rb +92 -0
- data/app/models/renalware/pd/unified_pet_adequacy_form.rb +46 -0
- data/app/models/renalware/renal/registry/preflight_checks/missing_esrf_query.rb +50 -0
- data/app/models/renalware/snippets/duplicate_snippet_title_generator.rb +1 -0
- data/app/models/renalware/transplants/recipient_workup_builder.rb +1 -0
- data/app/models/renalware/transplants/registration_status.rb +1 -1
- data/app/models/renalware/ukrdc/outgoing/rendering/patient_number.rb +1 -1
- data/app/models/renalware/user.rb +10 -0
- data/app/pdfs/renalware/events/event_pdf.rb +1 -0
- data/app/policies/renalware/events/advanced_care_plan_policy.rb +10 -0
- data/app/policies/renalware/events/clinical_frailty_score_policy.rb +10 -0
- data/app/policies/renalware/pd/adequacy_result_policy.rb +15 -0
- data/app/policies/renalware/pd/pet_result_policy.rb +15 -0
- data/app/policies/renalware/renal/registry_preflight_check_policy.rb +4 -0
- data/app/presenters/renalware/clinical/profile_presenter.rb +1 -0
- data/app/presenters/renalware/hd/dashboard_presenter.rb +1 -0
- data/app/presenters/renalware/hd/profile_presenter.rb +1 -0
- data/app/presenters/renalware/hd/scheduling/diary_presenter.rb +1 -0
- data/app/presenters/renalware/hd/session_presenter.rb +1 -0
- data/app/presenters/renalware/hd/unmet_preferences_presenter.rb +1 -1
- data/app/presenters/renalware/mdm_patients_presenter.rb +1 -0
- data/app/presenters/renalware/pd/dashboard_presenter.rb +10 -2
- data/app/presenters/renalware/ukrdc/patient_presenter.rb +1 -0
- data/app/presenters/renalware/user_session_presenter.rb +1 -1
- data/app/validators/renalware/patients/nhs_number_validator.rb +88 -0
- data/app/values/renalware/address.rb +1 -0
- data/app/views/renalware/accesses/assessments/show.html.slim +1 -1
- data/app/views/renalware/accesses/procedures/show.html.slim +1 -1
- data/app/views/renalware/accesses/profiles/show.html.slim +1 -1
- data/app/views/renalware/admin/cache/show.html.slim +36 -0
- data/app/views/renalware/admin/playgrounds/show.html.slim +3 -0
- data/app/views/renalware/clinical/profiles/show.html.slim +11 -1
- data/app/views/renalware/clinics/clinic_visits/_table.html.slim +2 -0
- data/app/views/renalware/clinics/clinic_visits/_table_row.html.slim +2 -0
- data/app/views/renalware/dashboard/letters/_letter.html.slim +1 -1
- data/app/views/renalware/directory/people/show.html.slim +1 -1
- data/app/views/renalware/events/advanced_care_plans/_cell.html.slim +2 -0
- data/app/views/renalware/events/advanced_care_plans/_inputs.html.slim +4 -0
- data/app/views/renalware/events/advanced_care_plans/_toggled_cell.html.slim +8 -0
- data/app/views/renalware/events/clinical_frailty_score/_cell.html.slim +2 -0
- data/app/views/renalware/events/clinical_frailty_score/_inputs.html.slim +4 -0
- data/app/views/renalware/events/clinical_frailty_score/_toggled_cell.html.slim +8 -0
- data/app/views/renalware/events/events/_table.html.slim +1 -1
- data/app/views/renalware/hd/current_profile/_show.html.slim +1 -1
- data/app/views/renalware/hd/current_profile/show.html.slim +1 -1
- data/app/views/renalware/hd/prescription_administrations/_form.html.slim +2 -0
- data/app/views/renalware/hd/sessions/_show.html.slim +1 -1
- data/app/views/renalware/hd/witnesses/_form.html.slim +2 -0
- data/app/views/renalware/letters/electronic_receipts/_table.html.slim +1 -1
- data/app/views/renalware/low_clearance/dashboards/show.html.slim +10 -0
- data/app/views/renalware/mdm/_pathology.html.slim +0 -1
- data/app/views/renalware/mdm/show.html.slim +1 -1
- data/app/views/renalware/navigation/_menu.html.slim +1 -0
- data/app/views/renalware/navigation/_pd.html.slim +5 -0
- data/app/views/renalware/pathology/charts/show.html.slim +11 -0
- data/app/views/renalware/pathology/current_observation_results/index.html.slim +6 -0
- data/app/views/renalware/pathology/historical_observation_results/_table.html.slim +4 -3
- data/app/views/renalware/pathology/historical_observation_results/index.html.slim +1 -1
- data/app/views/renalware/pathology/observations/_diff.html.slim +1 -1
- data/app/views/renalware/patients/patients/show.html.slim +1 -1
- data/app/views/renalware/pd/_exit_site_infections.html.slim +4 -0
- data/app/views/renalware/pd/_peritonitis_episodes.html.slim +3 -0
- data/app/views/renalware/pd/adequacy_completions/_filters.html.slim +19 -0
- data/app/views/renalware/pd/adequacy_completions/index.html.slim +4 -0
- data/app/views/renalware/pd/adequacy_results/_form_fields.html.slim +9 -0
- data/app/views/renalware/pd/adequacy_results/_table.html.slim +72 -0
- data/app/views/renalware/pd/adequacy_results/edit.html.slim +89 -0
- data/app/views/renalware/pd/adequacy_results/index.js.erb +1 -0
- data/app/views/renalware/pd/adequacy_results/new.html.slim +8 -0
- data/app/views/renalware/pd/dashboards/show.html.slim +3 -0
- data/app/views/renalware/pd/dashboards/show/_page_actions.html.slim +14 -0
- data/app/views/renalware/pd/pet_completions/_filters.html.slim +24 -0
- data/app/views/renalware/pd/pet_completions/index.html.slim +4 -0
- data/app/views/renalware/pd/pet_results/_form_fields.html.slim +12 -0
- data/app/views/renalware/pd/pet_results/_pathology_results.html.slim +36 -0
- data/app/views/renalware/pd/pet_results/_table.html.slim +62 -0
- data/app/views/renalware/pd/pet_results/edit.html.slim +35 -0
- data/app/views/renalware/pd/pet_results/index.js.erb +1 -0
- data/app/views/renalware/pd/pet_results/new.html.slim +8 -0
- data/app/views/renalware/pd/unified_pet_adequacies/_form.html.slim +22 -0
- data/app/views/renalware/pd/unified_pet_adequacies/new.html.slim +2 -0
- data/app/views/renalware/renal/profiles/show.html.slim +1 -1
- data/app/views/renalware/renal/registry_preflight_checks/_filters.html.slim +5 -3
- data/app/views/renalware/renal/registry_preflight_checks/_navigation.html.slim +1 -0
- data/app/views/renalware/renal/registry_preflight_checks/deaths.html.slim +2 -1
- data/app/views/renalware/renal/registry_preflight_checks/missing_esrf.html.slim +12 -0
- data/app/views/renalware/renal/registry_preflight_checks/patients.html.slim +1 -2
- data/app/views/renalware/surveys/dashboards/show.html.slim +2 -2
- data/app/views/renalware/transplants/donor_workups/show.html.slim +1 -1
- data/app/views/renalware/transplants/mdm/_bottom.html.slim +3 -1
- data/app/views/renalware/transplants/recipient_followups/show.html.slim +1 -1
- data/app/views/renalware/transplants/recipient_operations/show.html.slim +1 -1
- data/app/views/renalware/transplants/recipient_workups/show.html.slim +1 -1
- data/app/views/renalware/transplants/registrations/show.html.slim +1 -1
- data/config/initializers/inflections.rb +8 -0
- data/config/initializers/wicked_pdf.rb +12 -0
- data/config/locales/en-GB.yml +1 -1
- data/config/locales/renalware/events/advanced_care_plan.en.yml +12 -0
- data/config/locales/renalware/events/biopsy.en.yml +2 -0
- data/config/locales/renalware/events/clinical_frailty_score.en.yml +16 -0
- data/config/locales/renalware/events/clinical_frailty_score_component.en.yml +8 -0
- data/config/locales/renalware/nhs_number.en.yml +6 -0
- data/config/locales/renalware/pd/adequacy_result.en.yml +9 -0
- data/config/locales/renalware/pd/dashboard.en.yml +3 -0
- data/config/locales/renalware/pd/pet_result.en.yml +23 -0
- data/config/locales/renalware/renal/registry.en.yml +1 -0
- data/config/routes/pathology.rb +6 -0
- data/config/routes/pd.rb +5 -0
- data/config/routes/renal.rb +1 -0
- data/db/functions/generate_secure_id_v01.sql +1 -1
- data/db/migrate/20200226145010_add_unique_indexes.rb +46 -0
- data/db/migrate/20200421082715_add_body_surface_area_to_clinic_visits.rb +8 -0
- data/db/migrate/20200421132911_create_pd_pet_dextrose_concentrations.rb +13 -0
- data/db/migrate/20200421143546_create_pet_results.rb +66 -0
- data/db/migrate/20200427123229_create_adequacy_results.rb +54 -0
- data/db/migrate/20200616115709_add_height_weight_to_pd_adequacy_results.rb +8 -0
- data/db/migrate/20200618144228_add_feature_flags_to_users.rb +14 -0
- data/db/seeds/default/events/event_types.csv +2 -0
- data/lib/renalware/engine.rb +4 -2
- data/lib/renalware/version_number.rb +11 -0
- data/lib/tasks/renalware.rake +7 -1
- data/spec/factories/accesses/profiles.rb +1 -0
- data/spec/factories/events/events_types.rb +12 -0
- data/spec/factories/patients/patients.rb +22 -1
- data/spec/factories/pd/adequacy_results.rb +16 -0
- data/spec/factories/pd/pet_results.rb +9 -0
- metadata +115 -25
- data/app/components/renalware/events/biopsies_component.rb +0 -20
- data/lib/renalware/version.rb +0 -5
@@ -3807,6 +3807,37 @@ function _createSuper(Derived) {
|
|
3807
3807
|
};
|
3808
3808
|
}
|
3809
3809
|
|
3810
|
+
function _toConsumableArray(arr) {
|
3811
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
3812
|
+
}
|
3813
|
+
|
3814
|
+
function _arrayWithoutHoles(arr) {
|
3815
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
3816
|
+
}
|
3817
|
+
|
3818
|
+
function _iterableToArray(iter) {
|
3819
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
3820
|
+
}
|
3821
|
+
|
3822
|
+
function _unsupportedIterableToArray(o, minLen) {
|
3823
|
+
if (!o) return;
|
3824
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
3825
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
3826
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
3827
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
3828
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
3829
|
+
}
|
3830
|
+
|
3831
|
+
function _arrayLikeToArray(arr, len) {
|
3832
|
+
if (len == null || len > arr.length) len = arr.length;
|
3833
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
3834
|
+
return arr2;
|
3835
|
+
}
|
3836
|
+
|
3837
|
+
function _nonIterableSpread() {
|
3838
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
3839
|
+
}
|
3840
|
+
|
3810
3841
|
var $ = window.$;
|
3811
3842
|
|
3812
3843
|
var _default = function(_Controller) {
|
@@ -3822,7 +3853,7 @@ var _default = function(_Controller) {
|
|
3822
3853
|
event.preventDefault;
|
3823
3854
|
var tbody = event.target.closest("tbody");
|
3824
3855
|
tbody.classList.toggle("toggleable--open");
|
3825
|
-
$(".
|
3856
|
+
$(".mgrid > .row").masonry("layout");
|
3826
3857
|
}
|
3827
3858
|
}, {
|
3828
3859
|
key: "table",
|
@@ -3836,7 +3867,7 @@ var _default = function(_Controller) {
|
|
3836
3867
|
tbodies.forEach(function(tbody) {
|
3837
3868
|
tbody.classList.toggle("toggleable--open", !hide);
|
3838
3869
|
});
|
3839
|
-
$(".
|
3870
|
+
$(".mgrid > .row").masonry("layout");
|
3840
3871
|
}
|
3841
3872
|
} ]);
|
3842
3873
|
return _default;
|
@@ -4197,12 +4228,3118 @@ var _default$7 = function(_Controller) {
|
|
4197
4228
|
}, {
|
4198
4229
|
key: "debug",
|
4199
4230
|
get: function get() {
|
4200
|
-
return this.data.get("debug");
|
4231
|
+
return this.data.get("debug") === "true";
|
4232
|
+
}
|
4233
|
+
} ]);
|
4234
|
+
return _default;
|
4235
|
+
}(Controller);
|
4236
|
+
|
4237
|
+
var _default$8 = function(_Controller) {
|
4238
|
+
_inherits(_default, _Controller);
|
4239
|
+
var _super = _createSuper(_default);
|
4240
|
+
function _default() {
|
4241
|
+
_classCallCheck(this, _default);
|
4242
|
+
return _super.apply(this, arguments);
|
4243
|
+
}
|
4244
|
+
_createClass(_default, [ {
|
4245
|
+
key: "connect",
|
4246
|
+
value: function connect() {
|
4247
|
+
this.toggleClass = this.data.get("class") || "hidden";
|
4248
|
+
}
|
4249
|
+
}, {
|
4250
|
+
key: "toggle",
|
4251
|
+
value: function toggle(event) {
|
4252
|
+
var _this = this;
|
4253
|
+
event.preventDefault();
|
4254
|
+
this.toggleableTargets.forEach(function(target) {
|
4255
|
+
target.classList.toggle(_this.toggleClass);
|
4256
|
+
});
|
4257
|
+
}
|
4258
|
+
} ]);
|
4259
|
+
return _default;
|
4260
|
+
}(Controller);
|
4261
|
+
|
4262
|
+
_defineProperty(_default$8, "targets", [ "toggleable" ]);
|
4263
|
+
|
4264
|
+
var _default$9 = function(_Controller) {
|
4265
|
+
_inherits(_default, _Controller);
|
4266
|
+
var _super = _createSuper(_default);
|
4267
|
+
function _default() {
|
4268
|
+
_classCallCheck(this, _default);
|
4269
|
+
return _super.apply(this, arguments);
|
4270
|
+
}
|
4271
|
+
_createClass(_default, [ {
|
4272
|
+
key: "connect",
|
4273
|
+
value: function connect() {}
|
4274
|
+
}, {
|
4275
|
+
key: "initialize",
|
4276
|
+
value: function initialize() {
|
4277
|
+
this.activeTabClasses = (this.data.get("activeTab") || "active").split(" ");
|
4278
|
+
this.showTab();
|
4279
|
+
}
|
4280
|
+
}, {
|
4281
|
+
key: "change",
|
4282
|
+
value: function change(event) {
|
4283
|
+
event.preventDefault();
|
4284
|
+
this.index = this.tabTargets.indexOf(event.currentTarget);
|
4285
|
+
}
|
4286
|
+
}, {
|
4287
|
+
key: "showTab",
|
4288
|
+
value: function showTab() {
|
4289
|
+
var _this = this;
|
4290
|
+
this.tabTargets.forEach(function(tab, index) {
|
4291
|
+
var panel = _this.panelTargets[index];
|
4292
|
+
if (index === _this.index) {
|
4293
|
+
var _tab$classList;
|
4294
|
+
panel.classList.remove("hidden");
|
4295
|
+
(_tab$classList = tab.classList).add.apply(_tab$classList, _toConsumableArray(_this.activeTabClasses));
|
4296
|
+
} else {
|
4297
|
+
var _tab$classList2;
|
4298
|
+
panel.classList.add("hidden");
|
4299
|
+
(_tab$classList2 = tab.classList).remove.apply(_tab$classList2, _toConsumableArray(_this.activeTabClasses));
|
4300
|
+
}
|
4301
|
+
});
|
4302
|
+
}
|
4303
|
+
}, {
|
4304
|
+
key: "index",
|
4305
|
+
get: function get() {
|
4306
|
+
return parseInt(this.data.get("index") || 0);
|
4307
|
+
},
|
4308
|
+
set: function set(value) {
|
4309
|
+
this.data.set("index", value);
|
4310
|
+
this.showTab();
|
4201
4311
|
}
|
4202
4312
|
} ]);
|
4203
4313
|
return _default;
|
4204
4314
|
}(Controller);
|
4205
4315
|
|
4316
|
+
_defineProperty(_default$9, "targets", [ "tab", "panel" ]);
|
4317
|
+
|
4318
|
+
var highchartsMore = createCommonjsModule(function(module) {
|
4319
|
+
(function(f) {
|
4320
|
+
module.exports ? (f["default"] = f, module.exports = f) : f("undefined" !== typeof Highcharts ? Highcharts : void 0);
|
4321
|
+
})(function(f) {
|
4322
|
+
function E(l, a, c, b) {
|
4323
|
+
l.hasOwnProperty(a) || (l[a] = b.apply(null, c));
|
4324
|
+
}
|
4325
|
+
f = f ? f._modules : {};
|
4326
|
+
E(f, "parts-more/Pane.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
|
4327
|
+
function c(d, b, n) {
|
4328
|
+
return Math.sqrt(Math.pow(d - n[0], 2) + Math.pow(b - n[1], 2)) < n[2] / 2;
|
4329
|
+
}
|
4330
|
+
var b = a.addEvent, u = a.extend, v = a.merge, w = a.pick, f = a.splat, y = l.CenteredSeriesMixin;
|
4331
|
+
l.Chart.prototype.collectionsWithUpdate.push("pane");
|
4332
|
+
a = function() {
|
4333
|
+
function d(d, b) {
|
4334
|
+
this.options = this.chart = this.center = this.background = void 0;
|
4335
|
+
this.coll = "pane";
|
4336
|
+
this.defaultOptions = {
|
4337
|
+
center: [ "50%", "50%" ],
|
4338
|
+
size: "85%",
|
4339
|
+
innerSize: "0%",
|
4340
|
+
startAngle: 0
|
4341
|
+
};
|
4342
|
+
this.defaultBackgroundOptions = {
|
4343
|
+
shape: "circle",
|
4344
|
+
borderWidth: 1,
|
4345
|
+
borderColor: "#cccccc",
|
4346
|
+
backgroundColor: {
|
4347
|
+
linearGradient: {
|
4348
|
+
x1: 0,
|
4349
|
+
y1: 0,
|
4350
|
+
x2: 0,
|
4351
|
+
y2: 1
|
4352
|
+
},
|
4353
|
+
stops: [ [ 0, "#ffffff" ], [ 1, "#e6e6e6" ] ]
|
4354
|
+
},
|
4355
|
+
from: -Number.MAX_VALUE,
|
4356
|
+
innerRadius: 0,
|
4357
|
+
to: Number.MAX_VALUE,
|
4358
|
+
outerRadius: "105%"
|
4359
|
+
};
|
4360
|
+
this.init(d, b);
|
4361
|
+
}
|
4362
|
+
d.prototype.init = function(d, b) {
|
4363
|
+
this.chart = b;
|
4364
|
+
this.background = [];
|
4365
|
+
b.pane.push(this);
|
4366
|
+
this.setOptions(d);
|
4367
|
+
};
|
4368
|
+
d.prototype.setOptions = function(d) {
|
4369
|
+
this.options = v(this.defaultOptions, this.chart.angular ? {
|
4370
|
+
background: {}
|
4371
|
+
} : void 0, d);
|
4372
|
+
};
|
4373
|
+
d.prototype.render = function() {
|
4374
|
+
var d = this.options, b = this.options.background, a = this.chart.renderer;
|
4375
|
+
this.group || (this.group = a.g("pane-group").attr({
|
4376
|
+
zIndex: d.zIndex || 0
|
4377
|
+
}).add());
|
4378
|
+
this.updateCenter();
|
4379
|
+
if (b) for (b = f(b), d = Math.max(b.length, this.background.length || 0), a = 0; a < d; a++) b[a] && this.axis ? this.renderBackground(v(this.defaultBackgroundOptions, b[a]), a) : this.background[a] && (this.background[a] = this.background[a].destroy(),
|
4380
|
+
this.background.splice(a, 1));
|
4381
|
+
};
|
4382
|
+
d.prototype.renderBackground = function(d, b) {
|
4383
|
+
var a = "animate", n = {
|
4384
|
+
class: "highcharts-pane " + (d.className || "")
|
4385
|
+
};
|
4386
|
+
this.chart.styledMode || u(n, {
|
4387
|
+
fill: d.backgroundColor,
|
4388
|
+
stroke: d.borderColor,
|
4389
|
+
"stroke-width": d.borderWidth
|
4390
|
+
});
|
4391
|
+
this.background[b] || (this.background[b] = this.chart.renderer.path().add(this.group),
|
4392
|
+
a = "attr");
|
4393
|
+
this.background[b][a]({
|
4394
|
+
d: this.axis.getPlotBandPath(d.from, d.to, d)
|
4395
|
+
}).attr(n);
|
4396
|
+
};
|
4397
|
+
d.prototype.updateCenter = function(d) {
|
4398
|
+
this.center = (d || this.axis || {}).center = y.getCenter.call(this);
|
4399
|
+
};
|
4400
|
+
d.prototype.update = function(d, b) {
|
4401
|
+
v(!0, this.options, d);
|
4402
|
+
v(!0, this.chart.options.pane, d);
|
4403
|
+
this.setOptions(this.options);
|
4404
|
+
this.render();
|
4405
|
+
this.chart.axes.forEach(function(d) {
|
4406
|
+
d.pane === this && (d.pane = null, d.update({}, b));
|
4407
|
+
}, this);
|
4408
|
+
};
|
4409
|
+
return d;
|
4410
|
+
}();
|
4411
|
+
l.Chart.prototype.getHoverPane = function(d) {
|
4412
|
+
var b = this, a;
|
4413
|
+
d && b.pane.forEach(function(n) {
|
4414
|
+
var m = d.chartX - b.plotLeft, t = d.chartY - b.plotTop;
|
4415
|
+
c(b.inverted ? t : m, b.inverted ? m : t, n.center) && (a = n);
|
4416
|
+
});
|
4417
|
+
return a;
|
4418
|
+
};
|
4419
|
+
b(l.Chart, "afterIsInsidePlot", function(d) {
|
4420
|
+
this.polar && (d.isInsidePlot = this.pane.some(function(b) {
|
4421
|
+
return c(d.x, d.y, b.center);
|
4422
|
+
}));
|
4423
|
+
});
|
4424
|
+
b(l.Pointer, "beforeGetHoverData", function(d) {
|
4425
|
+
var b = this.chart;
|
4426
|
+
b.polar && (b.hoverPane = b.getHoverPane(d), d.filter = function(a) {
|
4427
|
+
return a.visible && !(!d.shared && a.directTouch) && w(a.options.enableMouseTracking, !0) && (!b.hoverPane || a.xAxis.pane === b.hoverPane);
|
4428
|
+
});
|
4429
|
+
});
|
4430
|
+
b(l.Pointer, "afterGetHoverData", function(d) {
|
4431
|
+
var b = this.chart;
|
4432
|
+
d.hoverPoint && d.hoverPoint.plotX && d.hoverPoint.plotY && b.hoverPane && !c(d.hoverPoint.plotX, d.hoverPoint.plotY, b.hoverPane.center) && (d.hoverPoint = void 0);
|
4433
|
+
});
|
4434
|
+
l.Pane = a;
|
4435
|
+
return l.Pane;
|
4436
|
+
});
|
4437
|
+
E(f, "parts-more/RadialAxis.js", [ f["parts/Globals.js"], f["parts/Tick.js"], f["parts/Utilities.js"] ], function(l, a, c) {
|
4438
|
+
var b = c.addEvent, u = c.correctFloat, v = c.defined, w = c.extend, f = c.merge, y = c.pick, d = c.pInt, m = c.relativeLength;
|
4439
|
+
c = c.wrap;
|
4440
|
+
var n = l.Axis, t = l.noop, x = n.prototype, A = a.prototype;
|
4441
|
+
var r = {
|
4442
|
+
getOffset: t,
|
4443
|
+
redraw: function() {
|
4444
|
+
this.isDirty = !1;
|
4445
|
+
},
|
4446
|
+
render: function() {
|
4447
|
+
this.isDirty = !1;
|
4448
|
+
},
|
4449
|
+
createLabelCollector: function() {
|
4450
|
+
return !1;
|
4451
|
+
},
|
4452
|
+
setScale: t,
|
4453
|
+
setCategories: t,
|
4454
|
+
setTitle: t
|
4455
|
+
};
|
4456
|
+
var p = {
|
4457
|
+
defaultRadialGaugeOptions: {
|
4458
|
+
labels: {
|
4459
|
+
align: "center",
|
4460
|
+
x: 0,
|
4461
|
+
y: null
|
4462
|
+
},
|
4463
|
+
minorGridLineWidth: 0,
|
4464
|
+
minorTickInterval: "auto",
|
4465
|
+
minorTickLength: 10,
|
4466
|
+
minorTickPosition: "inside",
|
4467
|
+
minorTickWidth: 1,
|
4468
|
+
tickLength: 10,
|
4469
|
+
tickPosition: "inside",
|
4470
|
+
tickWidth: 2,
|
4471
|
+
title: {
|
4472
|
+
rotation: 0
|
4473
|
+
},
|
4474
|
+
zIndex: 2
|
4475
|
+
},
|
4476
|
+
defaultCircularOptions: {
|
4477
|
+
gridLineWidth: 1,
|
4478
|
+
labels: {
|
4479
|
+
align: null,
|
4480
|
+
distance: 15,
|
4481
|
+
x: 0,
|
4482
|
+
y: null,
|
4483
|
+
style: {
|
4484
|
+
textOverflow: "none"
|
4485
|
+
}
|
4486
|
+
},
|
4487
|
+
maxPadding: 0,
|
4488
|
+
minPadding: 0,
|
4489
|
+
showLastLabel: !1,
|
4490
|
+
tickLength: 0
|
4491
|
+
},
|
4492
|
+
defaultRadialOptions: {
|
4493
|
+
gridLineInterpolation: "circle",
|
4494
|
+
gridLineWidth: 1,
|
4495
|
+
labels: {
|
4496
|
+
align: "right",
|
4497
|
+
x: -3,
|
4498
|
+
y: -2
|
4499
|
+
},
|
4500
|
+
showLastLabel: !1,
|
4501
|
+
title: {
|
4502
|
+
x: 4,
|
4503
|
+
text: null,
|
4504
|
+
rotation: 90
|
4505
|
+
}
|
4506
|
+
},
|
4507
|
+
setOptions: function(h) {
|
4508
|
+
h = this.options = f(this.defaultOptions, this.defaultPolarOptions, h);
|
4509
|
+
h.plotBands || (h.plotBands = []);
|
4510
|
+
l.fireEvent(this, "afterSetOptions");
|
4511
|
+
},
|
4512
|
+
getOffset: function() {
|
4513
|
+
x.getOffset.call(this);
|
4514
|
+
this.chart.axisOffset[this.side] = 0;
|
4515
|
+
},
|
4516
|
+
getLinePath: function(h, g, e) {
|
4517
|
+
h = this.pane.center;
|
4518
|
+
var k = this.chart, p = y(g, h[2] / 2 - this.offset);
|
4519
|
+
"undefined" === typeof e && (e = this.horiz ? 0 : this.center && -this.center[3] / 2);
|
4520
|
+
e && (p += e);
|
4521
|
+
this.isCircular || "undefined" !== typeof g ? (g = this.chart.renderer.symbols.arc(this.left + h[0], this.top + h[1], p, p, {
|
4522
|
+
start: this.startAngleRad,
|
4523
|
+
end: this.endAngleRad,
|
4524
|
+
open: !0,
|
4525
|
+
innerR: 0
|
4526
|
+
}), g.xBounds = [ this.left + h[0] ], g.yBounds = [ this.top + h[1] - p ]) : (g = this.postTranslate(this.angleRad, p),
|
4527
|
+
g = [ "M", this.center[0] + k.plotLeft, this.center[1] + k.plotTop, "L", g.x, g.y ]);
|
4528
|
+
return g;
|
4529
|
+
},
|
4530
|
+
setAxisTranslation: function() {
|
4531
|
+
x.setAxisTranslation.call(this);
|
4532
|
+
this.center && (this.transA = this.isCircular ? (this.endAngleRad - this.startAngleRad) / (this.max - this.min || 1) : (this.center[2] - this.center[3]) / 2 / (this.max - this.min || 1),
|
4533
|
+
this.minPixelPadding = this.isXAxis ? this.transA * this.minPointOffset : 0);
|
4534
|
+
},
|
4535
|
+
beforeSetTickPositions: function() {
|
4536
|
+
this.autoConnect = this.isCircular && "undefined" === typeof y(this.userMax, this.options.max) && u(this.endAngleRad - this.startAngleRad) === u(2 * Math.PI);
|
4537
|
+
!this.isCircular && this.chart.inverted && this.max++;
|
4538
|
+
this.autoConnect && (this.max += this.categories && 1 || this.pointRange || this.closestPointRange || 0);
|
4539
|
+
},
|
4540
|
+
setAxisSize: function() {
|
4541
|
+
x.setAxisSize.call(this);
|
4542
|
+
if (this.isRadial) {
|
4543
|
+
this.pane.updateCenter(this);
|
4544
|
+
var h = this.center = w([], this.pane.center);
|
4545
|
+
if (this.isCircular) this.sector = this.endAngleRad - this.startAngleRad; else {
|
4546
|
+
var g = this.postTranslate(this.angleRad, h[3] / 2);
|
4547
|
+
h[0] = g.x - this.chart.plotLeft;
|
4548
|
+
h[1] = g.y - this.chart.plotTop;
|
4549
|
+
}
|
4550
|
+
this.len = this.width = this.height = (h[2] - h[3]) * y(this.sector, 1) / 2;
|
4551
|
+
}
|
4552
|
+
},
|
4553
|
+
getPosition: function(h, g) {
|
4554
|
+
h = this.translate(h);
|
4555
|
+
return this.postTranslate(this.isCircular ? h : this.angleRad, y(this.isCircular ? g : 0 > h ? 0 : h, this.center[2] / 2) - this.offset);
|
4556
|
+
},
|
4557
|
+
postTranslate: function(h, g) {
|
4558
|
+
var e = this.chart, k = this.center;
|
4559
|
+
h = this.startAngleRad + h;
|
4560
|
+
return {
|
4561
|
+
x: e.plotLeft + k[0] + Math.cos(h) * g,
|
4562
|
+
y: e.plotTop + k[1] + Math.sin(h) * g
|
4563
|
+
};
|
4564
|
+
},
|
4565
|
+
getPlotBandPath: function(h, g, e) {
|
4566
|
+
var k = this.center, p = this.startAngleRad, C = k[2] / 2, q = [ y(e.outerRadius, "100%"), e.innerRadius, y(e.thickness, 10) ], r = Math.min(this.offset, 0), b = /%$/;
|
4567
|
+
var a = this.isCircular;
|
4568
|
+
if ("polygon" === this.options.gridLineInterpolation) q = this.getPlotLinePath({
|
4569
|
+
value: h
|
4570
|
+
}).concat(this.getPlotLinePath({
|
4571
|
+
value: g,
|
4572
|
+
reverse: !0
|
4573
|
+
})); else {
|
4574
|
+
h = Math.max(h, this.min);
|
4575
|
+
g = Math.min(g, this.max);
|
4576
|
+
a || (q[0] = this.translate(h), q[1] = this.translate(g));
|
4577
|
+
q = q.map(function(e) {
|
4578
|
+
b.test(e) && (e = d(e, 10) * C / 100);
|
4579
|
+
return e;
|
4580
|
+
});
|
4581
|
+
if ("circle" !== e.shape && a) h = p + this.translate(h), g = p + this.translate(g); else {
|
4582
|
+
h = -Math.PI / 2;
|
4583
|
+
g = 1.5 * Math.PI;
|
4584
|
+
var n = !0;
|
4585
|
+
}
|
4586
|
+
q[0] -= r;
|
4587
|
+
q[2] -= r;
|
4588
|
+
q = this.chart.renderer.symbols.arc(this.left + k[0], this.top + k[1], q[0], q[0], {
|
4589
|
+
start: Math.min(h, g),
|
4590
|
+
end: Math.max(h, g),
|
4591
|
+
innerR: y(q[1], q[0] - q[2]),
|
4592
|
+
open: n
|
4593
|
+
});
|
4594
|
+
a && (a = (g + h) / 2, r = this.left + k[0] + k[2] / 2 * Math.cos(a), q.xBounds = a > -Math.PI / 2 && a < Math.PI / 2 ? [ r, this.chart.plotWidth ] : [ 0, r ],
|
4595
|
+
q.yBounds = [ this.top + k[1] + k[2] / 2 * Math.sin(a) ], q.yBounds[0] += a > -Math.PI && 0 > a || a > Math.PI ? -10 : 10);
|
4596
|
+
}
|
4597
|
+
return q;
|
4598
|
+
},
|
4599
|
+
getCrosshairPosition: function(h, g, e) {
|
4600
|
+
var k = h.value, p = this.pane.center;
|
4601
|
+
if (this.isCircular) {
|
4602
|
+
if (v(k)) h.point && (d = h.point.shapeArgs || {}, d.start && (k = this.chart.inverted ? this.translate(h.point.rectPlotY, !0) : h.point.x)); else {
|
4603
|
+
var d = h.chartX || 0;
|
4604
|
+
var q = h.chartY || 0;
|
4605
|
+
k = this.translate(Math.atan2(q - e, d - g) - this.startAngleRad, !0);
|
4606
|
+
}
|
4607
|
+
h = this.getPosition(k);
|
4608
|
+
d = h.x;
|
4609
|
+
q = h.y;
|
4610
|
+
} else v(k) || (d = h.chartX, q = h.chartY), v(d) && v(q) && (e = p[1] + this.chart.plotTop,
|
4611
|
+
k = this.translate(Math.min(Math.sqrt(Math.pow(d - g, 2) + Math.pow(q - e, 2)), p[2] / 2) - p[3] / 2, !0));
|
4612
|
+
return [ k, d || 0, q || 0 ];
|
4613
|
+
},
|
4614
|
+
getPlotLinePath: function(h) {
|
4615
|
+
var g = this, e = g.pane.center, k = g.chart, p = k.inverted, d = h.value, q = h.reverse, r = g.getPosition(d), b = g.pane.options.background ? g.pane.options.background[0] || g.pane.options.background : {}, a = b.innerRadius || "0%", n = b.outerRadius || "100%";
|
4616
|
+
b = e[0] + k.plotLeft;
|
4617
|
+
var c = e[1] + k.plotTop, t = r.x, x = r.y, u = g.height;
|
4618
|
+
r = e[3] / 2;
|
4619
|
+
var v, l;
|
4620
|
+
h.isCrosshair && (x = this.getCrosshairPosition(h, b, c), d = x[0], t = x[1], x = x[2]);
|
4621
|
+
if (g.isCircular) {
|
4622
|
+
q = Math.sqrt(Math.pow(t - b, 2) + Math.pow(x - c, 2));
|
4623
|
+
a = "string" === typeof a ? m(a, 1) : a / q;
|
4624
|
+
n = "string" === typeof n ? m(n, 1) : n / q;
|
4625
|
+
e && r && (e = r / q, a < e && (a = e), n < e && (n = e));
|
4626
|
+
var w = [ "M", b + a * (t - b), c - a * (c - x), "L", t - (1 - n) * (t - b), x + (1 - n) * (c - x) ];
|
4627
|
+
} else (d = g.translate(d)) && (0 > d || d > u) && (d = 0), "circle" === g.options.gridLineInterpolation ? w = g.getLinePath(0, d, r) : (k[p ? "yAxis" : "xAxis"].forEach(function(e) {
|
4628
|
+
e.pane === g.pane && (v = e);
|
4629
|
+
}), w = [], e = v.tickPositions, v.autoConnect && (e = e.concat([ e[0] ])), q && (e = [].concat(e).reverse()),
|
4630
|
+
d && (d += r), e.forEach(function(e, k) {
|
4631
|
+
l = v.getPosition(e, d);
|
4632
|
+
w.push(k ? "L" : "M", l.x, l.y);
|
4633
|
+
}));
|
4634
|
+
return w;
|
4635
|
+
},
|
4636
|
+
getTitlePosition: function() {
|
4637
|
+
var h = this.center, g = this.chart, e = this.options.title;
|
4638
|
+
return {
|
4639
|
+
x: g.plotLeft + h[0] + (e.x || 0),
|
4640
|
+
y: g.plotTop + h[1] - {
|
4641
|
+
high: .5,
|
4642
|
+
middle: .25,
|
4643
|
+
low: 0
|
4644
|
+
}[e.align] * h[2] + (e.y || 0)
|
4645
|
+
};
|
4646
|
+
},
|
4647
|
+
createLabelCollector: function() {
|
4648
|
+
var h = this;
|
4649
|
+
return function() {
|
4650
|
+
if (h.isRadial && h.tickPositions && !0 !== h.options.labels.allowOverlap) return h.tickPositions.map(function(g) {
|
4651
|
+
return h.ticks[g] && h.ticks[g].label;
|
4652
|
+
}).filter(function(g) {
|
4653
|
+
return !!g;
|
4654
|
+
});
|
4655
|
+
};
|
4656
|
+
}
|
4657
|
+
};
|
4658
|
+
b(n, "init", function(h) {
|
4659
|
+
var g = this.chart, e = g.inverted, k = g.angular, d = g.polar, b = this.isXAxis, q = this.coll, a = k && b, n, c = g.options;
|
4660
|
+
h = h.userOptions.pane || 0;
|
4661
|
+
h = this.pane = g.pane && g.pane[h];
|
4662
|
+
if ("colorAxis" === q) this.isRadial = !1; else {
|
4663
|
+
if (k) {
|
4664
|
+
if (w(this, a ? r : p), n = !b) this.defaultPolarOptions = this.defaultRadialGaugeOptions;
|
4665
|
+
} else d && (w(this, p), this.defaultPolarOptions = (n = this.horiz) ? this.defaultCircularOptions : f("xAxis" === q ? this.defaultOptions : this.defaultYAxisOptions, this.defaultRadialOptions),
|
4666
|
+
e && "yAxis" === q && (this.defaultPolarOptions.stackLabels = this.defaultYAxisOptions.stackLabels));
|
4667
|
+
k || d ? (this.isRadial = !0, c.chart.zoomType = null, this.labelCollector || (this.labelCollector = this.createLabelCollector()),
|
4668
|
+
this.labelCollector && g.labelCollectors.push(this.labelCollector)) : this.isRadial = !1;
|
4669
|
+
h && n && (h.axis = this);
|
4670
|
+
this.isCircular = n;
|
4671
|
+
}
|
4672
|
+
});
|
4673
|
+
b(n, "afterInit", function() {
|
4674
|
+
var h = this.chart, g = this.options, e = this.pane, k = e && e.options;
|
4675
|
+
h.angular && this.isXAxis || !e || !h.angular && !h.polar || (this.angleRad = (g.angle || 0) * Math.PI / 180,
|
4676
|
+
this.startAngleRad = (k.startAngle - 90) * Math.PI / 180, this.endAngleRad = (y(k.endAngle, k.startAngle + 360) - 90) * Math.PI / 180,
|
4677
|
+
this.offset = g.offset || 0);
|
4678
|
+
});
|
4679
|
+
b(n, "autoLabelAlign", function(h) {
|
4680
|
+
this.isRadial && (h.align = void 0, h.preventDefault());
|
4681
|
+
});
|
4682
|
+
b(n, "destroy", function() {
|
4683
|
+
if (this.chart && this.chart.labelCollectors) {
|
4684
|
+
var h = this.chart.labelCollectors.indexOf(this.labelCollector);
|
4685
|
+
0 <= h && this.chart.labelCollectors.splice(h, 1);
|
4686
|
+
}
|
4687
|
+
});
|
4688
|
+
b(a, "afterGetPosition", function(h) {
|
4689
|
+
this.axis.getPosition && w(h.pos, this.axis.getPosition(this.pos));
|
4690
|
+
});
|
4691
|
+
b(a, "afterGetLabelPosition", function(h) {
|
4692
|
+
var g = this.axis, e = this.label, k = e.getBBox(), d = g.options.labels, p = d.y, q = 20, r = d.align, b = (g.translate(this.pos) + g.startAngleRad + Math.PI / 2) / Math.PI * 180 % 360, a = Math.round(b), n = "end", c = 0 > a ? a + 360 : a, x = c, t = 0, u = 0, v = null === d.y ? .3 * -k.height : 0;
|
4693
|
+
if (g.isRadial) {
|
4694
|
+
var l = g.getPosition(this.pos, g.center[2] / 2 + m(y(d.distance, -25), g.center[2] / 2, -g.center[2] / 2));
|
4695
|
+
"auto" === d.rotation ? e.attr({
|
4696
|
+
rotation: b
|
4697
|
+
}) : null === p && (p = g.chart.renderer.fontMetrics(e.styles && e.styles.fontSize).b - k.height / 2);
|
4698
|
+
null === r && (g.isCircular ? (k.width > g.len * g.tickInterval / (g.max - g.min) && (q = 0),
|
4699
|
+
r = b > q && b < 180 - q ? "left" : b > 180 + q && b < 360 - q ? "right" : "center") : r = "center",
|
4700
|
+
e.attr({
|
4701
|
+
align: r
|
4702
|
+
}));
|
4703
|
+
if ("auto" === r && 2 === g.tickPositions.length && g.isCircular) {
|
4704
|
+
90 < c && 180 > c ? c = 180 - c : 270 < c && 360 >= c && (c = 540 - c);
|
4705
|
+
180 < x && 360 >= x && (x = 360 - x);
|
4706
|
+
if (g.pane.options.startAngle === a || g.pane.options.startAngle === a + 360 || g.pane.options.startAngle === a - 360) n = "start";
|
4707
|
+
r = -90 <= a && 90 >= a || -360 <= a && -270 >= a || 270 <= a && 360 >= a ? "start" === n ? "right" : "left" : "start" === n ? "left" : "right";
|
4708
|
+
70 < x && 110 > x && (r = "center");
|
4709
|
+
15 > c || 180 <= c && 195 > c ? t = .3 * k.height : 15 <= c && 35 >= c ? t = "start" === n ? 0 : .75 * k.height : 195 <= c && 215 >= c ? t = "start" === n ? .75 * k.height : 0 : 35 < c && 90 >= c ? t = "start" === n ? .25 * -k.height : k.height : 215 < c && 270 >= c && (t = "start" === n ? k.height : .25 * -k.height);
|
4710
|
+
15 > x ? u = "start" === n ? .15 * -k.height : .15 * k.height : 165 < x && 180 >= x && (u = "start" === n ? .15 * k.height : .15 * -k.height);
|
4711
|
+
e.attr({
|
4712
|
+
align: r
|
4713
|
+
});
|
4714
|
+
e.translate(u, t + v);
|
4715
|
+
}
|
4716
|
+
h.pos.x = l.x + d.x;
|
4717
|
+
h.pos.y = l.y + p;
|
4718
|
+
}
|
4719
|
+
});
|
4720
|
+
c(A, "getMarkPath", function(h, g, e, k, d, p, q) {
|
4721
|
+
var r = this.axis;
|
4722
|
+
r.isRadial ? (h = r.getPosition(this.pos, r.center[2] / 2 + k), g = [ "M", g, e, "L", h.x, h.y ]) : g = h.call(this, g, e, k, d, p, q);
|
4723
|
+
return g;
|
4724
|
+
});
|
4725
|
+
});
|
4726
|
+
E(f, "parts-more/AreaRangeSeries.js", [ f["parts/Globals.js"], f["parts/Point.js"], f["parts/Utilities.js"] ], function(l, a, c) {
|
4727
|
+
var b = c.defined, u = c.extend, v = c.isArray, w = c.isNumber, f = c.pick;
|
4728
|
+
c = c.seriesType;
|
4729
|
+
var y = l.seriesTypes, d = l.Series.prototype, m = a.prototype;
|
4730
|
+
c("arearange", "area", {
|
4731
|
+
lineWidth: 1,
|
4732
|
+
threshold: null,
|
4733
|
+
tooltip: {
|
4734
|
+
pointFormat: '<span style="color:{series.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'
|
4735
|
+
},
|
4736
|
+
trackByArea: !0,
|
4737
|
+
dataLabels: {
|
4738
|
+
align: null,
|
4739
|
+
verticalAlign: null,
|
4740
|
+
xLow: 0,
|
4741
|
+
xHigh: 0,
|
4742
|
+
yLow: 0,
|
4743
|
+
yHigh: 0
|
4744
|
+
}
|
4745
|
+
}, {
|
4746
|
+
pointArrayMap: [ "low", "high" ],
|
4747
|
+
pointValKey: "low",
|
4748
|
+
deferTranslatePolar: !0,
|
4749
|
+
toYData: function(d) {
|
4750
|
+
return [ d.low, d.high ];
|
4751
|
+
},
|
4752
|
+
highToXY: function(d) {
|
4753
|
+
var b = this.chart, a = this.xAxis.postTranslate(d.rectPlotX, this.yAxis.len - d.plotHigh);
|
4754
|
+
d.plotHighX = a.x - b.plotLeft;
|
4755
|
+
d.plotHigh = a.y - b.plotTop;
|
4756
|
+
d.plotLowX = d.plotX;
|
4757
|
+
},
|
4758
|
+
translate: function() {
|
4759
|
+
var d = this, b = d.yAxis, a = !!d.modifyValue;
|
4760
|
+
y.area.prototype.translate.apply(d);
|
4761
|
+
d.points.forEach(function(c) {
|
4762
|
+
var r = c.high, p = c.plotY;
|
4763
|
+
c.isNull ? c.plotY = null : (c.plotLow = p, c.plotHigh = b.translate(a ? d.modifyValue(r, c) : r, 0, 1, 0, 1),
|
4764
|
+
a && (c.yBottom = c.plotHigh));
|
4765
|
+
});
|
4766
|
+
this.chart.polar && this.points.forEach(function(b) {
|
4767
|
+
d.highToXY(b);
|
4768
|
+
b.tooltipPos = [ (b.plotHighX + b.plotLowX) / 2, (b.plotHigh + b.plotLow) / 2 ];
|
4769
|
+
});
|
4770
|
+
},
|
4771
|
+
getGraphPath: function(d) {
|
4772
|
+
var b = [], a = [], c, r = y.area.prototype.getGraphPath;
|
4773
|
+
var p = this.options;
|
4774
|
+
var h = this.chart.polar && !1 !== p.connectEnds, g = p.connectNulls, e = p.step;
|
4775
|
+
d = d || this.points;
|
4776
|
+
for (c = d.length; c--; ) {
|
4777
|
+
var k = d[c];
|
4778
|
+
k.isNull || h || g || d[c + 1] && !d[c + 1].isNull || a.push({
|
4779
|
+
plotX: k.plotX,
|
4780
|
+
plotY: k.plotY,
|
4781
|
+
doCurve: !1
|
4782
|
+
});
|
4783
|
+
var B = {
|
4784
|
+
polarPlotY: k.polarPlotY,
|
4785
|
+
rectPlotX: k.rectPlotX,
|
4786
|
+
yBottom: k.yBottom,
|
4787
|
+
plotX: f(k.plotHighX, k.plotX),
|
4788
|
+
plotY: k.plotHigh,
|
4789
|
+
isNull: k.isNull
|
4790
|
+
};
|
4791
|
+
a.push(B);
|
4792
|
+
b.push(B);
|
4793
|
+
k.isNull || h || g || d[c - 1] && !d[c - 1].isNull || a.push({
|
4794
|
+
plotX: k.plotX,
|
4795
|
+
plotY: k.plotY,
|
4796
|
+
doCurve: !1
|
4797
|
+
});
|
4798
|
+
}
|
4799
|
+
d = r.call(this, d);
|
4800
|
+
e && (!0 === e && (e = "left"), p.step = {
|
4801
|
+
left: "right",
|
4802
|
+
center: "center",
|
4803
|
+
right: "left"
|
4804
|
+
}[e]);
|
4805
|
+
b = r.call(this, b);
|
4806
|
+
a = r.call(this, a);
|
4807
|
+
p.step = e;
|
4808
|
+
p = [].concat(d, b);
|
4809
|
+
this.chart.polar || "M" !== a[0] || (a[0] = "L");
|
4810
|
+
this.graphPath = p;
|
4811
|
+
this.areaPath = d.concat(a);
|
4812
|
+
p.isArea = !0;
|
4813
|
+
p.xMap = d.xMap;
|
4814
|
+
this.areaPath.xMap = d.xMap;
|
4815
|
+
return p;
|
4816
|
+
},
|
4817
|
+
drawDataLabels: function() {
|
4818
|
+
var b = this.points, a = b.length, c, m = [], r = this.options.dataLabels, p, h = this.chart.inverted;
|
4819
|
+
if (v(r)) {
|
4820
|
+
if (1 < r.length) {
|
4821
|
+
var g = r[0];
|
4822
|
+
var e = r[1];
|
4823
|
+
} else g = r[0], e = {
|
4824
|
+
enabled: !1
|
4825
|
+
};
|
4826
|
+
} else g = u({}, r), g.x = r.xHigh, g.y = r.yHigh, e = u({}, r), e.x = r.xLow, e.y = r.yLow;
|
4827
|
+
if (g.enabled || this._hasPointLabels) {
|
4828
|
+
for (c = a; c--; ) if (p = b[c]) {
|
4829
|
+
var k = g.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow;
|
4830
|
+
p.y = p.high;
|
4831
|
+
p._plotY = p.plotY;
|
4832
|
+
p.plotY = p.plotHigh;
|
4833
|
+
m[c] = p.dataLabel;
|
4834
|
+
p.dataLabel = p.dataLabelUpper;
|
4835
|
+
p.below = k;
|
4836
|
+
h ? g.align || (g.align = k ? "right" : "left") : g.verticalAlign || (g.verticalAlign = k ? "top" : "bottom");
|
4837
|
+
}
|
4838
|
+
this.options.dataLabels = g;
|
4839
|
+
d.drawDataLabels && d.drawDataLabels.apply(this, arguments);
|
4840
|
+
for (c = a; c--; ) if (p = b[c]) p.dataLabelUpper = p.dataLabel, p.dataLabel = m[c],
|
4841
|
+
delete p.dataLabels, p.y = p.low, p.plotY = p._plotY;
|
4842
|
+
}
|
4843
|
+
if (e.enabled || this._hasPointLabels) {
|
4844
|
+
for (c = a; c--; ) if (p = b[c]) k = e.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow,
|
4845
|
+
p.below = !k, h ? e.align || (e.align = k ? "left" : "right") : e.verticalAlign || (e.verticalAlign = k ? "bottom" : "top");
|
4846
|
+
this.options.dataLabels = e;
|
4847
|
+
d.drawDataLabels && d.drawDataLabels.apply(this, arguments);
|
4848
|
+
}
|
4849
|
+
if (g.enabled) for (c = a; c--; ) if (p = b[c]) p.dataLabels = [ p.dataLabelUpper, p.dataLabel ].filter(function(e) {
|
4850
|
+
return !!e;
|
4851
|
+
});
|
4852
|
+
this.options.dataLabels = r;
|
4853
|
+
},
|
4854
|
+
alignDataLabel: function() {
|
4855
|
+
y.column.prototype.alignDataLabel.apply(this, arguments);
|
4856
|
+
},
|
4857
|
+
drawPoints: function() {
|
4858
|
+
var a = this.points.length, c;
|
4859
|
+
d.drawPoints.apply(this, arguments);
|
4860
|
+
for (c = 0; c < a; ) {
|
4861
|
+
var m = this.points[c];
|
4862
|
+
m.origProps = {
|
4863
|
+
plotY: m.plotY,
|
4864
|
+
plotX: m.plotX,
|
4865
|
+
isInside: m.isInside,
|
4866
|
+
negative: m.negative,
|
4867
|
+
zone: m.zone,
|
4868
|
+
y: m.y
|
4869
|
+
};
|
4870
|
+
m.lowerGraphic = m.graphic;
|
4871
|
+
m.graphic = m.upperGraphic;
|
4872
|
+
m.plotY = m.plotHigh;
|
4873
|
+
b(m.plotHighX) && (m.plotX = m.plotHighX);
|
4874
|
+
m.y = m.high;
|
4875
|
+
m.negative = m.high < (this.options.threshold || 0);
|
4876
|
+
m.zone = this.zones.length && m.getZone();
|
4877
|
+
this.chart.polar || (m.isInside = m.isTopInside = "undefined" !== typeof m.plotY && 0 <= m.plotY && m.plotY <= this.yAxis.len && 0 <= m.plotX && m.plotX <= this.xAxis.len);
|
4878
|
+
c++;
|
4879
|
+
}
|
4880
|
+
d.drawPoints.apply(this, arguments);
|
4881
|
+
for (c = 0; c < a; ) m = this.points[c], m.upperGraphic = m.graphic, m.graphic = m.lowerGraphic,
|
4882
|
+
u(m, m.origProps), delete m.origProps, c++;
|
4883
|
+
},
|
4884
|
+
setStackedPoints: l.noop
|
4885
|
+
}, {
|
4886
|
+
setState: function() {
|
4887
|
+
var d = this.state, a = this.series, c = a.chart.polar;
|
4888
|
+
b(this.plotHigh) || (this.plotHigh = a.yAxis.toPixels(this.high, !0));
|
4889
|
+
b(this.plotLow) || (this.plotLow = this.plotY = a.yAxis.toPixels(this.low, !0));
|
4890
|
+
a.stateMarkerGraphic && (a.lowerStateMarkerGraphic = a.stateMarkerGraphic, a.stateMarkerGraphic = a.upperStateMarkerGraphic);
|
4891
|
+
this.graphic = this.upperGraphic;
|
4892
|
+
this.plotY = this.plotHigh;
|
4893
|
+
c && (this.plotX = this.plotHighX);
|
4894
|
+
m.setState.apply(this, arguments);
|
4895
|
+
this.state = d;
|
4896
|
+
this.plotY = this.plotLow;
|
4897
|
+
this.graphic = this.lowerGraphic;
|
4898
|
+
c && (this.plotX = this.plotLowX);
|
4899
|
+
a.stateMarkerGraphic && (a.upperStateMarkerGraphic = a.stateMarkerGraphic, a.stateMarkerGraphic = a.lowerStateMarkerGraphic,
|
4900
|
+
a.lowerStateMarkerGraphic = void 0);
|
4901
|
+
m.setState.apply(this, arguments);
|
4902
|
+
},
|
4903
|
+
haloPath: function() {
|
4904
|
+
var d = this.series.chart.polar, a = [];
|
4905
|
+
this.plotY = this.plotLow;
|
4906
|
+
d && (this.plotX = this.plotLowX);
|
4907
|
+
this.isInside && (a = m.haloPath.apply(this, arguments));
|
4908
|
+
this.plotY = this.plotHigh;
|
4909
|
+
d && (this.plotX = this.plotHighX);
|
4910
|
+
this.isTopInside && (a = a.concat(m.haloPath.apply(this, arguments)));
|
4911
|
+
return a;
|
4912
|
+
},
|
4913
|
+
destroyElements: function() {
|
4914
|
+
[ "lowerGraphic", "upperGraphic" ].forEach(function(d) {
|
4915
|
+
this[d] && (this[d] = this[d].destroy());
|
4916
|
+
}, this);
|
4917
|
+
this.graphic = null;
|
4918
|
+
return m.destroyElements.apply(this, arguments);
|
4919
|
+
},
|
4920
|
+
isValid: function() {
|
4921
|
+
return w(this.low) && w(this.high);
|
4922
|
+
}
|
4923
|
+
});
|
4924
|
+
});
|
4925
|
+
E(f, "parts-more/AreaSplineRangeSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
|
4926
|
+
a = a.seriesType;
|
4927
|
+
a("areasplinerange", "arearange", null, {
|
4928
|
+
getPointSpline: l.seriesTypes.spline.prototype.getPointSpline
|
4929
|
+
});
|
4930
|
+
});
|
4931
|
+
E(f, "parts-more/ColumnRangeSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
|
4932
|
+
var c = a.clamp, b = a.merge, u = a.pick;
|
4933
|
+
a = a.seriesType;
|
4934
|
+
var v = l.defaultPlotOptions, w = l.noop, f = l.seriesTypes.column.prototype;
|
4935
|
+
a("columnrange", "arearange", b(v.column, v.arearange, {
|
4936
|
+
pointRange: null,
|
4937
|
+
marker: null,
|
4938
|
+
states: {
|
4939
|
+
hover: {
|
4940
|
+
halo: !1
|
4941
|
+
}
|
4942
|
+
}
|
4943
|
+
}), {
|
4944
|
+
translate: function() {
|
4945
|
+
var a = this, d = a.yAxis, b = a.xAxis, n = b.startAngleRad, v, l = a.chart, w = a.xAxis.isRadial, r = Math.max(l.chartWidth, l.chartHeight) + 999, p;
|
4946
|
+
f.translate.apply(a);
|
4947
|
+
a.points.forEach(function(h) {
|
4948
|
+
var g = h.shapeArgs, e = a.options.minPointLength;
|
4949
|
+
h.plotHigh = p = c(d.translate(h.high, 0, 1, 0, 1), -r, r);
|
4950
|
+
h.plotLow = c(h.plotY, -r, r);
|
4951
|
+
var k = p;
|
4952
|
+
var B = u(h.rectPlotY, h.plotY) - p;
|
4953
|
+
Math.abs(B) < e ? (e -= B, B += e, k -= e / 2) : 0 > B && (B *= -1, k -= B);
|
4954
|
+
w ? (v = h.barX + n, h.shapeType = "arc", h.shapeArgs = a.polarArc(k + B, k, v, v + h.pointWidth)) : (g.height = B,
|
4955
|
+
g.y = k, h.tooltipPos = l.inverted ? [ d.len + d.pos - l.plotLeft - k - B / 2, b.len + b.pos - l.plotTop - g.x - g.width / 2, B ] : [ b.left - l.plotLeft + g.x + g.width / 2, d.pos - l.plotTop + k + B / 2, B ]);
|
4956
|
+
});
|
4957
|
+
},
|
4958
|
+
directTouch: !0,
|
4959
|
+
trackerGroups: [ "group", "dataLabelsGroup" ],
|
4960
|
+
drawGraph: w,
|
4961
|
+
getSymbol: w,
|
4962
|
+
crispCol: function() {
|
4963
|
+
return f.crispCol.apply(this, arguments);
|
4964
|
+
},
|
4965
|
+
drawPoints: function() {
|
4966
|
+
return f.drawPoints.apply(this, arguments);
|
4967
|
+
},
|
4968
|
+
drawTracker: function() {
|
4969
|
+
return f.drawTracker.apply(this, arguments);
|
4970
|
+
},
|
4971
|
+
getColumnMetrics: function() {
|
4972
|
+
return f.getColumnMetrics.apply(this, arguments);
|
4973
|
+
},
|
4974
|
+
pointAttribs: function() {
|
4975
|
+
return f.pointAttribs.apply(this, arguments);
|
4976
|
+
},
|
4977
|
+
animate: function() {
|
4978
|
+
return f.animate.apply(this, arguments);
|
4979
|
+
},
|
4980
|
+
polarArc: function() {
|
4981
|
+
return f.polarArc.apply(this, arguments);
|
4982
|
+
},
|
4983
|
+
translate3dPoints: function() {
|
4984
|
+
return f.translate3dPoints.apply(this, arguments);
|
4985
|
+
},
|
4986
|
+
translate3dShapes: function() {
|
4987
|
+
return f.translate3dShapes.apply(this, arguments);
|
4988
|
+
}
|
4989
|
+
}, {
|
4990
|
+
setState: f.pointClass.prototype.setState
|
4991
|
+
});
|
4992
|
+
});
|
4993
|
+
E(f, "parts-more/ColumnPyramidSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
|
4994
|
+
var c = a.clamp, b = a.pick;
|
4995
|
+
a = a.seriesType;
|
4996
|
+
var u = l.seriesTypes.column.prototype;
|
4997
|
+
a("columnpyramid", "column", {}, {
|
4998
|
+
translate: function() {
|
4999
|
+
var a = this, l = a.chart, f = a.options, y = a.dense = 2 > a.closestPointRange * a.xAxis.transA;
|
5000
|
+
y = a.borderWidth = b(f.borderWidth, y ? 0 : 1);
|
5001
|
+
var d = a.yAxis, m = f.threshold, n = a.translatedThreshold = d.getThreshold(m), t = b(f.minPointLength, 5), x = a.getColumnMetrics(), A = x.width, r = a.barW = Math.max(A, 1 + 2 * y), p = a.pointXOffset = x.offset;
|
5002
|
+
l.inverted && (n -= .5);
|
5003
|
+
f.pointPadding && (r = Math.ceil(r));
|
5004
|
+
u.translate.apply(a);
|
5005
|
+
a.points.forEach(function(h) {
|
5006
|
+
var g = b(h.yBottom, n), e = 999 + Math.abs(g), k = c(h.plotY, -e, d.len + e);
|
5007
|
+
e = h.plotX + p;
|
5008
|
+
var B = r / 2, C = Math.min(k, g);
|
5009
|
+
g = Math.max(k, g) - C;
|
5010
|
+
var q;
|
5011
|
+
h.barX = e;
|
5012
|
+
h.pointWidth = A;
|
5013
|
+
h.tooltipPos = l.inverted ? [ d.len + d.pos - l.plotLeft - k, a.xAxis.len - e - B, g ] : [ e + B, k + d.pos - l.plotTop, g ];
|
5014
|
+
k = m + (h.total || h.y);
|
5015
|
+
"percent" === f.stacking && (k = m + (0 > h.y) ? -100 : 100);
|
5016
|
+
k = d.toPixels(k, !0);
|
5017
|
+
var F = (q = l.plotHeight - k - (l.plotHeight - n)) ? B * (C - k) / q : 0;
|
5018
|
+
var G = q ? B * (C + g - k) / q : 0;
|
5019
|
+
q = e - F + B;
|
5020
|
+
F = e + F + B;
|
5021
|
+
var u = e + G + B;
|
5022
|
+
G = e - G + B;
|
5023
|
+
var v = C - t;
|
5024
|
+
var w = C + g;
|
5025
|
+
0 > h.y && (v = C, w = C + g + t);
|
5026
|
+
l.inverted && (u = l.plotWidth - C, q = k - (l.plotWidth - n), F = B * (k - u) / q,
|
5027
|
+
G = B * (k - (u - g)) / q, q = e + B + F, F = q - 2 * F, u = e - G + B, G = e + G + B,
|
5028
|
+
v = C, w = C + g - t, 0 > h.y && (w = C + g + t));
|
5029
|
+
h.shapeType = "path";
|
5030
|
+
h.shapeArgs = {
|
5031
|
+
x: q,
|
5032
|
+
y: v,
|
5033
|
+
width: F - q,
|
5034
|
+
height: g,
|
5035
|
+
d: [ "M", q, v, "L", F, v, u, w, G, w, "Z" ]
|
5036
|
+
};
|
5037
|
+
});
|
5038
|
+
}
|
5039
|
+
});
|
5040
|
+
});
|
5041
|
+
E(f, "parts-more/GaugeSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
|
5042
|
+
var c = a.clamp, b = a.isNumber, u = a.merge, v = a.pick, f = a.pInt;
|
5043
|
+
a = a.seriesType;
|
5044
|
+
var z = l.Series, y = l.TrackerMixin;
|
5045
|
+
a("gauge", "line", {
|
5046
|
+
dataLabels: {
|
5047
|
+
borderColor: "#cccccc",
|
5048
|
+
borderRadius: 3,
|
5049
|
+
borderWidth: 1,
|
5050
|
+
crop: !1,
|
5051
|
+
defer: !1,
|
5052
|
+
enabled: !0,
|
5053
|
+
verticalAlign: "top",
|
5054
|
+
y: 15,
|
5055
|
+
zIndex: 2
|
5056
|
+
},
|
5057
|
+
dial: {},
|
5058
|
+
pivot: {},
|
5059
|
+
tooltip: {
|
5060
|
+
headerFormat: ""
|
5061
|
+
},
|
5062
|
+
showInLegend: !1
|
5063
|
+
}, {
|
5064
|
+
angular: !0,
|
5065
|
+
directTouch: !0,
|
5066
|
+
drawGraph: l.noop,
|
5067
|
+
fixedBox: !0,
|
5068
|
+
forceDL: !0,
|
5069
|
+
noSharedTooltip: !0,
|
5070
|
+
trackerGroups: [ "group", "dataLabelsGroup" ],
|
5071
|
+
translate: function() {
|
5072
|
+
var d = this.yAxis, a = this.options, n = d.center;
|
5073
|
+
this.generatePoints();
|
5074
|
+
this.points.forEach(function(m) {
|
5075
|
+
var l = u(a.dial, m.dial), t = f(v(l.radius, "80%")) * n[2] / 200, r = f(v(l.baseLength, "70%")) * t / 100, p = f(v(l.rearLength, "10%")) * t / 100, h = l.baseWidth || 3, g = l.topWidth || 1, e = a.overshoot, k = d.startAngleRad + d.translate(m.y, null, null, null, !0);
|
5076
|
+
if (b(e) || !1 === a.wrap) e = b(e) ? e / 180 * Math.PI : 0, k = c(k, d.startAngleRad - e, d.endAngleRad + e);
|
5077
|
+
k = 180 * k / Math.PI;
|
5078
|
+
m.shapeType = "path";
|
5079
|
+
m.shapeArgs = {
|
5080
|
+
d: l.path || [ "M", -p, -h / 2, "L", r, -h / 2, t, -g / 2, t, g / 2, r, h / 2, -p, h / 2, "z" ],
|
5081
|
+
translateX: n[0],
|
5082
|
+
translateY: n[1],
|
5083
|
+
rotation: k
|
5084
|
+
};
|
5085
|
+
m.plotX = n[0];
|
5086
|
+
m.plotY = n[1];
|
5087
|
+
});
|
5088
|
+
},
|
5089
|
+
drawPoints: function() {
|
5090
|
+
var d = this, a = d.chart, b = d.yAxis.center, c = d.pivot, l = d.options, f = l.pivot, r = a.renderer;
|
5091
|
+
d.points.forEach(function(b) {
|
5092
|
+
var h = b.graphic, g = b.shapeArgs, e = g.d, k = u(l.dial, b.dial);
|
5093
|
+
h ? (h.animate(g), g.d = e) : b.graphic = r[b.shapeType](g).attr({
|
5094
|
+
rotation: g.rotation,
|
5095
|
+
zIndex: 1
|
5096
|
+
}).addClass("highcharts-dial").add(d.group);
|
5097
|
+
if (!a.styledMode) b.graphic[h ? "animate" : "attr"]({
|
5098
|
+
stroke: k.borderColor || "none",
|
5099
|
+
"stroke-width": k.borderWidth || 0,
|
5100
|
+
fill: k.backgroundColor || "#000000"
|
5101
|
+
});
|
5102
|
+
});
|
5103
|
+
c ? c.animate({
|
5104
|
+
translateX: b[0],
|
5105
|
+
translateY: b[1]
|
5106
|
+
}) : (d.pivot = r.circle(0, 0, v(f.radius, 5)).attr({
|
5107
|
+
zIndex: 2
|
5108
|
+
}).addClass("highcharts-pivot").translate(b[0], b[1]).add(d.group), a.styledMode || d.pivot.attr({
|
5109
|
+
"stroke-width": f.borderWidth || 0,
|
5110
|
+
stroke: f.borderColor || "#cccccc",
|
5111
|
+
fill: f.backgroundColor || "#000000"
|
5112
|
+
}));
|
5113
|
+
},
|
5114
|
+
animate: function(d) {
|
5115
|
+
var a = this;
|
5116
|
+
d || a.points.forEach(function(d) {
|
5117
|
+
var b = d.graphic;
|
5118
|
+
b && (b.attr({
|
5119
|
+
rotation: 180 * a.yAxis.startAngleRad / Math.PI
|
5120
|
+
}), b.animate({
|
5121
|
+
rotation: d.shapeArgs.rotation
|
5122
|
+
}, a.options.animation));
|
5123
|
+
});
|
5124
|
+
},
|
5125
|
+
render: function() {
|
5126
|
+
this.group = this.plotGroup("group", "series", this.visible ? "visible" : "hidden", this.options.zIndex, this.chart.seriesGroup);
|
5127
|
+
z.prototype.render.call(this);
|
5128
|
+
this.group.clip(this.chart.clipRect);
|
5129
|
+
},
|
5130
|
+
setData: function(d, a) {
|
5131
|
+
z.prototype.setData.call(this, d, !1);
|
5132
|
+
this.processData();
|
5133
|
+
this.generatePoints();
|
5134
|
+
v(a, !0) && this.chart.redraw();
|
5135
|
+
},
|
5136
|
+
hasData: function() {
|
5137
|
+
return !!this.points.length;
|
5138
|
+
},
|
5139
|
+
drawTracker: y && y.drawTrackerPoint
|
5140
|
+
}, {
|
5141
|
+
setState: function(d) {
|
5142
|
+
this.state = d;
|
5143
|
+
}
|
5144
|
+
});
|
5145
|
+
});
|
5146
|
+
E(f, "parts-more/BoxPlotSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
|
5147
|
+
var c = a.pick;
|
5148
|
+
a = a.seriesType;
|
5149
|
+
var b = l.noop, u = l.seriesTypes;
|
5150
|
+
a("boxplot", "column", {
|
5151
|
+
threshold: null,
|
5152
|
+
tooltip: {
|
5153
|
+
pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'
|
5154
|
+
},
|
5155
|
+
whiskerLength: "50%",
|
5156
|
+
fillColor: "#ffffff",
|
5157
|
+
lineWidth: 1,
|
5158
|
+
medianWidth: 2,
|
5159
|
+
whiskerWidth: 2
|
5160
|
+
}, {
|
5161
|
+
pointArrayMap: [ "low", "q1", "median", "q3", "high" ],
|
5162
|
+
toYData: function(a) {
|
5163
|
+
return [ a.low, a.q1, a.median, a.q3, a.high ];
|
5164
|
+
},
|
5165
|
+
pointValKey: "high",
|
5166
|
+
pointAttribs: function() {
|
5167
|
+
return {};
|
5168
|
+
},
|
5169
|
+
drawDataLabels: b,
|
5170
|
+
translate: function() {
|
5171
|
+
var a = this.yAxis, b = this.pointArrayMap;
|
5172
|
+
u.column.prototype.translate.apply(this);
|
5173
|
+
this.points.forEach(function(c) {
|
5174
|
+
b.forEach(function(b) {
|
5175
|
+
null !== c[b] && (c[b + "Plot"] = a.translate(c[b], 0, 1, 0, 1));
|
5176
|
+
});
|
5177
|
+
c.plotHigh = c.highPlot;
|
5178
|
+
});
|
5179
|
+
},
|
5180
|
+
drawPoints: function() {
|
5181
|
+
var a = this, b = a.options, l = a.chart, u = l.renderer, d, m, n, f, x, A, r = 0, p, h, g, e, k = !1 !== a.doQuartiles, B, C = a.options.whiskerLength;
|
5182
|
+
a.points.forEach(function(q) {
|
5183
|
+
var F = q.graphic, G = F ? "animate" : "attr", K = q.shapeArgs, v = {}, t = {}, H = {}, J = {}, I = q.color || a.color;
|
5184
|
+
"undefined" !== typeof q.plotY && (p = K.width, h = Math.floor(K.x), g = h + p,
|
5185
|
+
e = Math.round(p / 2), d = Math.floor(k ? q.q1Plot : q.lowPlot), m = Math.floor(k ? q.q3Plot : q.lowPlot),
|
5186
|
+
n = Math.floor(q.highPlot), f = Math.floor(q.lowPlot), F || (q.graphic = F = u.g("point").add(a.group),
|
5187
|
+
q.stem = u.path().addClass("highcharts-boxplot-stem").add(F), C && (q.whiskers = u.path().addClass("highcharts-boxplot-whisker").add(F)),
|
5188
|
+
k && (q.box = u.path(void 0).addClass("highcharts-boxplot-box").add(F)), q.medianShape = u.path(void 0).addClass("highcharts-boxplot-median").add(F)),
|
5189
|
+
l.styledMode || (t.stroke = q.stemColor || b.stemColor || I, t["stroke-width"] = c(q.stemWidth, b.stemWidth, b.lineWidth),
|
5190
|
+
t.dashstyle = q.stemDashStyle || b.stemDashStyle, q.stem.attr(t), C && (H.stroke = q.whiskerColor || b.whiskerColor || I,
|
5191
|
+
H["stroke-width"] = c(q.whiskerWidth, b.whiskerWidth, b.lineWidth), q.whiskers.attr(H)),
|
5192
|
+
k && (v.fill = q.fillColor || b.fillColor || I, v.stroke = b.lineColor || I, v["stroke-width"] = b.lineWidth || 0,
|
5193
|
+
q.box.attr(v)), J.stroke = q.medianColor || b.medianColor || I, J["stroke-width"] = c(q.medianWidth, b.medianWidth, b.lineWidth),
|
5194
|
+
q.medianShape.attr(J)), A = q.stem.strokeWidth() % 2 / 2, r = h + e + A, q.stem[G]({
|
5195
|
+
d: [ "M", r, m, "L", r, n, "M", r, d, "L", r, f ]
|
5196
|
+
}), k && (A = q.box.strokeWidth() % 2 / 2, d = Math.floor(d) + A, m = Math.floor(m) + A,
|
5197
|
+
h += A, g += A, q.box[G]({
|
5198
|
+
d: [ "M", h, m, "L", h, d, "L", g, d, "L", g, m, "L", h, m, "z" ]
|
5199
|
+
})), C && (A = q.whiskers.strokeWidth() % 2 / 2, n += A, f += A, B = /%$/.test(C) ? e * parseFloat(C) / 100 : C / 2,
|
5200
|
+
q.whiskers[G]({
|
5201
|
+
d: [ "M", r - B, n, "L", r + B, n, "M", r - B, f, "L", r + B, f ]
|
5202
|
+
})), x = Math.round(q.medianPlot), A = q.medianShape.strokeWidth() % 2 / 2, x += A,
|
5203
|
+
q.medianShape[G]({
|
5204
|
+
d: [ "M", h, x, "L", g, x ]
|
5205
|
+
}));
|
5206
|
+
});
|
5207
|
+
},
|
5208
|
+
setStackedPoints: b
|
5209
|
+
});
|
5210
|
+
});
|
5211
|
+
E(f, "parts-more/ErrorBarSeries.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(l, a) {
|
5212
|
+
a = a.seriesType;
|
5213
|
+
var c = l.noop, b = l.seriesTypes;
|
5214
|
+
a("errorbar", "boxplot", {
|
5215
|
+
color: "#000000",
|
5216
|
+
grouping: !1,
|
5217
|
+
linkedTo: ":previous",
|
5218
|
+
tooltip: {
|
5219
|
+
pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'
|
5220
|
+
},
|
5221
|
+
whiskerWidth: null
|
5222
|
+
}, {
|
5223
|
+
type: "errorbar",
|
5224
|
+
pointArrayMap: [ "low", "high" ],
|
5225
|
+
toYData: function(a) {
|
5226
|
+
return [ a.low, a.high ];
|
5227
|
+
},
|
5228
|
+
pointValKey: "high",
|
5229
|
+
doQuartiles: !1,
|
5230
|
+
drawDataLabels: b.arearange ? function() {
|
5231
|
+
var a = this.pointValKey;
|
5232
|
+
b.arearange.prototype.drawDataLabels.call(this);
|
5233
|
+
this.data.forEach(function(b) {
|
5234
|
+
b.y = b[a];
|
5235
|
+
});
|
5236
|
+
} : c,
|
5237
|
+
getColumnMetrics: function() {
|
5238
|
+
return this.linkedParent && this.linkedParent.columnMetrics || b.column.prototype.getColumnMetrics.call(this);
|
5239
|
+
}
|
5240
|
+
});
|
5241
|
+
});
|
5242
|
+
E(f, "parts-more/WaterfallSeries.js", [ f["parts/Globals.js"], f["parts/Point.js"], f["parts/Utilities.js"] ], function(l, a, c) {
|
5243
|
+
var b = c.addEvent, u = c.arrayMax, f = c.arrayMin, w = c.correctFloat, z = c.isNumber, y = c.objectEach, d = c.pick;
|
5244
|
+
c = c.seriesType;
|
5245
|
+
var m = l.Axis, n = l.Chart, t = l.Series, x = l.StackItem, A = l.seriesTypes;
|
5246
|
+
b(m, "afterInit", function() {
|
5247
|
+
this.isXAxis || (this.waterfallStacks = {
|
5248
|
+
changed: !1
|
5249
|
+
});
|
5250
|
+
});
|
5251
|
+
b(m, "afterBuildStacks", function() {
|
5252
|
+
this.waterfallStacks.changed = !1;
|
5253
|
+
delete this.waterfallStacks.alreadyChanged;
|
5254
|
+
});
|
5255
|
+
b(n, "beforeRedraw", function() {
|
5256
|
+
for (var a = this.axes, d = this.series, h = d.length; h--; ) d[h].options.stacking && (a.forEach(function(g) {
|
5257
|
+
g.isXAxis || (g.waterfallStacks.changed = !0);
|
5258
|
+
}), h = 0);
|
5259
|
+
});
|
5260
|
+
b(m, "afterRender", function() {
|
5261
|
+
var a = this.options.stackLabels;
|
5262
|
+
a && a.enabled && this.waterfallStacks && this.renderWaterfallStackTotals();
|
5263
|
+
});
|
5264
|
+
m.prototype.renderWaterfallStackTotals = function() {
|
5265
|
+
var a = this.waterfallStacks, d = this.stackTotalGroup, h = new x(this, this.options.stackLabels, !1, 0, void 0);
|
5266
|
+
this.dummyStackItem = h;
|
5267
|
+
y(a, function(g) {
|
5268
|
+
y(g, function(e) {
|
5269
|
+
h.total = e.stackTotal;
|
5270
|
+
e.label && (h.label = e.label);
|
5271
|
+
x.prototype.render.call(h, d);
|
5272
|
+
e.label = h.label;
|
5273
|
+
delete h.label;
|
5274
|
+
});
|
5275
|
+
});
|
5276
|
+
h.total = null;
|
5277
|
+
};
|
5278
|
+
c("waterfall", "column", {
|
5279
|
+
dataLabels: {
|
5280
|
+
inside: !0
|
5281
|
+
},
|
5282
|
+
lineWidth: 1,
|
5283
|
+
lineColor: "#333333",
|
5284
|
+
dashStyle: "Dot",
|
5285
|
+
borderColor: "#333333",
|
5286
|
+
states: {
|
5287
|
+
hover: {
|
5288
|
+
lineWidthPlus: 0
|
5289
|
+
}
|
5290
|
+
}
|
5291
|
+
}, {
|
5292
|
+
pointValKey: "y",
|
5293
|
+
showLine: !0,
|
5294
|
+
generatePoints: function() {
|
5295
|
+
var a;
|
5296
|
+
A.column.prototype.generatePoints.apply(this);
|
5297
|
+
var d = 0;
|
5298
|
+
for (a = this.points.length; d < a; d++) {
|
5299
|
+
var h = this.points[d];
|
5300
|
+
var g = this.processedYData[d];
|
5301
|
+
if (h.isIntermediateSum || h.isSum) h.y = w(g);
|
5302
|
+
}
|
5303
|
+
},
|
5304
|
+
translate: function() {
|
5305
|
+
var a = this.options, b = this.yAxis, h, g = d(a.minPointLength, 5), e = g / 2, k = a.threshold, c = a.stacking, C = b.waterfallStacks[this.stackKey];
|
5306
|
+
A.column.prototype.translate.apply(this);
|
5307
|
+
var q = h = k;
|
5308
|
+
var F = this.points;
|
5309
|
+
var m = 0;
|
5310
|
+
for (a = F.length; m < a; m++) {
|
5311
|
+
var l = F[m];
|
5312
|
+
var u = this.processedYData[m];
|
5313
|
+
var n = l.shapeArgs;
|
5314
|
+
var f = [ 0, u ];
|
5315
|
+
var t = l.y;
|
5316
|
+
if (c) {
|
5317
|
+
if (C) {
|
5318
|
+
f = C[m];
|
5319
|
+
if ("overlap" === c) {
|
5320
|
+
var v = f.stackState[f.stateIndex--];
|
5321
|
+
v = 0 <= t ? v : v - t;
|
5322
|
+
Object.hasOwnProperty.call(f, "absolutePos") && delete f.absolutePos;
|
5323
|
+
Object.hasOwnProperty.call(f, "absoluteNeg") && delete f.absoluteNeg;
|
5324
|
+
} else 0 <= t ? (v = f.threshold + f.posTotal, f.posTotal -= t) : (v = f.threshold + f.negTotal,
|
5325
|
+
f.negTotal -= t, v -= t), !f.posTotal && Object.hasOwnProperty.call(f, "absolutePos") && (f.posTotal = f.absolutePos,
|
5326
|
+
delete f.absolutePos), !f.negTotal && Object.hasOwnProperty.call(f, "absoluteNeg") && (f.negTotal = f.absoluteNeg,
|
5327
|
+
delete f.absoluteNeg);
|
5328
|
+
l.isSum || (f.connectorThreshold = f.threshold + f.stackTotal);
|
5329
|
+
b.reversed ? (u = 0 <= t ? v - t : v + t, t = v) : (u = v, t = v - t);
|
5330
|
+
l.below = u <= d(k, 0);
|
5331
|
+
n.y = b.translate(u, 0, 1, 0, 1);
|
5332
|
+
n.height = Math.abs(n.y - b.translate(t, 0, 1, 0, 1));
|
5333
|
+
}
|
5334
|
+
if (t = b.dummyStackItem) t.x = m, t.label = C[m].label, t.setOffset(this.pointXOffset || 0, this.barW || 0, this.stackedYNeg[m], this.stackedYPos[m]);
|
5335
|
+
} else v = Math.max(q, q + t) + f[0], n.y = b.translate(v, 0, 1, 0, 1), l.isSum ? (n.y = b.translate(f[1], 0, 1, 0, 1),
|
5336
|
+
n.height = Math.min(b.translate(f[0], 0, 1, 0, 1), b.len) - n.y) : l.isIntermediateSum ? (0 <= t ? (u = f[1] + h,
|
5337
|
+
t = h) : (u = h, t = f[1] + h), b.reversed && (u ^= t, t ^= u, u ^= t), n.y = b.translate(u, 0, 1, 0, 1),
|
5338
|
+
n.height = Math.abs(n.y - Math.min(b.translate(t, 0, 1, 0, 1), b.len)), h += f[1]) : (n.height = 0 < u ? b.translate(q, 0, 1, 0, 1) - n.y : b.translate(q, 0, 1, 0, 1) - b.translate(q - u, 0, 1, 0, 1),
|
5339
|
+
q += u, l.below = q < d(k, 0)), 0 > n.height && (n.y += n.height, n.height *= -1);
|
5340
|
+
l.plotY = n.y = Math.round(n.y) - this.borderWidth % 2 / 2;
|
5341
|
+
n.height = Math.max(Math.round(n.height), .001);
|
5342
|
+
l.yBottom = n.y + n.height;
|
5343
|
+
n.height <= g && !l.isNull ? (n.height = g, n.y -= e, l.plotY = n.y, l.minPointLengthOffset = 0 > l.y ? -e : e) : (l.isNull && (n.width = 0),
|
5344
|
+
l.minPointLengthOffset = 0);
|
5345
|
+
n = l.plotY + (l.negative ? n.height : 0);
|
5346
|
+
this.chart.inverted ? l.tooltipPos[0] = b.len - n : l.tooltipPos[1] = n;
|
5347
|
+
}
|
5348
|
+
},
|
5349
|
+
processData: function(a) {
|
5350
|
+
var d = this.options, h = this.yData, g = d.data, e = h.length, k = d.threshold || 0, b, r, q, c, m;
|
5351
|
+
for (m = r = b = q = c = 0; m < e; m++) {
|
5352
|
+
var n = h[m];
|
5353
|
+
var l = g && g[m] ? g[m] : {};
|
5354
|
+
"sum" === n || l.isSum ? h[m] = w(r) : "intermediateSum" === n || l.isIntermediateSum ? (h[m] = w(b),
|
5355
|
+
b = 0) : (r += n, b += n);
|
5356
|
+
q = Math.min(r, q);
|
5357
|
+
c = Math.max(r, c);
|
5358
|
+
}
|
5359
|
+
t.prototype.processData.call(this, a);
|
5360
|
+
d.stacking || (this.dataMin = q + k, this.dataMax = c);
|
5361
|
+
},
|
5362
|
+
toYData: function(a) {
|
5363
|
+
return a.isSum ? "sum" : a.isIntermediateSum ? "intermediateSum" : a.y;
|
5364
|
+
},
|
5365
|
+
updateParallelArrays: function(a, d) {
|
5366
|
+
t.prototype.updateParallelArrays.call(this, a, d);
|
5367
|
+
if ("sum" === this.yData[0] || "intermediateSum" === this.yData[0]) this.yData[0] = null;
|
5368
|
+
},
|
5369
|
+
pointAttribs: function(a, d) {
|
5370
|
+
var b = this.options.upColor;
|
5371
|
+
b && !a.options.color && (a.color = 0 < a.y ? b : null);
|
5372
|
+
a = A.column.prototype.pointAttribs.call(this, a, d);
|
5373
|
+
delete a.dashstyle;
|
5374
|
+
return a;
|
5375
|
+
},
|
5376
|
+
getGraphPath: function() {
|
5377
|
+
return [ "M", 0, 0 ];
|
5378
|
+
},
|
5379
|
+
getCrispPath: function() {
|
5380
|
+
var a = this.data, d = this.yAxis, b = a.length, g = Math.round(this.graph.strokeWidth()) % 2 / 2, e = Math.round(this.borderWidth) % 2 / 2, k = this.xAxis.reversed, c = this.yAxis.reversed, C = this.options.stacking, q = [], m;
|
5381
|
+
for (m = 1; m < b; m++) {
|
5382
|
+
var n = a[m].shapeArgs;
|
5383
|
+
var l = a[m - 1];
|
5384
|
+
var f = a[m - 1].shapeArgs;
|
5385
|
+
var u = d.waterfallStacks[this.stackKey];
|
5386
|
+
var t = 0 < l.y ? -f.height : 0;
|
5387
|
+
if (u) {
|
5388
|
+
u = u[m - 1];
|
5389
|
+
C ? (u = u.connectorThreshold, t = Math.round(d.translate(u, 0, 1, 0, 1) + (c ? t : 0)) - g) : t = f.y + l.minPointLengthOffset + e - g;
|
5390
|
+
var v = [ "M", f.x + (k ? 0 : f.width), t, "L", n.x + (k ? n.width : 0), t ];
|
5391
|
+
}
|
5392
|
+
if (!C && v && 0 > l.y && !c || 0 < l.y && c) v[2] += f.height, v[5] += f.height;
|
5393
|
+
q = q.concat(v);
|
5394
|
+
}
|
5395
|
+
return q;
|
5396
|
+
},
|
5397
|
+
drawGraph: function() {
|
5398
|
+
t.prototype.drawGraph.call(this);
|
5399
|
+
this.graph.attr({
|
5400
|
+
d: this.getCrispPath()
|
5401
|
+
});
|
5402
|
+
},
|
5403
|
+
setStackedPoints: function() {
|
5404
|
+
function a(e, a, k, g) {
|
5405
|
+
if (z) for (k; k < z; k++) w.stackState[k] += g; else w.stackState[0] = e, z = w.stackState.length;
|
5406
|
+
w.stackState.push(w.stackState[z - 1] + a);
|
5407
|
+
}
|
5408
|
+
var d = this.options, b = this.yAxis.waterfallStacks, g = d.threshold, e = g || 0, k = e, c = this.stackKey, C = this.xData, q = C.length, m, n, l;
|
5409
|
+
this.yAxis.usePercentage = !1;
|
5410
|
+
var f = n = l = e;
|
5411
|
+
if (this.visible || !this.chart.options.chart.ignoreHiddenSeries) {
|
5412
|
+
var u = b.changed;
|
5413
|
+
(m = b.alreadyChanged) && 0 > m.indexOf(c) && (u = !0);
|
5414
|
+
b[c] || (b[c] = {});
|
5415
|
+
m = b[c];
|
5416
|
+
for (var t = 0; t < q; t++) {
|
5417
|
+
var v = C[t];
|
5418
|
+
if (!m[v] || u) m[v] = {
|
5419
|
+
negTotal: 0,
|
5420
|
+
posTotal: 0,
|
5421
|
+
stackTotal: 0,
|
5422
|
+
threshold: 0,
|
5423
|
+
stateIndex: 0,
|
5424
|
+
stackState: [],
|
5425
|
+
label: u && m[v] ? m[v].label : void 0
|
5426
|
+
};
|
5427
|
+
var w = m[v];
|
5428
|
+
var x = this.yData[t];
|
5429
|
+
0 <= x ? w.posTotal += x : w.negTotal += x;
|
5430
|
+
var y = d.data[t];
|
5431
|
+
v = w.absolutePos = w.posTotal;
|
5432
|
+
var A = w.absoluteNeg = w.negTotal;
|
5433
|
+
w.stackTotal = v + A;
|
5434
|
+
var z = w.stackState.length;
|
5435
|
+
y && y.isIntermediateSum ? (a(l, n, 0, l), l = n, n = g, e ^= k, k ^= e, e ^= k) : y && y.isSum ? (a(g, f, z),
|
5436
|
+
e = g) : (a(e, x, 0, f), y && (f += x, n += x));
|
5437
|
+
w.stateIndex++;
|
5438
|
+
w.threshold = e;
|
5439
|
+
e += w.stackTotal;
|
5440
|
+
}
|
5441
|
+
b.changed = !1;
|
5442
|
+
b.alreadyChanged || (b.alreadyChanged = []);
|
5443
|
+
b.alreadyChanged.push(c);
|
5444
|
+
}
|
5445
|
+
},
|
5446
|
+
getExtremes: function() {
|
5447
|
+
var a = this.options.stacking;
|
5448
|
+
if (a) {
|
5449
|
+
var d = this.yAxis;
|
5450
|
+
d = d.waterfallStacks;
|
5451
|
+
var b = this.stackedYNeg = [];
|
5452
|
+
var g = this.stackedYPos = [];
|
5453
|
+
"overlap" === a ? y(d[this.stackKey], function(e) {
|
5454
|
+
b.push(f(e.stackState));
|
5455
|
+
g.push(u(e.stackState));
|
5456
|
+
}) : y(d[this.stackKey], function(e) {
|
5457
|
+
b.push(e.negTotal + e.threshold);
|
5458
|
+
g.push(e.posTotal + e.threshold);
|
5459
|
+
});
|
5460
|
+
this.dataMin = f(b);
|
5461
|
+
this.dataMax = u(g);
|
5462
|
+
}
|
5463
|
+
}
|
5464
|
+
}, {
|
5465
|
+
getClassName: function() {
|
5466
|
+
var d = a.prototype.getClassName.call(this);
|
5467
|
+
this.isSum ? d += " highcharts-sum" : this.isIntermediateSum && (d += " highcharts-intermediate-sum");
|
5468
|
+
return d;
|
5469
|
+
},
|
5470
|
+
isValid: function() {
|
5471
|
+
return z(this.y) || this.isSum || this.isIntermediateSum;
|
5472
|
+
}
|
5473
|
+
});
|
5474
|
+
});
|
5475
|
+
E(f, "parts-more/PolygonSeries.js", [ f["parts/Globals.js"], f["mixins/legend-symbol.js"], f["parts/Utilities.js"] ], function(l, a, c) {
|
5476
|
+
c = c.seriesType;
|
5477
|
+
var b = l.Series, f = l.seriesTypes;
|
5478
|
+
c("polygon", "scatter", {
|
5479
|
+
marker: {
|
5480
|
+
enabled: !1,
|
5481
|
+
states: {
|
5482
|
+
hover: {
|
5483
|
+
enabled: !1
|
5484
|
+
}
|
5485
|
+
}
|
5486
|
+
},
|
5487
|
+
stickyTracking: !1,
|
5488
|
+
tooltip: {
|
5489
|
+
followPointer: !0,
|
5490
|
+
pointFormat: ""
|
5491
|
+
},
|
5492
|
+
trackByArea: !0
|
5493
|
+
}, {
|
5494
|
+
type: "polygon",
|
5495
|
+
getGraphPath: function() {
|
5496
|
+
for (var a = b.prototype.getGraphPath.call(this), c = a.length + 1; c--; ) (c === a.length || "M" === a[c]) && 0 < c && a.splice(c, 0, "z");
|
5497
|
+
return this.areaPath = a;
|
5498
|
+
},
|
5499
|
+
drawGraph: function() {
|
5500
|
+
this.options.fillColor = this.color;
|
5501
|
+
f.area.prototype.drawGraph.call(this);
|
5502
|
+
},
|
5503
|
+
drawLegendSymbol: a.drawRectangle,
|
5504
|
+
drawTracker: b.prototype.drawTracker,
|
5505
|
+
setStackedPoints: l.noop
|
5506
|
+
});
|
5507
|
+
});
|
5508
|
+
E(f, "parts-more/BubbleLegend.js", [ f["parts/Globals.js"], f["parts/Color.js"], f["parts/Legend.js"], f["parts/Utilities.js"] ], function(l, a, c, b) {
|
5509
|
+
var f = a.parse;
|
5510
|
+
a = b.addEvent;
|
5511
|
+
var v = b.arrayMax, w = b.arrayMin, z = b.isNumber, y = b.merge, d = b.objectEach, m = b.pick, n = b.stableSort, t = b.wrap, x = l.Series, A = l.Chart, r = l.noop, p = l.setOptions;
|
5512
|
+
p({
|
5513
|
+
legend: {
|
5514
|
+
bubbleLegend: {
|
5515
|
+
borderColor: void 0,
|
5516
|
+
borderWidth: 2,
|
5517
|
+
className: void 0,
|
5518
|
+
color: void 0,
|
5519
|
+
connectorClassName: void 0,
|
5520
|
+
connectorColor: void 0,
|
5521
|
+
connectorDistance: 60,
|
5522
|
+
connectorWidth: 1,
|
5523
|
+
enabled: !1,
|
5524
|
+
labels: {
|
5525
|
+
className: void 0,
|
5526
|
+
allowOverlap: !1,
|
5527
|
+
format: "",
|
5528
|
+
formatter: void 0,
|
5529
|
+
align: "right",
|
5530
|
+
style: {
|
5531
|
+
fontSize: 10,
|
5532
|
+
color: void 0
|
5533
|
+
},
|
5534
|
+
x: 0,
|
5535
|
+
y: 0
|
5536
|
+
},
|
5537
|
+
maxSize: 60,
|
5538
|
+
minSize: 10,
|
5539
|
+
legendIndex: 0,
|
5540
|
+
ranges: {
|
5541
|
+
value: void 0,
|
5542
|
+
borderColor: void 0,
|
5543
|
+
color: void 0,
|
5544
|
+
connectorColor: void 0
|
5545
|
+
},
|
5546
|
+
sizeBy: "area",
|
5547
|
+
sizeByAbsoluteValue: !1,
|
5548
|
+
zIndex: 1,
|
5549
|
+
zThreshold: 0
|
5550
|
+
}
|
5551
|
+
}
|
5552
|
+
});
|
5553
|
+
p = function() {
|
5554
|
+
function a(a, e) {
|
5555
|
+
this.options = this.symbols = this.visible = this.ranges = this.movementX = this.maxLabel = this.legendSymbol = this.legendItemWidth = this.legendItemHeight = this.legendItem = this.legendGroup = this.legend = this.fontMetrics = this.chart = void 0;
|
5556
|
+
this.setState = r;
|
5557
|
+
this.init(a, e);
|
5558
|
+
}
|
5559
|
+
a.prototype.init = function(a, e) {
|
5560
|
+
this.options = a;
|
5561
|
+
this.visible = !0;
|
5562
|
+
this.chart = e.chart;
|
5563
|
+
this.legend = e;
|
5564
|
+
};
|
5565
|
+
a.prototype.addToLegend = function(a) {
|
5566
|
+
a.splice(this.options.legendIndex, 0, this);
|
5567
|
+
};
|
5568
|
+
a.prototype.drawLegendSymbol = function(a) {
|
5569
|
+
var e = this.chart, k = this.options, d = m(a.options.itemDistance, 20), b = k.ranges;
|
5570
|
+
var g = k.connectorDistance;
|
5571
|
+
this.fontMetrics = e.renderer.fontMetrics(k.labels.style.fontSize.toString() + "px");
|
5572
|
+
b && b.length && z(b[0].value) ? (n(b, function(e, a) {
|
5573
|
+
return a.value - e.value;
|
5574
|
+
}), this.ranges = b, this.setOptions(), this.render(), e = this.getMaxLabelSize(),
|
5575
|
+
b = this.ranges[0].radius, a = 2 * b, g = g - b + e.width, g = 0 < g ? g : 0, this.maxLabel = e,
|
5576
|
+
this.movementX = "left" === k.labels.align ? g : 0, this.legendItemWidth = a + g + d,
|
5577
|
+
this.legendItemHeight = a + this.fontMetrics.h / 2) : a.options.bubbleLegend.autoRanges = !0;
|
5578
|
+
};
|
5579
|
+
a.prototype.setOptions = function() {
|
5580
|
+
var a = this.ranges, e = this.options, k = this.chart.series[e.seriesIndex], d = this.legend.baseline, b = {
|
5581
|
+
"z-index": e.zIndex,
|
5582
|
+
"stroke-width": e.borderWidth
|
5583
|
+
}, h = {
|
5584
|
+
"z-index": e.zIndex,
|
5585
|
+
"stroke-width": e.connectorWidth
|
5586
|
+
}, c = this.getLabelStyles(), p = k.options.marker.fillOpacity, r = this.chart.styledMode;
|
5587
|
+
a.forEach(function(g, q) {
|
5588
|
+
r || (b.stroke = m(g.borderColor, e.borderColor, k.color), b.fill = m(g.color, e.color, 1 !== p ? f(k.color).setOpacity(p).get("rgba") : k.color),
|
5589
|
+
h.stroke = m(g.connectorColor, e.connectorColor, k.color));
|
5590
|
+
a[q].radius = this.getRangeRadius(g.value);
|
5591
|
+
a[q] = y(a[q], {
|
5592
|
+
center: a[0].radius - a[q].radius + d
|
5593
|
+
});
|
5594
|
+
r || y(!0, a[q], {
|
5595
|
+
bubbleStyle: y(!1, b),
|
5596
|
+
connectorStyle: y(!1, h),
|
5597
|
+
labelStyle: c
|
5598
|
+
});
|
5599
|
+
}, this);
|
5600
|
+
};
|
5601
|
+
a.prototype.getLabelStyles = function() {
|
5602
|
+
var a = this.options, e = {}, k = "left" === a.labels.align, b = this.legend.options.rtl;
|
5603
|
+
d(a.labels.style, function(a, k) {
|
5604
|
+
"color" !== k && "fontSize" !== k && "z-index" !== k && (e[k] = a);
|
5605
|
+
});
|
5606
|
+
return y(!1, e, {
|
5607
|
+
"font-size": a.labels.style.fontSize,
|
5608
|
+
fill: m(a.labels.style.color, "#000000"),
|
5609
|
+
"z-index": a.zIndex,
|
5610
|
+
align: b || k ? "right" : "left"
|
5611
|
+
});
|
5612
|
+
};
|
5613
|
+
a.prototype.getRangeRadius = function(a) {
|
5614
|
+
var e = this.options;
|
5615
|
+
return this.chart.series[this.options.seriesIndex].getRadius.call(this, e.ranges[e.ranges.length - 1].value, e.ranges[0].value, e.minSize, e.maxSize, a);
|
5616
|
+
};
|
5617
|
+
a.prototype.render = function() {
|
5618
|
+
var a = this.chart.renderer, e = this.options.zThreshold;
|
5619
|
+
this.symbols || (this.symbols = {
|
5620
|
+
connectors: [],
|
5621
|
+
bubbleItems: [],
|
5622
|
+
labels: []
|
5623
|
+
});
|
5624
|
+
this.legendSymbol = a.g("bubble-legend");
|
5625
|
+
this.legendItem = a.g("bubble-legend-item");
|
5626
|
+
this.legendSymbol.translateX = 0;
|
5627
|
+
this.legendSymbol.translateY = 0;
|
5628
|
+
this.ranges.forEach(function(a) {
|
5629
|
+
a.value >= e && this.renderRange(a);
|
5630
|
+
}, this);
|
5631
|
+
this.legendSymbol.add(this.legendItem);
|
5632
|
+
this.legendItem.add(this.legendGroup);
|
5633
|
+
this.hideOverlappingLabels();
|
5634
|
+
};
|
5635
|
+
a.prototype.renderRange = function(a) {
|
5636
|
+
var e = this.options, k = e.labels, b = this.chart.renderer, d = this.symbols, g = d.labels, h = a.center, c = Math.abs(a.radius), p = e.connectorDistance, r = k.align, m = k.style.fontSize;
|
5637
|
+
p = this.legend.options.rtl || "left" === r ? -p : p;
|
5638
|
+
k = e.connectorWidth;
|
5639
|
+
var n = this.ranges[0].radius, l = h - c - e.borderWidth / 2 + k / 2;
|
5640
|
+
m = m / 2 - (this.fontMetrics.h - m) / 2;
|
5641
|
+
var f = b.styledMode;
|
5642
|
+
"center" === r && (p = 0, e.connectorDistance = 0, a.labelStyle.align = "center");
|
5643
|
+
r = l + e.labels.y;
|
5644
|
+
var u = n + p + e.labels.x;
|
5645
|
+
d.bubbleItems.push(b.circle(n, h + ((l % 1 ? 1 : .5) - (k % 2 ? 0 : .5)), c).attr(f ? {} : a.bubbleStyle).addClass((f ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-symbol " + (e.className || "")).add(this.legendSymbol));
|
5646
|
+
d.connectors.push(b.path(b.crispLine([ "M", n, l, "L", n + p, l ], e.connectorWidth)).attr(f ? {} : a.connectorStyle).addClass((f ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (e.connectorClassName || "")).add(this.legendSymbol));
|
5647
|
+
a = b.text(this.formatLabel(a), u, r + m).attr(f ? {} : a.labelStyle).addClass("highcharts-bubble-legend-labels " + (e.labels.className || "")).add(this.legendSymbol);
|
5648
|
+
g.push(a);
|
5649
|
+
a.placed = !0;
|
5650
|
+
a.alignAttr = {
|
5651
|
+
x: u,
|
5652
|
+
y: r + m
|
5653
|
+
};
|
5654
|
+
};
|
5655
|
+
a.prototype.getMaxLabelSize = function() {
|
5656
|
+
var a, e;
|
5657
|
+
this.symbols.labels.forEach(function(k) {
|
5658
|
+
e = k.getBBox(!0);
|
5659
|
+
a = a ? e.width > a.width ? e : a : e;
|
5660
|
+
});
|
5661
|
+
return a || {};
|
5662
|
+
};
|
5663
|
+
a.prototype.formatLabel = function(a) {
|
5664
|
+
var e = this.options, k = e.labels.formatter;
|
5665
|
+
e = e.labels.format;
|
5666
|
+
var d = this.chart.numberFormatter;
|
5667
|
+
return e ? b.format(e, a) : k ? k.call(a) : d(a.value, 1);
|
5668
|
+
};
|
5669
|
+
a.prototype.hideOverlappingLabels = function() {
|
5670
|
+
var a = this.chart, e = this.symbols;
|
5671
|
+
!this.options.labels.allowOverlap && e && (a.hideOverlappingLabels(e.labels), e.labels.forEach(function(a, b) {
|
5672
|
+
a.newOpacity ? a.newOpacity !== a.oldOpacity && e.connectors[b].show() : e.connectors[b].hide();
|
5673
|
+
}));
|
5674
|
+
};
|
5675
|
+
a.prototype.getRanges = function() {
|
5676
|
+
var a = this.legend.bubbleLegend, e = a.options.ranges, k, b = Number.MAX_VALUE, d = -Number.MAX_VALUE;
|
5677
|
+
a.chart.series.forEach(function(e) {
|
5678
|
+
e.isBubble && !e.ignoreSeries && (k = e.zData.filter(z), k.length && (b = m(e.options.zMin, Math.min(b, Math.max(w(k), !1 === e.options.displayNegative ? e.options.zThreshold : -Number.MAX_VALUE))),
|
5679
|
+
d = m(e.options.zMax, Math.max(d, v(k)))));
|
5680
|
+
});
|
5681
|
+
var h = b === d ? [ {
|
5682
|
+
value: d
|
5683
|
+
} ] : [ {
|
5684
|
+
value: b
|
5685
|
+
}, {
|
5686
|
+
value: (b + d) / 2
|
5687
|
+
}, {
|
5688
|
+
value: d,
|
5689
|
+
autoRanges: !0
|
5690
|
+
} ];
|
5691
|
+
e.length && e[0].radius && h.reverse();
|
5692
|
+
h.forEach(function(a, b) {
|
5693
|
+
e && e[b] && (h[b] = y(!1, e[b], a));
|
5694
|
+
});
|
5695
|
+
return h;
|
5696
|
+
};
|
5697
|
+
a.prototype.predictBubbleSizes = function() {
|
5698
|
+
var a = this.chart, e = this.fontMetrics, b = a.legend.options, d = "horizontal" === b.layout, h = d ? a.legend.lastLineHeight : 0, q = a.plotSizeX, c = a.plotSizeY, p = a.series[this.options.seriesIndex];
|
5699
|
+
a = Math.ceil(p.minPxSize);
|
5700
|
+
var r = Math.ceil(p.maxPxSize);
|
5701
|
+
p = p.options.maxSize;
|
5702
|
+
var m = Math.min(c, q);
|
5703
|
+
if (b.floating || !/%$/.test(p)) e = r; else if (p = parseFloat(p), e = (m + h - e.h / 2) * p / 100 / (p / 100 + 1),
|
5704
|
+
d && c - e >= q || !d && q - e >= c) e = r;
|
5705
|
+
return [ a, Math.ceil(e) ];
|
5706
|
+
};
|
5707
|
+
a.prototype.updateRanges = function(a, e) {
|
5708
|
+
var b = this.legend.options.bubbleLegend;
|
5709
|
+
b.minSize = a;
|
5710
|
+
b.maxSize = e;
|
5711
|
+
b.ranges = this.getRanges();
|
5712
|
+
};
|
5713
|
+
a.prototype.correctSizes = function() {
|
5714
|
+
var a = this.legend, e = this.chart.series[this.options.seriesIndex];
|
5715
|
+
1 < Math.abs(Math.ceil(e.maxPxSize) - this.options.maxSize) && (this.updateRanges(this.options.minSize, e.maxPxSize),
|
5716
|
+
a.render());
|
5717
|
+
};
|
5718
|
+
return a;
|
5719
|
+
}();
|
5720
|
+
a(c, "afterGetAllItems", function(a) {
|
5721
|
+
var b = this.bubbleLegend, e = this.options, d = e.bubbleLegend, h = this.chart.getVisibleBubbleSeriesIndex();
|
5722
|
+
b && b.ranges && b.ranges.length && (d.ranges.length && (d.autoRanges = !!d.ranges[0].autoRanges),
|
5723
|
+
this.destroyItem(b));
|
5724
|
+
0 <= h && e.enabled && d.enabled && (d.seriesIndex = h, this.bubbleLegend = new l.BubbleLegend(d, this),
|
5725
|
+
this.bubbleLegend.addToLegend(a.allItems));
|
5726
|
+
});
|
5727
|
+
A.prototype.getVisibleBubbleSeriesIndex = function() {
|
5728
|
+
for (var a = this.series, b = 0; b < a.length; ) {
|
5729
|
+
if (a[b] && a[b].isBubble && a[b].visible && a[b].zData.length) return b;
|
5730
|
+
b++;
|
5731
|
+
}
|
5732
|
+
return -1;
|
5733
|
+
};
|
5734
|
+
c.prototype.getLinesHeights = function() {
|
5735
|
+
var a = this.allItems, b = [], e = a.length, d, c = 0;
|
5736
|
+
for (d = 0; d < e; d++) if (a[d].legendItemHeight && (a[d].itemHeight = a[d].legendItemHeight),
|
5737
|
+
a[d] === a[e - 1] || a[d + 1] && a[d]._legendItemPos[1] !== a[d + 1]._legendItemPos[1]) {
|
5738
|
+
b.push({
|
5739
|
+
height: 0
|
5740
|
+
});
|
5741
|
+
var p = b[b.length - 1];
|
5742
|
+
for (c; c <= d; c++) a[c].itemHeight > p.height && (p.height = a[c].itemHeight);
|
5743
|
+
p.step = d;
|
5744
|
+
}
|
5745
|
+
return b;
|
5746
|
+
};
|
5747
|
+
c.prototype.retranslateItems = function(a) {
|
5748
|
+
var b, e, d, h = this.options.rtl, c = 0;
|
5749
|
+
this.allItems.forEach(function(k, g) {
|
5750
|
+
b = k.legendGroup.translateX;
|
5751
|
+
e = k._legendItemPos[1];
|
5752
|
+
if ((d = k.movementX) || h && k.ranges) d = h ? b - k.options.maxSize / 2 : b + d,
|
5753
|
+
k.legendGroup.attr({
|
5754
|
+
translateX: d
|
5755
|
+
});
|
5756
|
+
g > a[c].step && c++;
|
5757
|
+
k.legendGroup.attr({
|
5758
|
+
translateY: Math.round(e + a[c].height / 2)
|
5759
|
+
});
|
5760
|
+
k._legendItemPos[1] = e + a[c].height / 2;
|
5761
|
+
});
|
5762
|
+
};
|
5763
|
+
a(x, "legendItemClick", function() {
|
5764
|
+
var a = this.chart, b = this.visible, e = this.chart.legend;
|
5765
|
+
e && e.bubbleLegend && (this.visible = !b, this.ignoreSeries = b, a = 0 <= a.getVisibleBubbleSeriesIndex(),
|
5766
|
+
e.bubbleLegend.visible !== a && (e.update({
|
5767
|
+
bubbleLegend: {
|
5768
|
+
enabled: a
|
5769
|
+
}
|
5770
|
+
}), e.bubbleLegend.visible = a), this.visible = b);
|
5771
|
+
});
|
5772
|
+
t(A.prototype, "drawChartBox", function(a, b, e) {
|
5773
|
+
var k = this.legend, h = 0 <= this.getVisibleBubbleSeriesIndex();
|
5774
|
+
if (k && k.options.enabled && k.bubbleLegend && k.options.bubbleLegend.autoRanges && h) {
|
5775
|
+
var g = k.bubbleLegend.options;
|
5776
|
+
h = k.bubbleLegend.predictBubbleSizes();
|
5777
|
+
k.bubbleLegend.updateRanges(h[0], h[1]);
|
5778
|
+
g.placed || (k.group.placed = !1, k.allItems.forEach(function(e) {
|
5779
|
+
e.legendGroup.translateY = null;
|
5780
|
+
}));
|
5781
|
+
k.render();
|
5782
|
+
this.getMargins();
|
5783
|
+
this.axes.forEach(function(e) {
|
5784
|
+
e.visible && e.render();
|
5785
|
+
g.placed || (e.setScale(), e.updateNames(), d(e.ticks, function(e) {
|
5786
|
+
e.isNew = !0;
|
5787
|
+
e.isNewLabel = !0;
|
5788
|
+
}));
|
5789
|
+
});
|
5790
|
+
g.placed = !0;
|
5791
|
+
this.getMargins();
|
5792
|
+
a.call(this, b, e);
|
5793
|
+
k.bubbleLegend.correctSizes();
|
5794
|
+
k.retranslateItems(k.getLinesHeights());
|
5795
|
+
} else a.call(this, b, e), k && k.options.enabled && k.bubbleLegend && (k.render(),
|
5796
|
+
k.retranslateItems(k.getLinesHeights()));
|
5797
|
+
});
|
5798
|
+
l.BubbleLegend = p;
|
5799
|
+
return l.BubbleLegend;
|
5800
|
+
});
|
5801
|
+
E(f, "parts-more/BubbleSeries.js", [ f["parts/Globals.js"], f["parts/Color.js"], f["parts/Point.js"], f["parts/Utilities.js"] ], function(l, a, c, b) {
|
5802
|
+
var f = a.parse, v = b.arrayMax, w = b.arrayMin, z = b.clamp, y = b.extend, d = b.isNumber, m = b.pick, n = b.pInt;
|
5803
|
+
a = b.seriesType;
|
5804
|
+
b = l.Axis;
|
5805
|
+
var t = l.noop, x = l.Series, A = l.seriesTypes;
|
5806
|
+
a("bubble", "scatter", {
|
5807
|
+
dataLabels: {
|
5808
|
+
formatter: function() {
|
5809
|
+
return this.point.z;
|
5810
|
+
},
|
5811
|
+
inside: !0,
|
5812
|
+
verticalAlign: "middle"
|
5813
|
+
},
|
5814
|
+
animationLimit: 250,
|
5815
|
+
marker: {
|
5816
|
+
lineColor: null,
|
5817
|
+
lineWidth: 1,
|
5818
|
+
fillOpacity: .5,
|
5819
|
+
radius: null,
|
5820
|
+
states: {
|
5821
|
+
hover: {
|
5822
|
+
radiusPlus: 0
|
5823
|
+
}
|
5824
|
+
},
|
5825
|
+
symbol: "circle"
|
5826
|
+
},
|
5827
|
+
minSize: 8,
|
5828
|
+
maxSize: "20%",
|
5829
|
+
softThreshold: !1,
|
5830
|
+
states: {
|
5831
|
+
hover: {
|
5832
|
+
halo: {
|
5833
|
+
size: 5
|
5834
|
+
}
|
5835
|
+
}
|
5836
|
+
},
|
5837
|
+
tooltip: {
|
5838
|
+
pointFormat: "({point.x}, {point.y}), Size: {point.z}"
|
5839
|
+
},
|
5840
|
+
turboThreshold: 0,
|
5841
|
+
zThreshold: 0,
|
5842
|
+
zoneAxis: "z"
|
5843
|
+
}, {
|
5844
|
+
pointArrayMap: [ "y", "z" ],
|
5845
|
+
parallelArrays: [ "x", "y", "z" ],
|
5846
|
+
trackerGroups: [ "group", "dataLabelsGroup" ],
|
5847
|
+
specialGroup: "group",
|
5848
|
+
bubblePadding: !0,
|
5849
|
+
zoneAxis: "z",
|
5850
|
+
directTouch: !0,
|
5851
|
+
isBubble: !0,
|
5852
|
+
pointAttribs: function(a, b) {
|
5853
|
+
var d = this.options.marker.fillOpacity;
|
5854
|
+
a = x.prototype.pointAttribs.call(this, a, b);
|
5855
|
+
1 !== d && (a.fill = f(a.fill).setOpacity(d).get("rgba"));
|
5856
|
+
return a;
|
5857
|
+
},
|
5858
|
+
getRadii: function(a, b, d) {
|
5859
|
+
var g = this.zData, e = this.yData, k = d.minPxSize, h = d.maxPxSize, c = [];
|
5860
|
+
var q = 0;
|
5861
|
+
for (d = g.length; q < d; q++) {
|
5862
|
+
var p = g[q];
|
5863
|
+
c.push(this.getRadius(a, b, k, h, p, e[q]));
|
5864
|
+
}
|
5865
|
+
this.radii = c;
|
5866
|
+
},
|
5867
|
+
getRadius: function(a, b, h, g, e, k) {
|
5868
|
+
var c = this.options, p = "width" !== c.sizeBy, q = c.zThreshold, r = b - a, m = .5;
|
5869
|
+
if (null === k || null === e) return null;
|
5870
|
+
if (d(e)) {
|
5871
|
+
c.sizeByAbsoluteValue && (e = Math.abs(e - q), r = Math.max(b - q, Math.abs(a - q)),
|
5872
|
+
a = 0);
|
5873
|
+
if (e < a) return h / 2 - 1;
|
5874
|
+
0 < r && (m = (e - a) / r);
|
5875
|
+
}
|
5876
|
+
p && 0 <= m && (m = Math.sqrt(m));
|
5877
|
+
return Math.ceil(h + m * (g - h)) / 2;
|
5878
|
+
},
|
5879
|
+
animate: function(a) {
|
5880
|
+
!a && this.points.length < this.options.animationLimit && this.points.forEach(function(a) {
|
5881
|
+
var b = a.graphic;
|
5882
|
+
if (b && b.width) {
|
5883
|
+
var d = {
|
5884
|
+
x: b.x,
|
5885
|
+
y: b.y,
|
5886
|
+
width: b.width,
|
5887
|
+
height: b.height
|
5888
|
+
};
|
5889
|
+
b.attr({
|
5890
|
+
x: a.plotX,
|
5891
|
+
y: a.plotY,
|
5892
|
+
width: 1,
|
5893
|
+
height: 1
|
5894
|
+
});
|
5895
|
+
b.animate(d, this.options.animation);
|
5896
|
+
}
|
5897
|
+
}, this);
|
5898
|
+
},
|
5899
|
+
hasData: function() {
|
5900
|
+
return !!this.processedXData.length;
|
5901
|
+
},
|
5902
|
+
translate: function() {
|
5903
|
+
var a, b = this.data, c = this.radii;
|
5904
|
+
A.scatter.prototype.translate.call(this);
|
5905
|
+
for (a = b.length; a--; ) {
|
5906
|
+
var g = b[a];
|
5907
|
+
var e = c ? c[a] : 0;
|
5908
|
+
d(e) && e >= this.minPxSize / 2 ? (g.marker = y(g.marker, {
|
5909
|
+
radius: e,
|
5910
|
+
width: 2 * e,
|
5911
|
+
height: 2 * e
|
5912
|
+
}), g.dlBox = {
|
5913
|
+
x: g.plotX - e,
|
5914
|
+
y: g.plotY - e,
|
5915
|
+
width: 2 * e,
|
5916
|
+
height: 2 * e
|
5917
|
+
}) : g.shapeArgs = g.plotY = g.dlBox = void 0;
|
5918
|
+
}
|
5919
|
+
},
|
5920
|
+
alignDataLabel: A.column.prototype.alignDataLabel,
|
5921
|
+
buildKDTree: t,
|
5922
|
+
applyZones: t
|
5923
|
+
}, {
|
5924
|
+
haloPath: function(a) {
|
5925
|
+
return c.prototype.haloPath.call(this, 0 === a ? 0 : (this.marker ? this.marker.radius || 0 : 0) + a);
|
5926
|
+
},
|
5927
|
+
ttBelow: !1
|
5928
|
+
});
|
5929
|
+
b.prototype.beforePadding = function() {
|
5930
|
+
var a = this, b = this.len, c = this.chart, g = 0, e = b, k = this.isXAxis, l = k ? "xData" : "yData", f = this.min, q = {}, u = Math.min(c.plotWidth, c.plotHeight), t = Number.MAX_VALUE, x = -Number.MAX_VALUE, y = this.max - f, A = b / y, H = [];
|
5931
|
+
this.series.forEach(function(e) {
|
5932
|
+
var b = e.options;
|
5933
|
+
!e.bubblePadding || !e.visible && c.options.chart.ignoreHiddenSeries || (a.allowZoomOutside = !0,
|
5934
|
+
H.push(e), k && ([ "minSize", "maxSize" ].forEach(function(e) {
|
5935
|
+
var a = b[e], d = /%$/.test(a);
|
5936
|
+
a = n(a);
|
5937
|
+
q[e] = d ? u * a / 100 : a;
|
5938
|
+
}), e.minPxSize = q.minSize, e.maxPxSize = Math.max(q.maxSize, q.minSize), e = e.zData.filter(d),
|
5939
|
+
e.length && (t = m(b.zMin, z(w(e), !1 === b.displayNegative ? b.zThreshold : -Number.MAX_VALUE, t)),
|
5940
|
+
x = m(b.zMax, Math.max(x, v(e))))));
|
5941
|
+
});
|
5942
|
+
H.forEach(function(b) {
|
5943
|
+
var c = b[l], h = c.length;
|
5944
|
+
k && b.getRadii(t, x, b);
|
5945
|
+
if (0 < y) for (;h--; ) if (d(c[h]) && a.dataMin <= c[h] && c[h] <= a.max) {
|
5946
|
+
var q = b.radii ? b.radii[h] : 0;
|
5947
|
+
g = Math.min((c[h] - f) * A - q, g);
|
5948
|
+
e = Math.max((c[h] - f) * A + q, e);
|
5949
|
+
}
|
5950
|
+
});
|
5951
|
+
H.length && 0 < y && !this.isLog && (e -= b, A *= (b + Math.max(0, g) - Math.min(e, b)) / b,
|
5952
|
+
[ [ "min", "userMin", g ], [ "max", "userMax", e ] ].forEach(function(e) {
|
5953
|
+
"undefined" === typeof m(a.options[e[0]], a[e[1]]) && (a[e[0]] += e[2] / A);
|
5954
|
+
}));
|
5955
|
+
};
|
5956
|
+
});
|
5957
|
+
E(f, "modules/networkgraph/integrations.js", [ f["parts/Globals.js"] ], function(l) {
|
5958
|
+
l.networkgraphIntegrations = {
|
5959
|
+
verlet: {
|
5960
|
+
attractiveForceFunction: function(a, c) {
|
5961
|
+
return (c - a) / a;
|
5962
|
+
},
|
5963
|
+
repulsiveForceFunction: function(a, c) {
|
5964
|
+
return (c - a) / a * (c > a ? 1 : 0);
|
5965
|
+
},
|
5966
|
+
barycenter: function() {
|
5967
|
+
var a = this.options.gravitationalConstant, c = this.barycenter.xFactor, b = this.barycenter.yFactor;
|
5968
|
+
c = (c - (this.box.left + this.box.width) / 2) * a;
|
5969
|
+
b = (b - (this.box.top + this.box.height) / 2) * a;
|
5970
|
+
this.nodes.forEach(function(a) {
|
5971
|
+
a.fixedPosition || (a.plotX -= c / a.mass / a.degree, a.plotY -= b / a.mass / a.degree);
|
5972
|
+
});
|
5973
|
+
},
|
5974
|
+
repulsive: function(a, c, b) {
|
5975
|
+
c = c * this.diffTemperature / a.mass / a.degree;
|
5976
|
+
a.fixedPosition || (a.plotX += b.x * c, a.plotY += b.y * c);
|
5977
|
+
},
|
5978
|
+
attractive: function(a, c, b) {
|
5979
|
+
var l = a.getMass(), f = -b.x * c * this.diffTemperature;
|
5980
|
+
c = -b.y * c * this.diffTemperature;
|
5981
|
+
a.fromNode.fixedPosition || (a.fromNode.plotX -= f * l.fromNode / a.fromNode.degree,
|
5982
|
+
a.fromNode.plotY -= c * l.fromNode / a.fromNode.degree);
|
5983
|
+
a.toNode.fixedPosition || (a.toNode.plotX += f * l.toNode / a.toNode.degree, a.toNode.plotY += c * l.toNode / a.toNode.degree);
|
5984
|
+
},
|
5985
|
+
integrate: function(a, c) {
|
5986
|
+
var b = -a.options.friction, l = a.options.maxSpeed, f = (c.plotX + c.dispX - c.prevX) * b;
|
5987
|
+
b *= c.plotY + c.dispY - c.prevY;
|
5988
|
+
var w = Math.abs, z = w(f) / (f || 1);
|
5989
|
+
w = w(b) / (b || 1);
|
5990
|
+
f = z * Math.min(l, Math.abs(f));
|
5991
|
+
b = w * Math.min(l, Math.abs(b));
|
5992
|
+
c.prevX = c.plotX + c.dispX;
|
5993
|
+
c.prevY = c.plotY + c.dispY;
|
5994
|
+
c.plotX += f;
|
5995
|
+
c.plotY += b;
|
5996
|
+
c.temperature = a.vectorLength({
|
5997
|
+
x: f,
|
5998
|
+
y: b
|
5999
|
+
});
|
6000
|
+
},
|
6001
|
+
getK: function(a) {
|
6002
|
+
return Math.pow(a.box.width * a.box.height / a.nodes.length, .5);
|
6003
|
+
}
|
6004
|
+
},
|
6005
|
+
euler: {
|
6006
|
+
attractiveForceFunction: function(a, c) {
|
6007
|
+
return a * a / c;
|
6008
|
+
},
|
6009
|
+
repulsiveForceFunction: function(a, c) {
|
6010
|
+
return c * c / a;
|
6011
|
+
},
|
6012
|
+
barycenter: function() {
|
6013
|
+
var a = this.options.gravitationalConstant, c = this.barycenter.xFactor, b = this.barycenter.yFactor;
|
6014
|
+
this.nodes.forEach(function(f) {
|
6015
|
+
if (!f.fixedPosition) {
|
6016
|
+
var l = f.getDegree();
|
6017
|
+
l *= 1 + l / 2;
|
6018
|
+
f.dispX += (c - f.plotX) * a * l / f.degree;
|
6019
|
+
f.dispY += (b - f.plotY) * a * l / f.degree;
|
6020
|
+
}
|
6021
|
+
});
|
6022
|
+
},
|
6023
|
+
repulsive: function(a, c, b, f) {
|
6024
|
+
a.dispX += b.x / f * c / a.degree;
|
6025
|
+
a.dispY += b.y / f * c / a.degree;
|
6026
|
+
},
|
6027
|
+
attractive: function(a, c, b, f) {
|
6028
|
+
var l = a.getMass(), u = b.x / f * c;
|
6029
|
+
c *= b.y / f;
|
6030
|
+
a.fromNode.fixedPosition || (a.fromNode.dispX -= u * l.fromNode / a.fromNode.degree,
|
6031
|
+
a.fromNode.dispY -= c * l.fromNode / a.fromNode.degree);
|
6032
|
+
a.toNode.fixedPosition || (a.toNode.dispX += u * l.toNode / a.toNode.degree, a.toNode.dispY += c * l.toNode / a.toNode.degree);
|
6033
|
+
},
|
6034
|
+
integrate: function(a, c) {
|
6035
|
+
c.dispX += c.dispX * a.options.friction;
|
6036
|
+
c.dispY += c.dispY * a.options.friction;
|
6037
|
+
var b = c.temperature = a.vectorLength({
|
6038
|
+
x: c.dispX,
|
6039
|
+
y: c.dispY
|
6040
|
+
});
|
6041
|
+
0 !== b && (c.plotX += c.dispX / b * Math.min(Math.abs(c.dispX), a.temperature),
|
6042
|
+
c.plotY += c.dispY / b * Math.min(Math.abs(c.dispY), a.temperature));
|
6043
|
+
},
|
6044
|
+
getK: function(a) {
|
6045
|
+
return Math.pow(a.box.width * a.box.height / a.nodes.length, .3);
|
6046
|
+
}
|
6047
|
+
}
|
6048
|
+
};
|
6049
|
+
});
|
6050
|
+
E(f, "modules/networkgraph/QuadTree.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(f, a) {
|
6051
|
+
a = a.extend;
|
6052
|
+
var c = f.QuadTreeNode = function(a) {
|
6053
|
+
this.box = a;
|
6054
|
+
this.boxSize = Math.min(a.width, a.height);
|
6055
|
+
this.nodes = [];
|
6056
|
+
this.body = this.isInternal = !1;
|
6057
|
+
this.isEmpty = !0;
|
6058
|
+
};
|
6059
|
+
a(c.prototype, {
|
6060
|
+
insert: function(a, f) {
|
6061
|
+
this.isInternal ? this.nodes[this.getBoxPosition(a)].insert(a, f - 1) : (this.isEmpty = !1,
|
6062
|
+
this.body ? f ? (this.isInternal = !0, this.divideBox(), !0 !== this.body && (this.nodes[this.getBoxPosition(this.body)].insert(this.body, f - 1),
|
6063
|
+
this.body = !0), this.nodes[this.getBoxPosition(a)].insert(a, f - 1)) : (f = new c({
|
6064
|
+
top: a.plotX,
|
6065
|
+
left: a.plotY,
|
6066
|
+
width: .1,
|
6067
|
+
height: .1
|
6068
|
+
}), f.body = a, f.isInternal = !1, this.nodes.push(f)) : (this.isInternal = !1,
|
6069
|
+
this.body = a));
|
6070
|
+
},
|
6071
|
+
updateMassAndCenter: function() {
|
6072
|
+
var a = 0, c = 0, f = 0;
|
6073
|
+
this.isInternal ? (this.nodes.forEach(function(b) {
|
6074
|
+
b.isEmpty || (a += b.mass, c += b.plotX * b.mass, f += b.plotY * b.mass);
|
6075
|
+
}), c /= a, f /= a) : this.body && (a = this.body.mass, c = this.body.plotX, f = this.body.plotY);
|
6076
|
+
this.mass = a;
|
6077
|
+
this.plotX = c;
|
6078
|
+
this.plotY = f;
|
6079
|
+
},
|
6080
|
+
divideBox: function() {
|
6081
|
+
var a = this.box.width / 2, f = this.box.height / 2;
|
6082
|
+
this.nodes[0] = new c({
|
6083
|
+
left: this.box.left,
|
6084
|
+
top: this.box.top,
|
6085
|
+
width: a,
|
6086
|
+
height: f
|
6087
|
+
});
|
6088
|
+
this.nodes[1] = new c({
|
6089
|
+
left: this.box.left + a,
|
6090
|
+
top: this.box.top,
|
6091
|
+
width: a,
|
6092
|
+
height: f
|
6093
|
+
});
|
6094
|
+
this.nodes[2] = new c({
|
6095
|
+
left: this.box.left + a,
|
6096
|
+
top: this.box.top + f,
|
6097
|
+
width: a,
|
6098
|
+
height: f
|
6099
|
+
});
|
6100
|
+
this.nodes[3] = new c({
|
6101
|
+
left: this.box.left,
|
6102
|
+
top: this.box.top + f,
|
6103
|
+
width: a,
|
6104
|
+
height: f
|
6105
|
+
});
|
6106
|
+
},
|
6107
|
+
getBoxPosition: function(a) {
|
6108
|
+
var b = a.plotY < this.box.top + this.box.height / 2;
|
6109
|
+
return a.plotX < this.box.left + this.box.width / 2 ? b ? 0 : 3 : b ? 1 : 2;
|
6110
|
+
}
|
6111
|
+
});
|
6112
|
+
f = f.QuadTree = function(a, f, l, w) {
|
6113
|
+
this.box = {
|
6114
|
+
left: a,
|
6115
|
+
top: f,
|
6116
|
+
width: l,
|
6117
|
+
height: w
|
6118
|
+
};
|
6119
|
+
this.maxDepth = 25;
|
6120
|
+
this.root = new c(this.box, "0");
|
6121
|
+
this.root.isInternal = !0;
|
6122
|
+
this.root.isRoot = !0;
|
6123
|
+
this.root.divideBox();
|
6124
|
+
};
|
6125
|
+
a(f.prototype, {
|
6126
|
+
insertNodes: function(a) {
|
6127
|
+
a.forEach(function(a) {
|
6128
|
+
this.root.insert(a, this.maxDepth);
|
6129
|
+
}, this);
|
6130
|
+
},
|
6131
|
+
visitNodeRecursive: function(a, c, f) {
|
6132
|
+
var b;
|
6133
|
+
a || (a = this.root);
|
6134
|
+
a === this.root && c && (b = c(a));
|
6135
|
+
!1 !== b && (a.nodes.forEach(function(a) {
|
6136
|
+
if (a.isInternal) {
|
6137
|
+
c && (b = c(a));
|
6138
|
+
if (!1 === b) return;
|
6139
|
+
this.visitNodeRecursive(a, c, f);
|
6140
|
+
} else a.body && c && c(a.body);
|
6141
|
+
f && f(a);
|
6142
|
+
}, this), a === this.root && f && f(a));
|
6143
|
+
},
|
6144
|
+
calculateMassAndCenter: function() {
|
6145
|
+
this.visitNodeRecursive(null, null, function(a) {
|
6146
|
+
a.updateMassAndCenter();
|
6147
|
+
});
|
6148
|
+
}
|
6149
|
+
});
|
6150
|
+
});
|
6151
|
+
E(f, "modules/networkgraph/layouts.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(f, a) {
|
6152
|
+
var c = a.addEvent, b = a.clamp, l = a.defined, v = a.extend, w = a.isFunction, z = a.pick, y = a.setAnimation;
|
6153
|
+
a = f.Chart;
|
6154
|
+
f.layouts = {
|
6155
|
+
"reingold-fruchterman": function() {}
|
6156
|
+
};
|
6157
|
+
v(f.layouts["reingold-fruchterman"].prototype, {
|
6158
|
+
init: function(a) {
|
6159
|
+
this.options = a;
|
6160
|
+
this.nodes = [];
|
6161
|
+
this.links = [];
|
6162
|
+
this.series = [];
|
6163
|
+
this.box = {
|
6164
|
+
x: 0,
|
6165
|
+
y: 0,
|
6166
|
+
width: 0,
|
6167
|
+
height: 0
|
6168
|
+
};
|
6169
|
+
this.setInitialRendering(!0);
|
6170
|
+
this.integration = f.networkgraphIntegrations[a.integration];
|
6171
|
+
this.attractiveForce = z(a.attractiveForce, this.integration.attractiveForceFunction);
|
6172
|
+
this.repulsiveForce = z(a.repulsiveForce, this.integration.repulsiveForceFunction);
|
6173
|
+
this.approximation = a.approximation;
|
6174
|
+
},
|
6175
|
+
start: function() {
|
6176
|
+
var a = this.series, b = this.options;
|
6177
|
+
this.currentStep = 0;
|
6178
|
+
this.forces = a[0] && a[0].forces || [];
|
6179
|
+
this.initialRendering && (this.initPositions(), a.forEach(function(a) {
|
6180
|
+
a.render();
|
6181
|
+
}));
|
6182
|
+
this.setK();
|
6183
|
+
this.resetSimulation(b);
|
6184
|
+
b.enableSimulation && this.step();
|
6185
|
+
},
|
6186
|
+
step: function() {
|
6187
|
+
var a = this, b = this.series, c = this.options;
|
6188
|
+
a.currentStep++;
|
6189
|
+
"barnes-hut" === a.approximation && (a.createQuadTree(), a.quadTree.calculateMassAndCenter());
|
6190
|
+
a.forces.forEach(function(b) {
|
6191
|
+
a[b + "Forces"](a.temperature);
|
6192
|
+
});
|
6193
|
+
a.applyLimits(a.temperature);
|
6194
|
+
a.temperature = a.coolDown(a.startTemperature, a.diffTemperature, a.currentStep);
|
6195
|
+
a.prevSystemTemperature = a.systemTemperature;
|
6196
|
+
a.systemTemperature = a.getSystemTemperature();
|
6197
|
+
c.enableSimulation && (b.forEach(function(a) {
|
6198
|
+
a.chart && a.render();
|
6199
|
+
}), a.maxIterations-- && isFinite(a.temperature) && !a.isStable() ? (a.simulation && f.win.cancelAnimationFrame(a.simulation),
|
6200
|
+
a.simulation = f.win.requestAnimationFrame(function() {
|
6201
|
+
a.step();
|
6202
|
+
})) : a.simulation = !1);
|
6203
|
+
},
|
6204
|
+
stop: function() {
|
6205
|
+
this.simulation && f.win.cancelAnimationFrame(this.simulation);
|
6206
|
+
},
|
6207
|
+
setArea: function(a, b, c, f) {
|
6208
|
+
this.box = {
|
6209
|
+
left: a,
|
6210
|
+
top: b,
|
6211
|
+
width: c,
|
6212
|
+
height: f
|
6213
|
+
};
|
6214
|
+
},
|
6215
|
+
setK: function() {
|
6216
|
+
this.k = this.options.linkLength || this.integration.getK(this);
|
6217
|
+
},
|
6218
|
+
addElementsToCollection: function(a, b) {
|
6219
|
+
a.forEach(function(a) {
|
6220
|
+
-1 === b.indexOf(a) && b.push(a);
|
6221
|
+
});
|
6222
|
+
},
|
6223
|
+
removeElementFromCollection: function(a, b) {
|
6224
|
+
a = b.indexOf(a);
|
6225
|
+
-1 !== a && b.splice(a, 1);
|
6226
|
+
},
|
6227
|
+
clear: function() {
|
6228
|
+
this.nodes.length = 0;
|
6229
|
+
this.links.length = 0;
|
6230
|
+
this.series.length = 0;
|
6231
|
+
this.resetSimulation();
|
6232
|
+
},
|
6233
|
+
resetSimulation: function() {
|
6234
|
+
this.forcedStop = !1;
|
6235
|
+
this.systemTemperature = 0;
|
6236
|
+
this.setMaxIterations();
|
6237
|
+
this.setTemperature();
|
6238
|
+
this.setDiffTemperature();
|
6239
|
+
},
|
6240
|
+
setMaxIterations: function(a) {
|
6241
|
+
this.maxIterations = z(a, this.options.maxIterations);
|
6242
|
+
},
|
6243
|
+
setTemperature: function() {
|
6244
|
+
this.temperature = this.startTemperature = Math.sqrt(this.nodes.length);
|
6245
|
+
},
|
6246
|
+
setDiffTemperature: function() {
|
6247
|
+
this.diffTemperature = this.startTemperature / (this.options.maxIterations + 1);
|
6248
|
+
},
|
6249
|
+
setInitialRendering: function(a) {
|
6250
|
+
this.initialRendering = a;
|
6251
|
+
},
|
6252
|
+
createQuadTree: function() {
|
6253
|
+
this.quadTree = new f.QuadTree(this.box.left, this.box.top, this.box.width, this.box.height);
|
6254
|
+
this.quadTree.insertNodes(this.nodes);
|
6255
|
+
},
|
6256
|
+
initPositions: function() {
|
6257
|
+
var a = this.options.initialPositions;
|
6258
|
+
w(a) ? (a.call(this), this.nodes.forEach(function(a) {
|
6259
|
+
l(a.prevX) || (a.prevX = a.plotX);
|
6260
|
+
l(a.prevY) || (a.prevY = a.plotY);
|
6261
|
+
a.dispX = 0;
|
6262
|
+
a.dispY = 0;
|
6263
|
+
})) : "circle" === a ? this.setCircularPositions() : this.setRandomPositions();
|
6264
|
+
},
|
6265
|
+
setCircularPositions: function() {
|
6266
|
+
function a(b) {
|
6267
|
+
b.linksFrom.forEach(function(b) {
|
6268
|
+
r[b.toNode.id] || (r[b.toNode.id] = !0, u.push(b.toNode), a(b.toNode));
|
6269
|
+
});
|
6270
|
+
}
|
6271
|
+
var b = this.box, c = this.nodes, f = 2 * Math.PI / (c.length + 1), l = c.filter(function(a) {
|
6272
|
+
return 0 === a.linksTo.length;
|
6273
|
+
}), u = [], r = {}, p = this.options.initialPositionRadius;
|
6274
|
+
l.forEach(function(b) {
|
6275
|
+
u.push(b);
|
6276
|
+
a(b);
|
6277
|
+
});
|
6278
|
+
u.length ? c.forEach(function(a) {
|
6279
|
+
-1 === u.indexOf(a) && u.push(a);
|
6280
|
+
}) : u = c;
|
6281
|
+
u.forEach(function(a, d) {
|
6282
|
+
a.plotX = a.prevX = z(a.plotX, b.width / 2 + p * Math.cos(d * f));
|
6283
|
+
a.plotY = a.prevY = z(a.plotY, b.height / 2 + p * Math.sin(d * f));
|
6284
|
+
a.dispX = 0;
|
6285
|
+
a.dispY = 0;
|
6286
|
+
});
|
6287
|
+
},
|
6288
|
+
setRandomPositions: function() {
|
6289
|
+
function a(a) {
|
6290
|
+
a = a * a / Math.PI;
|
6291
|
+
return a -= Math.floor(a);
|
6292
|
+
}
|
6293
|
+
var b = this.box, c = this.nodes, f = c.length + 1;
|
6294
|
+
c.forEach(function(d, c) {
|
6295
|
+
d.plotX = d.prevX = z(d.plotX, b.width * a(c));
|
6296
|
+
d.plotY = d.prevY = z(d.plotY, b.height * a(f + c));
|
6297
|
+
d.dispX = 0;
|
6298
|
+
d.dispY = 0;
|
6299
|
+
});
|
6300
|
+
},
|
6301
|
+
force: function(a) {
|
6302
|
+
this.integration[a].apply(this, Array.prototype.slice.call(arguments, 1));
|
6303
|
+
},
|
6304
|
+
barycenterForces: function() {
|
6305
|
+
this.getBarycenter();
|
6306
|
+
this.force("barycenter");
|
6307
|
+
},
|
6308
|
+
getBarycenter: function() {
|
6309
|
+
var a = 0, b = 0, c = 0;
|
6310
|
+
this.nodes.forEach(function(d) {
|
6311
|
+
b += d.plotX * d.mass;
|
6312
|
+
c += d.plotY * d.mass;
|
6313
|
+
a += d.mass;
|
6314
|
+
});
|
6315
|
+
return this.barycenter = {
|
6316
|
+
x: b,
|
6317
|
+
y: c,
|
6318
|
+
xFactor: b / a,
|
6319
|
+
yFactor: c / a
|
6320
|
+
};
|
6321
|
+
},
|
6322
|
+
barnesHutApproximation: function(a, b) {
|
6323
|
+
var d = this.getDistXY(a, b), c = this.vectorLength(d);
|
6324
|
+
if (a !== b && 0 !== c) if (b.isInternal) {
|
6325
|
+
if (b.boxSize / c < this.options.theta && 0 !== c) {
|
6326
|
+
var f = this.repulsiveForce(c, this.k);
|
6327
|
+
this.force("repulsive", a, f * b.mass, d, c);
|
6328
|
+
var l = !1;
|
6329
|
+
} else l = !0;
|
6330
|
+
} else f = this.repulsiveForce(c, this.k), this.force("repulsive", a, f * b.mass, d, c);
|
6331
|
+
return l;
|
6332
|
+
},
|
6333
|
+
repulsiveForces: function() {
|
6334
|
+
var a = this;
|
6335
|
+
"barnes-hut" === a.approximation ? a.nodes.forEach(function(b) {
|
6336
|
+
a.quadTree.visitNodeRecursive(null, function(d) {
|
6337
|
+
return a.barnesHutApproximation(b, d);
|
6338
|
+
});
|
6339
|
+
}) : a.nodes.forEach(function(b) {
|
6340
|
+
a.nodes.forEach(function(d) {
|
6341
|
+
if (b !== d && !b.fixedPosition) {
|
6342
|
+
var c = a.getDistXY(b, d);
|
6343
|
+
var f = a.vectorLength(c);
|
6344
|
+
if (0 !== f) {
|
6345
|
+
var l = a.repulsiveForce(f, a.k);
|
6346
|
+
a.force("repulsive", b, l * d.mass, c, f);
|
6347
|
+
}
|
6348
|
+
}
|
6349
|
+
});
|
6350
|
+
});
|
6351
|
+
},
|
6352
|
+
attractiveForces: function() {
|
6353
|
+
var a = this, b, c, f;
|
6354
|
+
a.links.forEach(function(d) {
|
6355
|
+
d.fromNode && d.toNode && (b = a.getDistXY(d.fromNode, d.toNode), c = a.vectorLength(b),
|
6356
|
+
0 !== c && (f = a.attractiveForce(c, a.k), a.force("attractive", d, f, b, c)));
|
6357
|
+
});
|
6358
|
+
},
|
6359
|
+
applyLimits: function() {
|
6360
|
+
var a = this;
|
6361
|
+
a.nodes.forEach(function(b) {
|
6362
|
+
b.fixedPosition || (a.integration.integrate(a, b), a.applyLimitBox(b, a.box), b.dispX = 0,
|
6363
|
+
b.dispY = 0);
|
6364
|
+
});
|
6365
|
+
},
|
6366
|
+
applyLimitBox: function(a, c) {
|
6367
|
+
var d = a.radius;
|
6368
|
+
a.plotX = b(a.plotX, c.left + d, c.width - d);
|
6369
|
+
a.plotY = b(a.plotY, c.top + d, c.height - d);
|
6370
|
+
},
|
6371
|
+
coolDown: function(a, b, c) {
|
6372
|
+
return a - b * c;
|
6373
|
+
},
|
6374
|
+
isStable: function() {
|
6375
|
+
return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature;
|
6376
|
+
},
|
6377
|
+
getSystemTemperature: function() {
|
6378
|
+
return this.nodes.reduce(function(a, b) {
|
6379
|
+
return a + b.temperature;
|
6380
|
+
}, 0);
|
6381
|
+
},
|
6382
|
+
vectorLength: function(a) {
|
6383
|
+
return Math.sqrt(a.x * a.x + a.y * a.y);
|
6384
|
+
},
|
6385
|
+
getDistR: function(a, b) {
|
6386
|
+
a = this.getDistXY(a, b);
|
6387
|
+
return this.vectorLength(a);
|
6388
|
+
},
|
6389
|
+
getDistXY: function(a, b) {
|
6390
|
+
var c = a.plotX - b.plotX;
|
6391
|
+
a = a.plotY - b.plotY;
|
6392
|
+
return {
|
6393
|
+
x: c,
|
6394
|
+
y: a,
|
6395
|
+
absX: Math.abs(c),
|
6396
|
+
absY: Math.abs(a)
|
6397
|
+
};
|
6398
|
+
}
|
6399
|
+
});
|
6400
|
+
c(a, "predraw", function() {
|
6401
|
+
this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(a) {
|
6402
|
+
a.stop();
|
6403
|
+
});
|
6404
|
+
});
|
6405
|
+
c(a, "render", function() {
|
6406
|
+
function a(a) {
|
6407
|
+
a.maxIterations-- && isFinite(a.temperature) && !a.isStable() && !a.options.enableSimulation && (a.beforeStep && a.beforeStep(),
|
6408
|
+
a.step(), c = !1, b = !0);
|
6409
|
+
}
|
6410
|
+
var b = !1;
|
6411
|
+
if (this.graphLayoutsLookup) {
|
6412
|
+
y(!1, this);
|
6413
|
+
for (this.graphLayoutsLookup.forEach(function(a) {
|
6414
|
+
a.start();
|
6415
|
+
}); !c; ) {
|
6416
|
+
var c = !0;
|
6417
|
+
this.graphLayoutsLookup.forEach(a);
|
6418
|
+
}
|
6419
|
+
b && this.series.forEach(function(a) {
|
6420
|
+
a && a.layout && a.render();
|
6421
|
+
});
|
6422
|
+
}
|
6423
|
+
});
|
6424
|
+
});
|
6425
|
+
E(f, "modules/networkgraph/draggable-nodes.js", [ f["parts/Globals.js"], f["parts/Utilities.js"] ], function(f, a) {
|
6426
|
+
var c = a.addEvent;
|
6427
|
+
a = f.Chart;
|
6428
|
+
f.dragNodesMixin = {
|
6429
|
+
onMouseDown: function(a, c) {
|
6430
|
+
c = this.chart.pointer.normalize(c);
|
6431
|
+
a.fixedPosition = {
|
6432
|
+
chartX: c.chartX,
|
6433
|
+
chartY: c.chartY,
|
6434
|
+
plotX: a.plotX,
|
6435
|
+
plotY: a.plotY
|
6436
|
+
};
|
6437
|
+
a.inDragMode = !0;
|
6438
|
+
},
|
6439
|
+
onMouseMove: function(a, c) {
|
6440
|
+
if (a.fixedPosition && a.inDragMode) {
|
6441
|
+
var b = this.chart, f = b.pointer.normalize(c);
|
6442
|
+
c = a.fixedPosition.chartX - f.chartX;
|
6443
|
+
f = a.fixedPosition.chartY - f.chartY;
|
6444
|
+
if (5 < Math.abs(c) || 5 < Math.abs(f)) c = a.fixedPosition.plotX - c, f = a.fixedPosition.plotY - f,
|
6445
|
+
b.isInsidePlot(c, f) && (a.plotX = c, a.plotY = f, a.hasDragged = !0, this.redrawHalo(a),
|
6446
|
+
this.layout.simulation ? this.layout.resetSimulation() : (this.layout.setInitialRendering(!1),
|
6447
|
+
this.layout.enableSimulation ? this.layout.start() : this.layout.setMaxIterations(1),
|
6448
|
+
this.chart.redraw(), this.layout.setInitialRendering(!0)));
|
6449
|
+
}
|
6450
|
+
},
|
6451
|
+
onMouseUp: function(a, c) {
|
6452
|
+
a.fixedPosition && a.hasDragged && (this.layout.enableSimulation ? this.layout.start() : this.chart.redraw(),
|
6453
|
+
a.inDragMode = a.hasDragged = !1, this.options.fixedDraggable || delete a.fixedPosition);
|
6454
|
+
},
|
6455
|
+
redrawHalo: function(a) {
|
6456
|
+
a && this.halo && this.halo.attr({
|
6457
|
+
d: a.haloPath(this.options.states.hover.halo.size)
|
6458
|
+
});
|
6459
|
+
}
|
6460
|
+
};
|
6461
|
+
c(a, "load", function() {
|
6462
|
+
var a = this, f, l, w;
|
6463
|
+
a.container && (f = c(a.container, "mousedown", function(b) {
|
6464
|
+
var f = a.hoverPoint;
|
6465
|
+
f && f.series && f.series.hasDraggableNodes && f.series.options.draggable && (f.series.onMouseDown(f, b),
|
6466
|
+
l = c(a.container, "mousemove", function(a) {
|
6467
|
+
return f && f.series && f.series.onMouseMove(f, a);
|
6468
|
+
}), w = c(a.container.ownerDocument, "mouseup", function(a) {
|
6469
|
+
l();
|
6470
|
+
w();
|
6471
|
+
return f && f.series && f.series.onMouseUp(f, a);
|
6472
|
+
}));
|
6473
|
+
}));
|
6474
|
+
c(a, "destroy", function() {
|
6475
|
+
f();
|
6476
|
+
});
|
6477
|
+
});
|
6478
|
+
});
|
6479
|
+
E(f, "parts-more/PackedBubbleSeries.js", [ f["parts/Globals.js"], f["parts/Color.js"], f["parts/Point.js"], f["parts/Utilities.js"] ], function(f, a, c, b) {
|
6480
|
+
var l = a.parse, v = b.addEvent, w = b.clamp, z = b.defined, y = b.extend;
|
6481
|
+
a = b.extendClass;
|
6482
|
+
var d = b.fireEvent, m = b.isArray, n = b.isNumber, t = b.merge, x = b.pick;
|
6483
|
+
b = b.seriesType;
|
6484
|
+
var A = f.Series, r = f.Chart, p = f.layouts["reingold-fruchterman"], h = f.seriesTypes.bubble.prototype.pointClass, g = f.dragNodesMixin;
|
6485
|
+
f.networkgraphIntegrations.packedbubble = {
|
6486
|
+
repulsiveForceFunction: function(a, b, c, d) {
|
6487
|
+
return Math.min(a, (c.marker.radius + d.marker.radius) / 2);
|
6488
|
+
},
|
6489
|
+
barycenter: function() {
|
6490
|
+
var a = this, b = a.options.gravitationalConstant, c = a.box, d = a.nodes, f, g;
|
6491
|
+
d.forEach(function(e) {
|
6492
|
+
a.options.splitSeries && !e.isParentNode ? (f = e.series.parentNode.plotX, g = e.series.parentNode.plotY) : (f = c.width / 2,
|
6493
|
+
g = c.height / 2);
|
6494
|
+
e.fixedPosition || (e.plotX -= (e.plotX - f) * b / (e.mass * Math.sqrt(d.length)),
|
6495
|
+
e.plotY -= (e.plotY - g) * b / (e.mass * Math.sqrt(d.length)));
|
6496
|
+
});
|
6497
|
+
},
|
6498
|
+
repulsive: function(a, b, c, d) {
|
6499
|
+
var e = b * this.diffTemperature / a.mass / a.degree;
|
6500
|
+
b = c.x * e;
|
6501
|
+
c = c.y * e;
|
6502
|
+
a.fixedPosition || (a.plotX += b, a.plotY += c);
|
6503
|
+
d.fixedPosition || (d.plotX -= b, d.plotY -= c);
|
6504
|
+
},
|
6505
|
+
integrate: f.networkgraphIntegrations.verlet.integrate,
|
6506
|
+
getK: f.noop
|
6507
|
+
};
|
6508
|
+
f.layouts.packedbubble = a(p, {
|
6509
|
+
beforeStep: function() {
|
6510
|
+
this.options.marker && this.series.forEach(function(a) {
|
6511
|
+
a && a.calculateParentRadius();
|
6512
|
+
});
|
6513
|
+
},
|
6514
|
+
setCircularPositions: function() {
|
6515
|
+
var a = this, b = a.box, c = a.nodes, d = 2 * Math.PI / (c.length + 1), f, g, h = a.options.initialPositionRadius;
|
6516
|
+
c.forEach(function(e, c) {
|
6517
|
+
a.options.splitSeries && !e.isParentNode ? (f = e.series.parentNode.plotX, g = e.series.parentNode.plotY) : (f = b.width / 2,
|
6518
|
+
g = b.height / 2);
|
6519
|
+
e.plotX = e.prevX = x(e.plotX, f + h * Math.cos(e.index || c * d));
|
6520
|
+
e.plotY = e.prevY = x(e.plotY, g + h * Math.sin(e.index || c * d));
|
6521
|
+
e.dispX = 0;
|
6522
|
+
e.dispY = 0;
|
6523
|
+
});
|
6524
|
+
},
|
6525
|
+
repulsiveForces: function() {
|
6526
|
+
var a = this, b, c, d, f = a.options.bubblePadding;
|
6527
|
+
a.nodes.forEach(function(e) {
|
6528
|
+
e.degree = e.mass;
|
6529
|
+
e.neighbours = 0;
|
6530
|
+
a.nodes.forEach(function(k) {
|
6531
|
+
b = 0;
|
6532
|
+
e === k || e.fixedPosition || !a.options.seriesInteraction && e.series !== k.series || (d = a.getDistXY(e, k),
|
6533
|
+
c = a.vectorLength(d) - (e.marker.radius + k.marker.radius + f), 0 > c && (e.degree += .01,
|
6534
|
+
e.neighbours++, b = a.repulsiveForce(-c / Math.sqrt(e.neighbours), a.k, e, k)),
|
6535
|
+
a.force("repulsive", e, b * k.mass, d, k, c));
|
6536
|
+
});
|
6537
|
+
});
|
6538
|
+
},
|
6539
|
+
applyLimitBox: function(a) {
|
6540
|
+
if (this.options.splitSeries && !a.isParentNode && this.options.parentNodeLimit) {
|
6541
|
+
var e = this.getDistXY(a, a.series.parentNode);
|
6542
|
+
var b = a.series.parentNodeRadius - a.marker.radius - this.vectorLength(e);
|
6543
|
+
0 > b && b > -2 * a.marker.radius && (a.plotX -= .01 * e.x, a.plotY -= .01 * e.y);
|
6544
|
+
}
|
6545
|
+
p.prototype.applyLimitBox.apply(this, arguments);
|
6546
|
+
},
|
6547
|
+
isStable: function() {
|
6548
|
+
return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature || 0 < this.systemTemperature && .02 > this.systemTemperature / this.nodes.length && this.enableSimulation;
|
6549
|
+
}
|
6550
|
+
});
|
6551
|
+
b("packedbubble", "bubble", {
|
6552
|
+
minSize: "10%",
|
6553
|
+
maxSize: "50%",
|
6554
|
+
sizeBy: "area",
|
6555
|
+
zoneAxis: "y",
|
6556
|
+
tooltip: {
|
6557
|
+
pointFormat: "Value: {point.value}"
|
6558
|
+
},
|
6559
|
+
draggable: !0,
|
6560
|
+
useSimulation: !0,
|
6561
|
+
dataLabels: {
|
6562
|
+
formatter: function() {
|
6563
|
+
return this.point.value;
|
6564
|
+
},
|
6565
|
+
parentNodeFormatter: function() {
|
6566
|
+
return this.name;
|
6567
|
+
},
|
6568
|
+
parentNodeTextPath: {
|
6569
|
+
enabled: !0
|
6570
|
+
},
|
6571
|
+
padding: 0
|
6572
|
+
},
|
6573
|
+
layoutAlgorithm: {
|
6574
|
+
initialPositions: "circle",
|
6575
|
+
initialPositionRadius: 20,
|
6576
|
+
bubblePadding: 5,
|
6577
|
+
parentNodeLimit: !1,
|
6578
|
+
seriesInteraction: !0,
|
6579
|
+
dragBetweenSeries: !1,
|
6580
|
+
parentNodeOptions: {
|
6581
|
+
maxIterations: 400,
|
6582
|
+
gravitationalConstant: .03,
|
6583
|
+
maxSpeed: 50,
|
6584
|
+
initialPositionRadius: 100,
|
6585
|
+
seriesInteraction: !0,
|
6586
|
+
marker: {
|
6587
|
+
fillColor: null,
|
6588
|
+
fillOpacity: 1,
|
6589
|
+
lineWidth: 1,
|
6590
|
+
lineColor: null,
|
6591
|
+
symbol: "circle"
|
6592
|
+
}
|
6593
|
+
},
|
6594
|
+
enableSimulation: !0,
|
6595
|
+
type: "packedbubble",
|
6596
|
+
integration: "packedbubble",
|
6597
|
+
maxIterations: 1e3,
|
6598
|
+
splitSeries: !1,
|
6599
|
+
maxSpeed: 5,
|
6600
|
+
gravitationalConstant: .01,
|
6601
|
+
friction: -.981
|
6602
|
+
}
|
6603
|
+
}, {
|
6604
|
+
hasDraggableNodes: !0,
|
6605
|
+
forces: [ "barycenter", "repulsive" ],
|
6606
|
+
pointArrayMap: [ "value" ],
|
6607
|
+
pointValKey: "value",
|
6608
|
+
isCartesian: !1,
|
6609
|
+
requireSorting: !1,
|
6610
|
+
directTouch: !0,
|
6611
|
+
axisTypes: [],
|
6612
|
+
noSharedTooltip: !0,
|
6613
|
+
searchPoint: f.noop,
|
6614
|
+
accumulateAllPoints: function(a) {
|
6615
|
+
var e = a.chart, b = [], c, d;
|
6616
|
+
for (c = 0; c < e.series.length; c++) if (a = e.series[c], a.visible || !e.options.chart.ignoreHiddenSeries) for (d = 0; d < a.yData.length; d++) b.push([ null, null, a.yData[d], a.index, d, {
|
6617
|
+
id: d,
|
6618
|
+
marker: {
|
6619
|
+
radius: 0
|
6620
|
+
}
|
6621
|
+
} ]);
|
6622
|
+
return b;
|
6623
|
+
},
|
6624
|
+
init: function() {
|
6625
|
+
A.prototype.init.apply(this, arguments);
|
6626
|
+
v(this, "updatedData", function() {
|
6627
|
+
this.chart.series.forEach(function(a) {
|
6628
|
+
a.type === this.type && (a.isDirty = !0);
|
6629
|
+
}, this);
|
6630
|
+
});
|
6631
|
+
return this;
|
6632
|
+
},
|
6633
|
+
render: function() {
|
6634
|
+
var a = [];
|
6635
|
+
A.prototype.render.apply(this, arguments);
|
6636
|
+
this.options.dataLabels.allowOverlap || (this.data.forEach(function(e) {
|
6637
|
+
m(e.dataLabels) && e.dataLabels.forEach(function(e) {
|
6638
|
+
a.push(e);
|
6639
|
+
});
|
6640
|
+
}), this.options.useSimulation && this.chart.hideOverlappingLabels(a));
|
6641
|
+
},
|
6642
|
+
setVisible: function() {
|
6643
|
+
var a = this;
|
6644
|
+
A.prototype.setVisible.apply(a, arguments);
|
6645
|
+
a.parentNodeLayout && a.graph ? a.visible ? (a.graph.show(), a.parentNode.dataLabel && a.parentNode.dataLabel.show()) : (a.graph.hide(),
|
6646
|
+
a.parentNodeLayout.removeElementFromCollection(a.parentNode, a.parentNodeLayout.nodes),
|
6647
|
+
a.parentNode.dataLabel && a.parentNode.dataLabel.hide()) : a.layout && (a.visible ? a.layout.addElementsToCollection(a.points, a.layout.nodes) : a.points.forEach(function(e) {
|
6648
|
+
a.layout.removeElementFromCollection(e, a.layout.nodes);
|
6649
|
+
}));
|
6650
|
+
},
|
6651
|
+
drawDataLabels: function() {
|
6652
|
+
var a = this.options.dataLabels.textPath, b = this.points;
|
6653
|
+
A.prototype.drawDataLabels.apply(this, arguments);
|
6654
|
+
this.parentNode && (this.parentNode.formatPrefix = "parentNode", this.points = [ this.parentNode ],
|
6655
|
+
this.options.dataLabels.textPath = this.options.dataLabels.parentNodeTextPath, A.prototype.drawDataLabels.apply(this, arguments),
|
6656
|
+
this.points = b, this.options.dataLabels.textPath = a);
|
6657
|
+
},
|
6658
|
+
seriesBox: function() {
|
6659
|
+
var a = this.chart, b = Math.max, c = Math.min, d, f = [ a.plotLeft, a.plotLeft + a.plotWidth, a.plotTop, a.plotTop + a.plotHeight ];
|
6660
|
+
this.data.forEach(function(a) {
|
6661
|
+
z(a.plotX) && z(a.plotY) && a.marker.radius && (d = a.marker.radius, f[0] = c(f[0], a.plotX - d),
|
6662
|
+
f[1] = b(f[1], a.plotX + d), f[2] = c(f[2], a.plotY - d), f[3] = b(f[3], a.plotY + d));
|
6663
|
+
});
|
6664
|
+
return n(f.width / f.height) ? f : null;
|
6665
|
+
},
|
6666
|
+
calculateParentRadius: function() {
|
6667
|
+
var a = this.seriesBox();
|
6668
|
+
this.parentNodeRadius = w(Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20, 20, a ? Math.max(Math.sqrt(Math.pow(a.width, 2) + Math.pow(a.height, 2)) / 2 + 20, 20) : Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20);
|
6669
|
+
this.parentNode && (this.parentNode.marker.radius = this.parentNode.radius = this.parentNodeRadius);
|
6670
|
+
},
|
6671
|
+
drawGraph: function() {
|
6672
|
+
if (this.layout && this.layout.options.splitSeries) {
|
6673
|
+
var a = this.chart, b = this.layout.options.parentNodeOptions.marker;
|
6674
|
+
b = {
|
6675
|
+
fill: b.fillColor || l(this.color).brighten(.4).get(),
|
6676
|
+
opacity: b.fillOpacity,
|
6677
|
+
stroke: b.lineColor || this.color,
|
6678
|
+
"stroke-width": b.lineWidth
|
6679
|
+
};
|
6680
|
+
var c = this.visible ? "inherit" : "hidden";
|
6681
|
+
this.parentNodesGroup || (this.parentNodesGroup = this.plotGroup("parentNodesGroup", "parentNode", c, .1, a.seriesGroup),
|
6682
|
+
this.group.attr({
|
6683
|
+
zIndex: 2
|
6684
|
+
}));
|
6685
|
+
this.calculateParentRadius();
|
6686
|
+
c = t({
|
6687
|
+
x: this.parentNode.plotX - this.parentNodeRadius,
|
6688
|
+
y: this.parentNode.plotY - this.parentNodeRadius,
|
6689
|
+
width: 2 * this.parentNodeRadius,
|
6690
|
+
height: 2 * this.parentNodeRadius
|
6691
|
+
}, b);
|
6692
|
+
this.parentNode.graphic || (this.graph = this.parentNode.graphic = a.renderer.symbol(b.symbol).add(this.parentNodesGroup));
|
6693
|
+
this.parentNode.graphic.attr(c);
|
6694
|
+
}
|
6695
|
+
},
|
6696
|
+
createParentNodes: function() {
|
6697
|
+
var a = this, b = a.chart, c = a.parentNodeLayout, d, f = a.parentNode;
|
6698
|
+
a.parentNodeMass = 0;
|
6699
|
+
a.points.forEach(function(e) {
|
6700
|
+
a.parentNodeMass += Math.PI * Math.pow(e.marker.radius, 2);
|
6701
|
+
});
|
6702
|
+
a.calculateParentRadius();
|
6703
|
+
c.nodes.forEach(function(e) {
|
6704
|
+
e.seriesIndex === a.index && (d = !0);
|
6705
|
+
});
|
6706
|
+
c.setArea(0, 0, b.plotWidth, b.plotHeight);
|
6707
|
+
d || (f || (f = new h().init(this, {
|
6708
|
+
mass: a.parentNodeRadius / 2,
|
6709
|
+
marker: {
|
6710
|
+
radius: a.parentNodeRadius
|
6711
|
+
},
|
6712
|
+
dataLabels: {
|
6713
|
+
inside: !1
|
6714
|
+
},
|
6715
|
+
dataLabelOnNull: !0,
|
6716
|
+
degree: a.parentNodeRadius,
|
6717
|
+
isParentNode: !0,
|
6718
|
+
seriesIndex: a.index
|
6719
|
+
})), a.parentNode && (f.plotX = a.parentNode.plotX, f.plotY = a.parentNode.plotY),
|
6720
|
+
a.parentNode = f, c.addElementsToCollection([ a ], c.series), c.addElementsToCollection([ f ], c.nodes));
|
6721
|
+
},
|
6722
|
+
addSeriesLayout: function() {
|
6723
|
+
var a = this.options.layoutAlgorithm, b = this.chart.graphLayoutsStorage, c = this.chart.graphLayoutsLookup, d = t(a, a.parentNodeOptions, {
|
6724
|
+
enableSimulation: this.layout.options.enableSimulation
|
6725
|
+
});
|
6726
|
+
var g = b[a.type + "-series"];
|
6727
|
+
g || (b[a.type + "-series"] = g = new f.layouts[a.type](), g.init(d), c.splice(g.index, 0, g));
|
6728
|
+
this.parentNodeLayout = g;
|
6729
|
+
this.createParentNodes();
|
6730
|
+
},
|
6731
|
+
addLayout: function() {
|
6732
|
+
var a = this.options.layoutAlgorithm, b = this.chart.graphLayoutsStorage, c = this.chart.graphLayoutsLookup, d = this.chart.options.chart;
|
6733
|
+
b || (this.chart.graphLayoutsStorage = b = {}, this.chart.graphLayoutsLookup = c = []);
|
6734
|
+
var g = b[a.type];
|
6735
|
+
g || (a.enableSimulation = z(d.forExport) ? !d.forExport : a.enableSimulation, b[a.type] = g = new f.layouts[a.type](),
|
6736
|
+
g.init(a), c.splice(g.index, 0, g));
|
6737
|
+
this.layout = g;
|
6738
|
+
this.points.forEach(function(a) {
|
6739
|
+
a.mass = 2;
|
6740
|
+
a.degree = 1;
|
6741
|
+
a.collisionNmb = 1;
|
6742
|
+
});
|
6743
|
+
g.setArea(0, 0, this.chart.plotWidth, this.chart.plotHeight);
|
6744
|
+
g.addElementsToCollection([ this ], g.series);
|
6745
|
+
g.addElementsToCollection(this.points, g.nodes);
|
6746
|
+
},
|
6747
|
+
deferLayout: function() {
|
6748
|
+
var a = this.options.layoutAlgorithm;
|
6749
|
+
this.visible && (this.addLayout(), a.splitSeries && this.addSeriesLayout());
|
6750
|
+
},
|
6751
|
+
translate: function() {
|
6752
|
+
var a = this.chart, b = this.data, c = this.index, f, g = this.options.useSimulation;
|
6753
|
+
this.processedXData = this.xData;
|
6754
|
+
this.generatePoints();
|
6755
|
+
z(a.allDataPoints) || (a.allDataPoints = this.accumulateAllPoints(this), this.getPointRadius());
|
6756
|
+
if (g) var h = a.allDataPoints; else h = this.placeBubbles(a.allDataPoints), this.options.draggable = !1;
|
6757
|
+
for (f = 0; f < h.length; f++) if (h[f][3] === c) {
|
6758
|
+
var p = b[h[f][4]];
|
6759
|
+
var r = h[f][2];
|
6760
|
+
g || (p.plotX = h[f][0] - a.plotLeft + a.diffX, p.plotY = h[f][1] - a.plotTop + a.diffY);
|
6761
|
+
p.marker = y(p.marker, {
|
6762
|
+
radius: r,
|
6763
|
+
width: 2 * r,
|
6764
|
+
height: 2 * r
|
6765
|
+
});
|
6766
|
+
p.radius = r;
|
6767
|
+
}
|
6768
|
+
g && this.deferLayout();
|
6769
|
+
d(this, "afterTranslate");
|
6770
|
+
},
|
6771
|
+
checkOverlap: function(a, b) {
|
6772
|
+
var e = a[0] - b[0], c = a[1] - b[1];
|
6773
|
+
return -.001 > Math.sqrt(e * e + c * c) - Math.abs(a[2] + b[2]);
|
6774
|
+
},
|
6775
|
+
positionBubble: function(a, b, c) {
|
6776
|
+
var e = Math.sqrt, d = Math.asin, f = Math.acos, g = Math.pow, k = Math.abs;
|
6777
|
+
e = e(g(a[0] - b[0], 2) + g(a[1] - b[1], 2));
|
6778
|
+
f = f((g(e, 2) + g(c[2] + b[2], 2) - g(c[2] + a[2], 2)) / (2 * (c[2] + b[2]) * e));
|
6779
|
+
d = d(k(a[0] - b[0]) / e);
|
6780
|
+
a = (0 > a[1] - b[1] ? 0 : Math.PI) + f + d * (0 > (a[0] - b[0]) * (a[1] - b[1]) ? 1 : -1);
|
6781
|
+
return [ b[0] + (b[2] + c[2]) * Math.sin(a), b[1] - (b[2] + c[2]) * Math.cos(a), c[2], c[3], c[4] ];
|
6782
|
+
},
|
6783
|
+
placeBubbles: function(a) {
|
6784
|
+
var b = this.checkOverlap, e = this.positionBubble, c = [], d = 1, f = 0, g = 0;
|
6785
|
+
var h = [];
|
6786
|
+
var p;
|
6787
|
+
a = a.sort(function(a, b) {
|
6788
|
+
return b[2] - a[2];
|
6789
|
+
});
|
6790
|
+
if (a.length) {
|
6791
|
+
c.push([ [ 0, 0, a[0][2], a[0][3], a[0][4] ] ]);
|
6792
|
+
if (1 < a.length) for (c.push([ [ 0, 0 - a[1][2] - a[0][2], a[1][2], a[1][3], a[1][4] ] ]),
|
6793
|
+
p = 2; p < a.length; p++) a[p][2] = a[p][2] || 1, h = e(c[d][f], c[d - 1][g], a[p]),
|
6794
|
+
b(h, c[d][0]) ? (c.push([]), g = 0, c[d + 1].push(e(c[d][f], c[d][0], a[p])), d++,
|
6795
|
+
f = 0) : 1 < d && c[d - 1][g + 1] && b(h, c[d - 1][g + 1]) ? (g++, c[d].push(e(c[d][f], c[d - 1][g], a[p])),
|
6796
|
+
f++) : (f++, c[d].push(h));
|
6797
|
+
this.chart.stages = c;
|
6798
|
+
this.chart.rawPositions = [].concat.apply([], c);
|
6799
|
+
this.resizeRadius();
|
6800
|
+
h = this.chart.rawPositions;
|
6801
|
+
}
|
6802
|
+
return h;
|
6803
|
+
},
|
6804
|
+
resizeRadius: function() {
|
6805
|
+
var a = this.chart, b = a.rawPositions, c = Math.min, d = Math.max, f = a.plotLeft, g = a.plotTop, h = a.plotHeight, p = a.plotWidth, r, l, m;
|
6806
|
+
var n = r = Number.POSITIVE_INFINITY;
|
6807
|
+
var t = l = Number.NEGATIVE_INFINITY;
|
6808
|
+
for (m = 0; m < b.length; m++) {
|
6809
|
+
var u = b[m][2];
|
6810
|
+
n = c(n, b[m][0] - u);
|
6811
|
+
t = d(t, b[m][0] + u);
|
6812
|
+
r = c(r, b[m][1] - u);
|
6813
|
+
l = d(l, b[m][1] + u);
|
6814
|
+
}
|
6815
|
+
m = [ t - n, l - r ];
|
6816
|
+
c = c.apply([], [ (p - f) / m[0], (h - g) / m[1] ]);
|
6817
|
+
if (1e-10 < Math.abs(c - 1)) {
|
6818
|
+
for (m = 0; m < b.length; m++) b[m][2] *= c;
|
6819
|
+
this.placeBubbles(b);
|
6820
|
+
} else a.diffY = h / 2 + g - r - (l - r) / 2, a.diffX = p / 2 + f - n - (t - n) / 2;
|
6821
|
+
},
|
6822
|
+
calculateZExtremes: function() {
|
6823
|
+
var a = this.options.zMin, b = this.options.zMax, c = Infinity, d = -Infinity;
|
6824
|
+
if (a && b) return [ a, b ];
|
6825
|
+
this.chart.series.forEach(function(a) {
|
6826
|
+
a.yData.forEach(function(a) {
|
6827
|
+
z(a) && (a > d && (d = a), a < c && (c = a));
|
6828
|
+
});
|
6829
|
+
});
|
6830
|
+
a = x(a, c);
|
6831
|
+
b = x(b, d);
|
6832
|
+
return [ a, b ];
|
6833
|
+
},
|
6834
|
+
getPointRadius: function() {
|
6835
|
+
var a = this, b = a.chart, c = a.options, d = c.useSimulation, f = Math.min(b.plotWidth, b.plotHeight), g = {}, h = [], p = b.allDataPoints, r, l, m, n;
|
6836
|
+
[ "minSize", "maxSize" ].forEach(function(a) {
|
6837
|
+
var b = parseInt(c[a], 10), e = /%$/.test(c[a]);
|
6838
|
+
g[a] = e ? f * b / 100 : b * Math.sqrt(p.length);
|
6839
|
+
});
|
6840
|
+
b.minRadius = r = g.minSize / Math.sqrt(p.length);
|
6841
|
+
b.maxRadius = l = g.maxSize / Math.sqrt(p.length);
|
6842
|
+
var t = d ? a.calculateZExtremes() : [ r, l ];
|
6843
|
+
(p || []).forEach(function(b, e) {
|
6844
|
+
m = d ? w(b[2], t[0], t[1]) : b[2];
|
6845
|
+
n = a.getRadius(t[0], t[1], r, l, m);
|
6846
|
+
0 === n && (n = null);
|
6847
|
+
p[e][2] = n;
|
6848
|
+
h.push(n);
|
6849
|
+
});
|
6850
|
+
a.radii = h;
|
6851
|
+
},
|
6852
|
+
redrawHalo: g.redrawHalo,
|
6853
|
+
onMouseDown: g.onMouseDown,
|
6854
|
+
onMouseMove: g.onMouseMove,
|
6855
|
+
onMouseUp: function(a) {
|
6856
|
+
if (a.fixedPosition && !a.removed) {
|
6857
|
+
var b, c, e = this.layout, d = this.parentNodeLayout;
|
6858
|
+
d && e.options.dragBetweenSeries && d.nodes.forEach(function(d) {
|
6859
|
+
a && a.marker && d !== a.series.parentNode && (b = e.getDistXY(a, d), c = e.vectorLength(b) - d.marker.radius - a.marker.radius,
|
6860
|
+
0 > c && (d.series.addPoint(t(a.options, {
|
6861
|
+
plotX: a.plotX,
|
6862
|
+
plotY: a.plotY
|
6863
|
+
}), !1), e.removeElementFromCollection(a, e.nodes), a.remove()));
|
6864
|
+
});
|
6865
|
+
g.onMouseUp.apply(this, arguments);
|
6866
|
+
}
|
6867
|
+
},
|
6868
|
+
destroy: function() {
|
6869
|
+
this.chart.graphLayoutsLookup && this.chart.graphLayoutsLookup.forEach(function(a) {
|
6870
|
+
a.removeElementFromCollection(this, a.series);
|
6871
|
+
}, this);
|
6872
|
+
this.parentNode && (this.parentNodeLayout.removeElementFromCollection(this.parentNode, this.parentNodeLayout.nodes),
|
6873
|
+
this.parentNode.dataLabel && (this.parentNode.dataLabel = this.parentNode.dataLabel.destroy()));
|
6874
|
+
f.Series.prototype.destroy.apply(this, arguments);
|
6875
|
+
},
|
6876
|
+
alignDataLabel: f.Series.prototype.alignDataLabel
|
6877
|
+
}, {
|
6878
|
+
destroy: function() {
|
6879
|
+
this.series.layout && this.series.layout.removeElementFromCollection(this, this.series.layout.nodes);
|
6880
|
+
return c.prototype.destroy.apply(this, arguments);
|
6881
|
+
}
|
6882
|
+
});
|
6883
|
+
v(r, "beforeRedraw", function() {
|
6884
|
+
this.allDataPoints && delete this.allDataPoints;
|
6885
|
+
});
|
6886
|
+
});
|
6887
|
+
E(f, "parts-more/Polar.js", [ f["parts/Globals.js"], f["parts/Utilities.js"], f["parts-more/Pane.js"] ], function(f, a, c) {
|
6888
|
+
var b = a.addEvent, l = a.defined, v = a.find, w = a.pick, z = a.splat, y = a.uniqueKey, d = a.wrap, m = f.Series, n = f.seriesTypes, t = m.prototype, x = f.Pointer.prototype;
|
6889
|
+
t.searchPointByAngle = function(a) {
|
6890
|
+
var b = this.chart, c = this.xAxis.pane.center;
|
6891
|
+
return this.searchKDTree({
|
6892
|
+
clientX: 180 + -180 / Math.PI * Math.atan2(a.chartX - c[0] - b.plotLeft, a.chartY - c[1] - b.plotTop)
|
6893
|
+
});
|
6894
|
+
};
|
6895
|
+
t.getConnectors = function(a, b, c, d) {
|
6896
|
+
var e = d ? 1 : 0;
|
6897
|
+
var f = 0 <= b && b <= a.length - 1 ? b : 0 > b ? a.length - 1 + b : 0;
|
6898
|
+
b = 0 > f - 1 ? a.length - (1 + e) : f - 1;
|
6899
|
+
e = f + 1 > a.length - 1 ? e : f + 1;
|
6900
|
+
var g = a[b];
|
6901
|
+
e = a[e];
|
6902
|
+
var h = g.plotX;
|
6903
|
+
g = g.plotY;
|
6904
|
+
var p = e.plotX;
|
6905
|
+
var r = e.plotY;
|
6906
|
+
e = a[f].plotX;
|
6907
|
+
f = a[f].plotY;
|
6908
|
+
h = (1.5 * e + h) / 2.5;
|
6909
|
+
g = (1.5 * f + g) / 2.5;
|
6910
|
+
p = (1.5 * e + p) / 2.5;
|
6911
|
+
var l = (1.5 * f + r) / 2.5;
|
6912
|
+
r = Math.sqrt(Math.pow(h - e, 2) + Math.pow(g - f, 2));
|
6913
|
+
var m = Math.sqrt(Math.pow(p - e, 2) + Math.pow(l - f, 2));
|
6914
|
+
h = Math.atan2(g - f, h - e);
|
6915
|
+
l = Math.PI / 2 + (h + Math.atan2(l - f, p - e)) / 2;
|
6916
|
+
Math.abs(h - l) > Math.PI / 2 && (l -= Math.PI);
|
6917
|
+
h = e + Math.cos(l) * r;
|
6918
|
+
g = f + Math.sin(l) * r;
|
6919
|
+
p = e + Math.cos(Math.PI + l) * m;
|
6920
|
+
l = f + Math.sin(Math.PI + l) * m;
|
6921
|
+
e = {
|
6922
|
+
rightContX: p,
|
6923
|
+
rightContY: l,
|
6924
|
+
leftContX: h,
|
6925
|
+
leftContY: g,
|
6926
|
+
plotX: e,
|
6927
|
+
plotY: f
|
6928
|
+
};
|
6929
|
+
c && (e.prevPointCont = this.getConnectors(a, b, !1, d));
|
6930
|
+
return e;
|
6931
|
+
};
|
6932
|
+
t.toXY = function(a) {
|
6933
|
+
var b = this.chart, c = this.xAxis;
|
6934
|
+
var d = this.yAxis;
|
6935
|
+
var e = a.plotX, f = a.plotY, l = a.series, r = b.inverted, m = a.y, n = r ? e : d.len - f;
|
6936
|
+
r && l && !l.isRadialBar && (a.plotY = f = "number" === typeof m ? d.translate(m) || 0 : 0);
|
6937
|
+
a.rectPlotX = e;
|
6938
|
+
a.rectPlotY = f;
|
6939
|
+
d.center && (n += d.center[3] / 2);
|
6940
|
+
d = r ? d.postTranslate(f, n) : c.postTranslate(e, n);
|
6941
|
+
a.plotX = a.polarPlotX = d.x - b.plotLeft;
|
6942
|
+
a.plotY = a.polarPlotY = d.y - b.plotTop;
|
6943
|
+
this.kdByAngle ? (b = (e / Math.PI * 180 + c.pane.options.startAngle) % 360, 0 > b && (b += 360),
|
6944
|
+
a.clientX = b) : a.clientX = a.plotX;
|
6945
|
+
};
|
6946
|
+
n.spline && (d(n.spline.prototype, "getPointSpline", function(a, b, c, d) {
|
6947
|
+
this.chart.polar ? d ? (a = this.getConnectors(b, d, !0, this.connectEnds), a = [ "C", a.prevPointCont.rightContX, a.prevPointCont.rightContY, a.leftContX, a.leftContY, a.plotX, a.plotY ]) : a = [ "M", c.plotX, c.plotY ] : a = a.call(this, b, c, d);
|
6948
|
+
return a;
|
6949
|
+
}), n.areasplinerange && (n.areasplinerange.prototype.getPointSpline = n.spline.prototype.getPointSpline));
|
6950
|
+
b(m, "afterTranslate", function() {
|
6951
|
+
var a = this.chart;
|
6952
|
+
if (a.polar && this.xAxis) {
|
6953
|
+
(this.kdByAngle = a.tooltip && a.tooltip.shared) ? this.searchPoint = this.searchPointByAngle : this.options.findNearestPointBy = "xy";
|
6954
|
+
if (!this.preventPostTranslate) for (var c = this.points, d = c.length; d--; ) this.toXY(c[d]),
|
6955
|
+
!a.hasParallelCoordinates && !this.yAxis.reversed && c[d].y < this.yAxis.min && (c[d].isNull = !0);
|
6956
|
+
this.hasClipCircleSetter || (this.hasClipCircleSetter = !!this.eventsToUnbind.push(b(this, "afterRender", function() {
|
6957
|
+
if (a.polar) {
|
6958
|
+
var b = this.yAxis.pane.center;
|
6959
|
+
this.clipCircle ? this.clipCircle.animate({
|
6960
|
+
x: b[0],
|
6961
|
+
y: b[1],
|
6962
|
+
r: b[2] / 2,
|
6963
|
+
innerR: b[3] / 2
|
6964
|
+
}) : this.clipCircle = a.renderer.clipCircle(b[0], b[1], b[2] / 2, b[3] / 2);
|
6965
|
+
this.group.clip(this.clipCircle);
|
6966
|
+
this.setClip = f.noop;
|
6967
|
+
}
|
6968
|
+
})));
|
6969
|
+
}
|
6970
|
+
}, {
|
6971
|
+
order: 2
|
6972
|
+
});
|
6973
|
+
d(t, "getGraphPath", function(a, b) {
|
6974
|
+
var c = this, d;
|
6975
|
+
if (this.chart.polar) {
|
6976
|
+
b = b || this.points;
|
6977
|
+
for (d = 0; d < b.length; d++) if (!b[d].isNull) {
|
6978
|
+
var e = d;
|
6979
|
+
break;
|
6980
|
+
}
|
6981
|
+
if (!1 !== this.options.connectEnds && "undefined" !== typeof e) {
|
6982
|
+
this.connectEnds = !0;
|
6983
|
+
b.splice(b.length, 0, b[e]);
|
6984
|
+
var f = !0;
|
6985
|
+
}
|
6986
|
+
b.forEach(function(a) {
|
6987
|
+
"undefined" === typeof a.polarPlotY && c.toXY(a);
|
6988
|
+
});
|
6989
|
+
}
|
6990
|
+
d = a.apply(this, [].slice.call(arguments, 1));
|
6991
|
+
f && b.pop();
|
6992
|
+
return d;
|
6993
|
+
});
|
6994
|
+
var A = function(a, b) {
|
6995
|
+
var c = this, d = this.chart, e = this.options.animation, k = this.group, p = this.markerGroup, l = this.xAxis.center, m = d.plotLeft, r = d.plotTop, n, t, u, v;
|
6996
|
+
if (d.polar) {
|
6997
|
+
if (c.isRadialBar) b || (c.startAngleRad = w(c.translatedThreshold, c.xAxis.startAngleRad),
|
6998
|
+
f.seriesTypes.pie.prototype.animate.call(c, b)); else {
|
6999
|
+
if (d.renderer.isSVG) if (e = f.animObject(e), c.is("column")) {
|
7000
|
+
if (!b) {
|
7001
|
+
var x = l[3] / 2;
|
7002
|
+
c.points.forEach(function(a) {
|
7003
|
+
n = a.graphic;
|
7004
|
+
u = (t = a.shapeArgs) && t.r;
|
7005
|
+
v = t && t.innerR;
|
7006
|
+
n && t && (n.attr({
|
7007
|
+
r: x,
|
7008
|
+
innerR: x
|
7009
|
+
}), n.animate({
|
7010
|
+
r: u,
|
7011
|
+
innerR: v
|
7012
|
+
}, c.options.animation));
|
7013
|
+
});
|
7014
|
+
}
|
7015
|
+
} else b ? (a = {
|
7016
|
+
translateX: l[0] + m,
|
7017
|
+
translateY: l[1] + r,
|
7018
|
+
scaleX: .001,
|
7019
|
+
scaleY: .001
|
7020
|
+
}, k.attr(a), p && p.attr(a)) : (a = {
|
7021
|
+
translateX: m,
|
7022
|
+
translateY: r,
|
7023
|
+
scaleX: 1,
|
7024
|
+
scaleY: 1
|
7025
|
+
}, k.animate(a, e), p && p.animate(a, e));
|
7026
|
+
}
|
7027
|
+
} else a.call(this, b);
|
7028
|
+
};
|
7029
|
+
d(t, "animate", A);
|
7030
|
+
n.column && (m = n.arearange.prototype, n = n.column.prototype, n.polarArc = function(a, b, c, d) {
|
7031
|
+
var e = this.xAxis.center, f = this.yAxis.len, g = e[3] / 2;
|
7032
|
+
b = f - b + g;
|
7033
|
+
a = f - w(a, f) + g;
|
7034
|
+
this.yAxis.reversed && (0 > b && (b = g), 0 > a && (a = g));
|
7035
|
+
return {
|
7036
|
+
x: e[0],
|
7037
|
+
y: e[1],
|
7038
|
+
r: b,
|
7039
|
+
innerR: a,
|
7040
|
+
start: c,
|
7041
|
+
end: d
|
7042
|
+
};
|
7043
|
+
}, d(n, "animate", A), d(n, "translate", function(b) {
|
7044
|
+
var c = this.options, d = c.stacking, g = this.chart, e = this.xAxis, k = this.yAxis, m = k.reversed, r = k.center, n = e.startAngleRad, t = e.endAngleRad - n;
|
7045
|
+
this.preventPostTranslate = !0;
|
7046
|
+
b.call(this);
|
7047
|
+
if (e.isRadial) {
|
7048
|
+
b = this.points;
|
7049
|
+
e = b.length;
|
7050
|
+
var u = k.translate(k.min);
|
7051
|
+
var v = k.translate(k.max);
|
7052
|
+
c = c.threshold || 0;
|
7053
|
+
if (g.inverted && f.isNumber(c)) {
|
7054
|
+
var w = k.translate(c);
|
7055
|
+
l(w) && (0 > w ? w = 0 : w > t && (w = t), this.translatedThreshold = w + n);
|
7056
|
+
}
|
7057
|
+
for (;e--; ) {
|
7058
|
+
c = b[e];
|
7059
|
+
var x = c.barX;
|
7060
|
+
var y = c.x;
|
7061
|
+
var A = c.y;
|
7062
|
+
c.shapeType = "arc";
|
7063
|
+
if (g.inverted) {
|
7064
|
+
c.plotY = k.translate(A);
|
7065
|
+
if (d) {
|
7066
|
+
if (A = k.stacks[(0 > A ? "-" : "") + this.stackKey], this.visible && A && A[y] && !c.isNull) {
|
7067
|
+
var z = A[y].points[this.getStackIndicator(void 0, y, this.index).key];
|
7068
|
+
var D = k.translate(z[0]);
|
7069
|
+
z = k.translate(z[1]);
|
7070
|
+
l(D) && (D = a.clamp(D, 0, t));
|
7071
|
+
}
|
7072
|
+
} else D = w, z = c.plotY;
|
7073
|
+
D > z && (z = [ D, D = z ][0]);
|
7074
|
+
if (!m) {
|
7075
|
+
if (D < u) D = u; else if (z > v) z = v; else {
|
7076
|
+
if (z < u || D > v) D = z = 0;
|
7077
|
+
}
|
7078
|
+
} else if (z > u) z = u; else if (D < v) D = v; else if (D > u || z < v) D = z = t;
|
7079
|
+
k.min > k.max && (D = z = m ? t : 0);
|
7080
|
+
D += n;
|
7081
|
+
z += n;
|
7082
|
+
r && (c.barX = x += r[3] / 2);
|
7083
|
+
y = Math.max(x, 0);
|
7084
|
+
A = Math.max(x + c.pointWidth, 0);
|
7085
|
+
c.shapeArgs = {
|
7086
|
+
x: r && r[0],
|
7087
|
+
y: r && r[1],
|
7088
|
+
r: A,
|
7089
|
+
innerR: y,
|
7090
|
+
start: D,
|
7091
|
+
end: z
|
7092
|
+
};
|
7093
|
+
c.opacity = D === z ? 0 : void 0;
|
7094
|
+
c.plotY = (l(this.translatedThreshold) && (D < this.translatedThreshold ? D : z)) - n;
|
7095
|
+
} else D = x + n, c.shapeArgs = this.polarArc(c.yBottom, c.plotY, D, D + c.pointWidth);
|
7096
|
+
this.toXY(c);
|
7097
|
+
g.inverted ? (x = k.postTranslate(c.rectPlotY, x + c.pointWidth / 2), c.tooltipPos = [ x.x - g.plotLeft, x.y - g.plotTop ]) : c.tooltipPos = [ c.plotX, c.plotY ];
|
7098
|
+
r && (c.ttBelow = c.plotY > r[1]);
|
7099
|
+
}
|
7100
|
+
}
|
7101
|
+
}), n.findAlignments = function(a, b) {
|
7102
|
+
null === b.align && (b.align = 20 < a && 160 > a ? "left" : 200 < a && 340 > a ? "right" : "center");
|
7103
|
+
null === b.verticalAlign && (b.verticalAlign = 45 > a || 315 < a ? "bottom" : 135 < a && 225 > a ? "top" : "middle");
|
7104
|
+
return b;
|
7105
|
+
}, m && (m.findAlignments = n.findAlignments), d(n, "alignDataLabel", function(a, b, c, d, e, f) {
|
7106
|
+
var g = this.chart, h = w(d.inside, !!this.options.stacking);
|
7107
|
+
g.polar ? (a = b.rectPlotX / Math.PI * 180, g.inverted ? (this.forceDL = g.isInsidePlot(b.plotX, Math.round(b.plotY), !1),
|
7108
|
+
h && b.shapeArgs ? (e = b.shapeArgs, e = this.yAxis.postTranslate((e.start + e.end) / 2 - this.xAxis.startAngleRad, b.barX + b.pointWidth / 2),
|
7109
|
+
e = {
|
7110
|
+
x: e.x - g.plotLeft,
|
7111
|
+
y: e.y - g.plotTop
|
7112
|
+
}) : b.tooltipPos && (e = {
|
7113
|
+
x: b.tooltipPos[0],
|
7114
|
+
y: b.tooltipPos[1]
|
7115
|
+
}), d.align = w(d.align, "center"), d.verticalAlign = w(d.verticalAlign, "middle")) : this.findAlignments && (d = this.findAlignments(a, d)),
|
7116
|
+
t.alignDataLabel.call(this, b, c, d, e, f), this.isRadialBar && b.shapeArgs && b.shapeArgs.start === b.shapeArgs.end && c.hide(!0)) : a.call(this, b, c, d, e, f);
|
7117
|
+
}));
|
7118
|
+
d(x, "getCoordinates", function(a, b) {
|
7119
|
+
var c = this.chart, d = {
|
7120
|
+
xAxis: [],
|
7121
|
+
yAxis: []
|
7122
|
+
};
|
7123
|
+
c.polar ? c.axes.forEach(function(a) {
|
7124
|
+
var e = a.isXAxis, f = a.center;
|
7125
|
+
if ("colorAxis" !== a.coll) {
|
7126
|
+
var g = b.chartX - f[0] - c.plotLeft;
|
7127
|
+
f = b.chartY - f[1] - c.plotTop;
|
7128
|
+
d[e ? "xAxis" : "yAxis"].push({
|
7129
|
+
axis: a,
|
7130
|
+
value: a.translate(e ? Math.PI - Math.atan2(g, f) : Math.sqrt(Math.pow(g, 2) + Math.pow(f, 2)), !0)
|
7131
|
+
});
|
7132
|
+
}
|
7133
|
+
}) : d = a.call(this, b);
|
7134
|
+
return d;
|
7135
|
+
});
|
7136
|
+
f.SVGRenderer.prototype.clipCircle = function(a, b, c, d) {
|
7137
|
+
var e = y(), f = this.createElement("clipPath").attr({
|
7138
|
+
id: e
|
7139
|
+
}).add(this.defs);
|
7140
|
+
a = d ? this.arc(a, b, c, d, 0, 2 * Math.PI).add(f) : this.circle(a, b, c).add(f);
|
7141
|
+
a.id = e;
|
7142
|
+
a.clipPath = f;
|
7143
|
+
return a;
|
7144
|
+
};
|
7145
|
+
b(f.Chart, "getAxes", function() {
|
7146
|
+
this.pane || (this.pane = []);
|
7147
|
+
z(this.options.pane).forEach(function(a) {
|
7148
|
+
new c(a, this);
|
7149
|
+
}, this);
|
7150
|
+
});
|
7151
|
+
b(f.Chart, "afterDrawChartBox", function() {
|
7152
|
+
this.pane.forEach(function(a) {
|
7153
|
+
a.render();
|
7154
|
+
});
|
7155
|
+
});
|
7156
|
+
b(f.Series, "afterInit", function() {
|
7157
|
+
var a = this.chart;
|
7158
|
+
a.inverted && a.polar && (this.isRadialSeries = !0, this.is("column") && (this.isRadialBar = !0));
|
7159
|
+
});
|
7160
|
+
d(f.Chart.prototype, "get", function(a, b) {
|
7161
|
+
return v(this.pane, function(a) {
|
7162
|
+
return a.options.id === b;
|
7163
|
+
}) || a.call(this, b);
|
7164
|
+
});
|
7165
|
+
});
|
7166
|
+
E(f, "masters/highcharts-more.src.js", [], function() {});
|
7167
|
+
});
|
7168
|
+
});
|
7169
|
+
|
7170
|
+
var Highcharts$1 = window.Highcharts;
|
7171
|
+
|
7172
|
+
var $$4 = window.$;
|
7173
|
+
|
7174
|
+
highchartsMore(Highcharts$1);
|
7175
|
+
|
7176
|
+
var _default$a = function(_Controller) {
|
7177
|
+
_inherits(_default, _Controller);
|
7178
|
+
var _super = _createSuper(_default);
|
7179
|
+
function _default() {
|
7180
|
+
_classCallCheck(this, _default);
|
7181
|
+
return _super.apply(this, arguments);
|
7182
|
+
}
|
7183
|
+
_createClass(_default, [ {
|
7184
|
+
key: "connect",
|
7185
|
+
value: function connect() {
|
7186
|
+
var _this = this;
|
7187
|
+
$$4.getJSON(this.data.get("url"), function(data) {
|
7188
|
+
Highcharts$1.chart(_this.element, {
|
7189
|
+
chart: {
|
7190
|
+
scrollablePlotArea: {
|
7191
|
+
minWidth: 600,
|
7192
|
+
scrollPositionX: 1
|
7193
|
+
}
|
7194
|
+
},
|
7195
|
+
title: {
|
7196
|
+
text: "",
|
7197
|
+
align: "left"
|
7198
|
+
},
|
7199
|
+
subtitle: {
|
7200
|
+
text: "",
|
7201
|
+
align: "left"
|
7202
|
+
},
|
7203
|
+
xAxis: {
|
7204
|
+
title: {
|
7205
|
+
text: "D/P creatinine (4hrs)"
|
7206
|
+
},
|
7207
|
+
type: "linear",
|
7208
|
+
labels: {
|
7209
|
+
overflow: "justify"
|
7210
|
+
},
|
7211
|
+
plotBands: [ {
|
7212
|
+
from: .3,
|
7213
|
+
to: .5,
|
7214
|
+
color: "rgba(68, 170, 213, 0.1)",
|
7215
|
+
label: {
|
7216
|
+
text: "Low",
|
7217
|
+
style: {
|
7218
|
+
color: "#606060"
|
7219
|
+
}
|
7220
|
+
}
|
7221
|
+
}, {
|
7222
|
+
from: .5,
|
7223
|
+
to: .65,
|
7224
|
+
color: "rgba(0, 0, 0, 0)",
|
7225
|
+
label: {
|
7226
|
+
text: "Low average",
|
7227
|
+
style: {
|
7228
|
+
color: "#606060"
|
7229
|
+
}
|
7230
|
+
}
|
7231
|
+
}, {
|
7232
|
+
from: .65,
|
7233
|
+
to: .82,
|
7234
|
+
color: "rgba(68, 170, 213, 0.1)",
|
7235
|
+
label: {
|
7236
|
+
text: "High average",
|
7237
|
+
style: {
|
7238
|
+
color: "#606060"
|
7239
|
+
}
|
7240
|
+
}
|
7241
|
+
}, {
|
7242
|
+
from: .82,
|
7243
|
+
to: 1,
|
7244
|
+
color: "rgba(0, 0, 0, 0)",
|
7245
|
+
label: {
|
7246
|
+
text: "High",
|
7247
|
+
style: {
|
7248
|
+
color: "#606060"
|
7249
|
+
}
|
7250
|
+
}
|
7251
|
+
} ]
|
7252
|
+
},
|
7253
|
+
yAxis: {
|
7254
|
+
title: {
|
7255
|
+
text: "Net Ultrafiltration (mls)"
|
7256
|
+
},
|
7257
|
+
tickInterval: 200,
|
7258
|
+
minorGridLineWidth: 0,
|
7259
|
+
gridLineWidth: 0,
|
7260
|
+
alternateGridColor: null,
|
7261
|
+
floor: -600,
|
7262
|
+
plotLines: [ {
|
7263
|
+
color: "#BBB",
|
7264
|
+
width: 1,
|
7265
|
+
value: 0
|
7266
|
+
} ]
|
7267
|
+
},
|
7268
|
+
tooltip: {
|
7269
|
+
formatter: function formatter() {
|
7270
|
+
return "<br>D_Pcr <b>" + this.x + "</b><br>" + "netUF <b>" + this.y + "</b>";
|
7271
|
+
}
|
7272
|
+
},
|
7273
|
+
plotOptions: {
|
7274
|
+
pointStart: .3,
|
7275
|
+
line: {
|
7276
|
+
dataLabels: {
|
7277
|
+
enabled: true,
|
7278
|
+
format: "{point.index}",
|
7279
|
+
style: {
|
7280
|
+
fontSize: "15px"
|
7281
|
+
}
|
7282
|
+
}
|
7283
|
+
},
|
7284
|
+
series: {
|
7285
|
+
enableMouseTracking: false
|
7286
|
+
},
|
7287
|
+
dataLabels: {
|
7288
|
+
enabled: true,
|
7289
|
+
style: {
|
7290
|
+
fontWeight: "bold"
|
7291
|
+
}
|
7292
|
+
}
|
7293
|
+
},
|
7294
|
+
series: [ {
|
7295
|
+
name: "Expected",
|
7296
|
+
color: "#00a499",
|
7297
|
+
showInLegend: true,
|
7298
|
+
type: "polygon",
|
7299
|
+
data: [ [ .36, 400 ], [ .36, 1e3 ], [ .5, 1e3 ], [ .9, 600 ], [ .9, 300 ], [ .6, 100 ], [ .36, 400 ] ]
|
7300
|
+
}, {
|
7301
|
+
name: "Warning",
|
7302
|
+
color: "#fff495",
|
7303
|
+
showInLegend: true,
|
7304
|
+
type: "polygon",
|
7305
|
+
data: [ [ .6, 100 ], [ .9, 300 ], [ 1, 200 ], [ 1, -600 ], [ .75, -600 ], [ .6, 100 ] ]
|
7306
|
+
}, {
|
7307
|
+
color: "#040481",
|
7308
|
+
showInLegend: false,
|
7309
|
+
enableMouseTracking: true,
|
7310
|
+
data: data
|
7311
|
+
} ],
|
7312
|
+
navigation: {
|
7313
|
+
menuItemStyle: {
|
7314
|
+
fontSize: "10px"
|
7315
|
+
}
|
7316
|
+
}
|
7317
|
+
});
|
7318
|
+
_this.element.style.overflow = "unset";
|
7319
|
+
});
|
7320
|
+
}
|
7321
|
+
} ]);
|
7322
|
+
return _default;
|
7323
|
+
}(Controller);
|
7324
|
+
|
7325
|
+
var _default$b = function(_Controller) {
|
7326
|
+
_inherits(_default, _Controller);
|
7327
|
+
var _super = _createSuper(_default);
|
7328
|
+
function _default() {
|
7329
|
+
_classCallCheck(this, _default);
|
7330
|
+
return _super.apply(this, arguments);
|
7331
|
+
}
|
7332
|
+
_createClass(_default, [ {
|
7333
|
+
key: "connect",
|
7334
|
+
value: function connect() {
|
7335
|
+
console.log("Not implemented");
|
7336
|
+
}
|
7337
|
+
} ]);
|
7338
|
+
return _default;
|
7339
|
+
}(Controller);
|
7340
|
+
|
7341
|
+
_defineProperty(_default$b, "targets", [ "chart" ]);
|
7342
|
+
|
4206
7343
|
var application = Application.start();
|
4207
7344
|
|
4208
7345
|
application.register("toggle", _default);
|
@@ -4221,4 +7358,12 @@ application.register("charts", _default$6);
|
|
4221
7358
|
|
4222
7359
|
application.register("session", _default$7);
|
4223
7360
|
|
7361
|
+
application.register("simple-toggle", _default$8);
|
7362
|
+
|
7363
|
+
application.register("tabs", _default$9);
|
7364
|
+
|
7365
|
+
application.register("pd-pet-chart", _default$a);
|
7366
|
+
|
7367
|
+
application.register("pathology-sparklines", _default$b);
|
7368
|
+
|
4224
7369
|
window.Chartkick.use(window.Highcharts);
|