/* * This file belongs to Hoist, an application development toolkit * developed by Extremely Heavy Industries (www.xh.io | info@xh.io) * * Copyright © 2026 Extremely Heavy Industries Inc. */ import {checkVersion, logError} from '@xh/hoist/utils/js'; export let Highcharts = null; const MIN_VERSION = '12.4.0'; const MAX_VERSION = '12.*.*'; /** * Expose application versions of Highcharts to Hoist. * Typically called in the Bootstrap.js. of the application. */ export function installHighcharts(HighchartsImpl) { const {version} = HighchartsImpl; if (!checkVersion(version, MIN_VERSION, MAX_VERSION)) { logError( `This version of Hoist requires a Highcharts version between ${MIN_VERSION} and ` + `${MAX_VERSION}. Version ${version} detected. Highcharts will be unavailable.` ); return; } HighchartsImpl.setOptions({ time: { timezone: undefined }, lang: { thousandsSep: ',', // Repace default SI abbrev "G" (giga) with "b" for billions and lowercase "m" + "t" numericSymbols: ['k', 'm', 'b', 't'] } }); Highcharts = HighchartsImpl; }