@deephaven/chart 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ChartTheme.d.ts +1 -0
- package/dist/ChartTheme.d.ts.map +1 -1
- package/dist/ChartTheme.js +3 -1
- package/dist/ChartTheme.js.map +1 -1
- package/dist/ChartTheme.module.css +2 -0
- package/dist/ChartTheme.module.css.map +1 -1
- package/dist/ChartUtils.d.ts.map +1 -1
- package/dist/ChartUtils.js +5 -1
- package/dist/ChartUtils.js.map +1 -1
- package/package.json +3 -3
package/dist/ChartTheme.d.ts
CHANGED
package/dist/ChartTheme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartTheme.d.ts","sourceRoot":"","sources":["../src/ChartTheme.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IAEtB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IAGxB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IAGpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ChartTheme.d.ts","sourceRoot":"","sources":["../src/ChartTheme.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IAEtB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IAGxB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IAGpB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IAGxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,iBAAiB,IAAI,QAAQ,CAAC,UAAU,CAAC,CA0CxD;AAED,eAAe,iBAAiB,CAAC"}
|
package/dist/ChartTheme.js
CHANGED
|
@@ -37,7 +37,9 @@ export function defaultChartTheme() {
|
|
|
37
37
|
// Indicator
|
|
38
38
|
indicator_increasing: chartTheme['indicator-increasing'],
|
|
39
39
|
indicator_decreasing: chartTheme['indicator-decreasing'],
|
|
40
|
-
indicator_gauge: chartTheme['indicator-gauge']
|
|
40
|
+
indicator_gauge: chartTheme['indicator-gauge'],
|
|
41
|
+
// Map
|
|
42
|
+
map_style: chartTheme['map-style']
|
|
41
43
|
});
|
|
42
44
|
}
|
|
43
45
|
export default defaultChartTheme;
|
package/dist/ChartTheme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartTheme.js","names":["getExpressionRanges","resolveCssVariablesInRecord","Log","ColorUtils","chartThemeRaw","log","module","defaultChartTheme","_chartTheme$colorway","chartTheme","colorway","map","_ref","start","end","normalizeCssColor","substring","join","debug2","Object","freeze","paper_bgcolor","plot_bgcolor","title_color","legend_color","gridcolor","linecolor","zerolinecolor","error_band_line_color","ohlc_increasing","ohlc_decreasing","coastline_color","land_color","ocean_color","lake_color","river_color","indicator_increasing","indicator_decreasing","indicator_gauge"],"sources":["../src/ChartTheme.ts"],"sourcesContent":["import {\n getExpressionRanges,\n resolveCssVariablesInRecord,\n} from '@deephaven/components';\nimport Log from '@deephaven/log';\nimport { ColorUtils } from '@deephaven/utils';\nimport chartThemeRaw from './ChartTheme.module.scss';\n\nconst log = Log.module('ChartTheme');\n\nexport interface ChartTheme {\n paper_bgcolor: string;\n plot_bgcolor: string;\n title_color: string;\n legend_color: string;\n colorway: string;\n gridcolor: string;\n linecolor: string;\n zerolinecolor: string;\n\n error_band_line_color: string;\n ohlc_increasing: string;\n ohlc_decreasing: string;\n\n // Geo\n coastline_color: string;\n land_color: string;\n ocean_color: string;\n lake_color: string;\n river_color: string;\n\n // Indicator\n indicator_increasing: string;\n indicator_decreasing: string;\n indicator_gauge: string;\n}\n\nexport function defaultChartTheme(): Readonly<ChartTheme> {\n const chartTheme = resolveCssVariablesInRecord(chartThemeRaw);\n\n // The color normalization in `resolveCssVariablesInRecord` won't work for\n // colorway since it is an array of colors. We need to explicitly normalize\n // each color expression\n chartTheme.colorway = getExpressionRanges(chartTheme.colorway ?? '')\n .map(([start, end]) =>\n ColorUtils.normalizeCssColor(\n chartTheme.colorway.substring(start, end + 1)\n )\n )\n .join(' ');\n\n log.debug2('Chart theme:', chartThemeRaw);\n log.debug2('Chart theme derived:', chartTheme);\n\n return Object.freeze({\n paper_bgcolor: chartTheme['paper-bgcolor'],\n plot_bgcolor: chartTheme['plot-bgcolor'],\n title_color: chartTheme['title-color'],\n legend_color: chartTheme['legend-color'],\n colorway: chartTheme.colorway,\n gridcolor: chartTheme.gridcolor,\n linecolor: chartTheme.linecolor,\n zerolinecolor: chartTheme.zerolinecolor,\n error_band_line_color: chartTheme['error-band-line-color'],\n ohlc_increasing: chartTheme['ohlc-increasing'],\n ohlc_decreasing: chartTheme['ohlc-decreasing'],\n // Geo\n coastline_color: chartTheme['coastline-color'],\n land_color: chartTheme['land-color'],\n ocean_color: chartTheme['ocean-color'],\n lake_color: chartTheme['lake-color'],\n river_color: chartTheme['river-color'],\n // Indicator\n indicator_increasing: chartTheme['indicator-increasing'],\n indicator_decreasing: chartTheme['indicator-decreasing'],\n indicator_gauge: chartTheme['indicator-gauge'],\n });\n}\n\nexport default defaultChartTheme;\n"],"mappings":"AAAA,SACEA,mBAAmB,EACnBC,2BAA2B,QACtB,uBAAuB;AAC9B,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAASC,UAAU,QAAQ,kBAAkB;AAAC,OACvCC,aAAa;AAEpB,IAAMC,GAAG,GAAGH,GAAG,CAACI,MAAM,CAAC,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ChartTheme.js","names":["getExpressionRanges","resolveCssVariablesInRecord","Log","ColorUtils","chartThemeRaw","log","module","defaultChartTheme","_chartTheme$colorway","chartTheme","colorway","map","_ref","start","end","normalizeCssColor","substring","join","debug2","Object","freeze","paper_bgcolor","plot_bgcolor","title_color","legend_color","gridcolor","linecolor","zerolinecolor","error_band_line_color","ohlc_increasing","ohlc_decreasing","coastline_color","land_color","ocean_color","lake_color","river_color","indicator_increasing","indicator_decreasing","indicator_gauge","map_style"],"sources":["../src/ChartTheme.ts"],"sourcesContent":["import {\n getExpressionRanges,\n resolveCssVariablesInRecord,\n} from '@deephaven/components';\nimport Log from '@deephaven/log';\nimport { ColorUtils } from '@deephaven/utils';\nimport chartThemeRaw from './ChartTheme.module.scss';\n\nconst log = Log.module('ChartTheme');\n\nexport interface ChartTheme {\n paper_bgcolor: string;\n plot_bgcolor: string;\n title_color: string;\n legend_color: string;\n colorway: string;\n gridcolor: string;\n linecolor: string;\n zerolinecolor: string;\n\n error_band_line_color: string;\n ohlc_increasing: string;\n ohlc_decreasing: string;\n\n // Geo\n coastline_color: string;\n land_color: string;\n ocean_color: string;\n lake_color: string;\n river_color: string;\n\n // Indicator\n indicator_increasing: string;\n indicator_decreasing: string;\n indicator_gauge: string;\n\n // Map\n map_style: string;\n}\n\nexport function defaultChartTheme(): Readonly<ChartTheme> {\n const chartTheme = resolveCssVariablesInRecord(chartThemeRaw);\n\n // The color normalization in `resolveCssVariablesInRecord` won't work for\n // colorway since it is an array of colors. We need to explicitly normalize\n // each color expression\n chartTheme.colorway = getExpressionRanges(chartTheme.colorway ?? '')\n .map(([start, end]) =>\n ColorUtils.normalizeCssColor(\n chartTheme.colorway.substring(start, end + 1)\n )\n )\n .join(' ');\n\n log.debug2('Chart theme:', chartThemeRaw);\n log.debug2('Chart theme derived:', chartTheme);\n\n return Object.freeze({\n paper_bgcolor: chartTheme['paper-bgcolor'],\n plot_bgcolor: chartTheme['plot-bgcolor'],\n title_color: chartTheme['title-color'],\n legend_color: chartTheme['legend-color'],\n colorway: chartTheme.colorway,\n gridcolor: chartTheme.gridcolor,\n linecolor: chartTheme.linecolor,\n zerolinecolor: chartTheme.zerolinecolor,\n error_band_line_color: chartTheme['error-band-line-color'],\n ohlc_increasing: chartTheme['ohlc-increasing'],\n ohlc_decreasing: chartTheme['ohlc-decreasing'],\n // Geo\n coastline_color: chartTheme['coastline-color'],\n land_color: chartTheme['land-color'],\n ocean_color: chartTheme['ocean-color'],\n lake_color: chartTheme['lake-color'],\n river_color: chartTheme['river-color'],\n // Indicator\n indicator_increasing: chartTheme['indicator-increasing'],\n indicator_decreasing: chartTheme['indicator-decreasing'],\n indicator_gauge: chartTheme['indicator-gauge'],\n // Map\n map_style: chartTheme['map-style'],\n });\n}\n\nexport default defaultChartTheme;\n"],"mappings":"AAAA,SACEA,mBAAmB,EACnBC,2BAA2B,QACtB,uBAAuB;AAC9B,OAAOC,GAAG,MAAM,gBAAgB;AAChC,SAASC,UAAU,QAAQ,kBAAkB;AAAC,OACvCC,aAAa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IAC9C;IACAsB,eAAe,EAAEtB,UAAU,CAAC,iBAAiB,CAAC;IAC9CuB,UAAU,EAAEvB,UAAU,CAAC,YAAY,CAAC;IACpCwB,WAAW,EAAExB,UAAU,CAAC,aAAa,CAAC;IACtCyB,UAAU,EAAEzB,UAAU,CAAC,YAAY,CAAC;IACpC0B,WAAW,EAAE1B,UAAU,CAAC,aAAa,CAAC;IACtC;IACA2B,oBAAoB,EAAE3B,UAAU,CAAC,sBAAsB,CAAC;IACxD4B,oBAAoB,EAAE5B,UAAU,CAAC,sBAAsB,CAAC;IACxD6B,eAAe,EAAE7B,UAAU,CAAC,iBAAiB,CAAC;IAC9C;IACA8B,SAAS,EAAE9B,UAAU,CAAC,WAAW;EACnC,CAAC,CAAC;AACJ;AAEA,eAAeF,iBAAiB","ignoreList":[]}
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
indicator-increasing: var(--dh-color-chart-indicator-increase);
|
|
24
24
|
indicator-decreasing: var(--dh-color-chart-indicator-decrease);
|
|
25
25
|
indicator-gauge: var(--dh-color-chart-indicator-gauge);
|
|
26
|
+
/* Map */
|
|
27
|
+
map-style: var(--dh-color-chart-map-style);
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
/*# sourceMappingURL=ChartTheme.module.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../src/ChartTheme.module.scss","../../../node_modules/@deephaven/components/scss/custom.scss","../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss"],"names":[],"mappings":"AAAA;ACAA;AC6LA;AF1LA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;EACA;AAEA;EACA;EACA;EACA","file":"ChartTheme.module.css","sourcesContent":["/* stylelint-disable */\n@import '@deephaven/components/scss/custom.scss';\n\n:export {\n paper-bgcolor: var(--dh-color-chart-bg);\n plot-bgcolor: var(--dh-color-chart-plot-bg);\n title-color: var(--dh-color-chart-title);\n legend-color: var(--dh-color-chart-legend-fg);\n colorway: var(--dh-color-chart-colorway);\n gridcolor: var(--dh-color-chart-grid);\n linecolor: var(--dh-color-chart-axis-line);\n zerolinecolor: var(--dh-color-chart-axis-line-zero);\n\n error-band-line-color: var(--dh-color-chart-error-band-line);\n ohlc-increasing: var(--dh-color-chart-ohlc-increase);\n ohlc-decreasing: var(--dh-color-chart-ohlc-decrease);\n\n /* Geo */\n coastline-color: var(--dh-color-chart-geo-coastline);\n land-color: var(--dh-color-chart-geo-land);\n ocean-color: var(--dh-color-chart-geo-ocean);\n lake-color: var(--dh-color-chart-geo-lake);\n river-color: var(--dh-color-chart-geo-river);\n\n /* Indicator */\n indicator-increasing: var(--dh-color-chart-indicator-increase);\n indicator-decreasing: var(--dh-color-chart-indicator-decrease);\n indicator-gauge: var(--dh-color-chart-indicator-gauge);\n}\n","/* stylelint-disable scss/at-import-no-partial-leading-underscore */\n// Consumers should be able to resolve bootstrap/ to node_modules/bootstrap\n\n//Make bootstrap functions available for use in overrides\n@import 'bootstrap/scss/_functions.scss';\n@import './bootstrap_overrides.scss';\n\n//_variable imports come after bootstrap default overrides,\n// makes all other variables and mixins from bootstrap available\n/// with just importing customer.scss\n@import 'bootstrap/scss/_variables.scss';\n@import 'bootstrap/scss/_mixins.scss';\n\n//New variables come after imports\n@import './new_variables.scss';\n@import './util.scss';\n","// Styling overrides for bootstrap\n@use 'sass:map';\n\n// Override / set color variables\n$red: var(--dh-color-visual-red);\n$orange: var(--dh-color-visual-orange);\n$yellow: var(--dh-color-visual-yellow);\n$green: var(--dh-color-visual-green);\n$blue: var(--dh-color-visual-blue);\n$purple: var(--dh-color-visual-purple);\n\n// Fallback colors are used if theme isn't loaded\n// this is required for error messages if the API doesn't load\n\n//Define our Gray scale\n$gray-100: var(--dh-color-gray-900, #fcfcfa);\n$gray-200: var(--dh-color-gray-800);\n$gray-300: var(--dh-color-gray-700);\n$gray-400: var(--dh-color-gray-600);\n$gray-500: var(--dh-color-gray-500);\n// intentional duplicate, scale doesn't line up otherwise\n// as we have gray-850 and spectrum doesn't and it is needed\n$gray-600: var(--dh-color-gray-500);\n$gray-700: var(--dh-color-gray-400);\n$gray-800: var(--dh-color-gray-300);\n$gray-850: var(--dh-color-gray-200);\n$gray-900: var(--dh-color-gray-75);\n$black: var(--dh-color-black, #1a171a);\n$white: var(--dh-color-white, #f0f0ee);\n\n//Define some UI colors\n$interfacegray: var(--dh-color-content-bg, #2d2a2e);\n$interfaceblue: var(--dh-color-accent-bg);\n$interfacewhite: $white;\n$interfaceblack: $black;\n$content-bg: var(--dh-color-content-bg, #2d2a2e);\n$background: var(--dh-color-bg, #1a171a);\n$foreground: var(--dh-color-fg, #f0f0ee);\n\n// Extend default Bootstrap $grays map\n$grays-custom: (\n '850': $gray-850,\n);\n$grays: () !default;\n$grays: map-merge($grays, $grays-custom);\n\n// Extend default Bootstrap $colors map\n$colors-custom: (\n 'black': $black,\n);\n$colors: () !default;\n$colors: map-merge($colors, $colors-custom);\n\n// Override default Bootstrap $theme-colors map by mapping each key to itself.\n// These will then be re-mapped inside of `button-outline-variant` and\n// `button-outline-variant` mixins in `bootstrap_override_mixins_buttons.scss`\n$theme-colors-self-map: ();\n@each $key\n in (\n 'primary',\n 'secondary',\n 'success',\n 'info',\n 'warning',\n 'danger',\n 'light',\n 'dark'\n )\n{\n $theme-colors-self-map: map.set($theme-colors-self-map, $key, $key);\n}\n$theme-colors: () !default;\n$theme-colors: map-merge($theme-colors, $theme-colors-self-map);\n\n// Used by bootstrap_override_mixins_buttons.scss to map Bootstrap colors to\n// DH semantic colors\n$bootstrap-dh-semantic-map: (\n 'primary': 'accent',\n 'secondary': 'neutral',\n 'success': 'positive',\n 'info': 'info',\n 'warning': 'notice',\n 'danger': 'negative',\n // We shouldn't be using these, but mapping so they work with our custom\n // `color-yiq` mixin. If we find a way to remove $light + $dark that are\n // defined in Bootstrap _variables.scss, we should remove these\n 'light': 'neutral',\n 'dark': 'neutral',\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: var(--dh-color-accent-bg);\n$primary-hover: var(--dh-color-accent-hover-bg);\n$primary-dark: var(--dh-color-accent-down-bg);\n$secondary: var(--dh-color-neutral-bg);\n$secondary-hover: var(--dh-color-neutral-hover-bg);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: var(--dh-color-negative-bg);\n$danger-hover: var(--dh-color-negative-hover-bg);\n// We really don't want to use $light or $dark variables, but Bootstrap defines\n// them in _variables.scss. Explicitly setting them to ensure we are in control\n// of their values. If we can find a way to remove them, we should\n$light: var(--dh-color-gray-light);\n$dark: var(--dh-color-gray-dark);\n// Bootstrap doesn't define $mid, and we want to move away from this particular\n// semantic. Should be deleted by #1635\n$mid: var(--dh-color-gray-mid);\n\n$semantic-colors: (\n 'primary-hover': $primary-hover,\n 'primary-dark': $primary-dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n 'secondary-hover': $secondary-hover,\n 'danger-hover': $danger-hover,\n);\n\n$component-active-bg: $primary;\n$theme-color-interval: 9%;\n$yiq-contrasted-threshold: 180;\n\n// Override fonts\n$font-family-sans-serif:\n 'Fira Sans',\n -apple-system,\n blinkmacsystemfont,\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n arial,\n sans-serif; //fira sans then native system ui fallbacks\n$font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',\n 'Courier New', monospace;\n$font-family-base: $font-family-sans-serif;\n\n$headings-font-weight: 400;\n\n//Text overides\n$text-muted: $gray-400;\n\n//Style Selection highlight color\n$text-select-color: var(--dh-color-text-highlight);\n\n//Grid variables, same value as default just making easily accessible\n$grid-gutter-width: 30px;\n\n//Visual Overrides\n$border-radius: 4px;\n$box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);\n\n//Override Btn\n$btn-border-radius: 4rem;\n$btn-padding-x: 1.5rem;\n$btn-transition:\n color 0.12s ease-in-out,\n background-color 0.12s ease-in-out,\n border-color 0.12s ease-in-out,\n box-shadow 0.12s ease-in-out; //default 0.15 is too long\n$btn-border-width: 2px;\n$btn-font-weight: var(--spectrum-global-font-weight-bold);\n$btn-line-height: 1.3;\n\n//Override Inputs\n$input-bg: var(--dh-color-input-bg);\n$input-disabled-bg: var(--dh-color-input-disabled-bg);\n$input-color: var(--dh-color-input-fg);\n$input-border-color: var(--dh-color-input-border);\n$input-placeholder-color: var(--dh-color-input-placeholder);\n$input-focus-border-color: var(--dh-color-input-focus-border);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: color-mix(\n in srgb,\n var(--dh-color-accent) 35%,\n transparent\n);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n$input-btn-line-height: 1.3;\n// Bootstrap uses a calc expression to determine the input height (calc(line-height + 2*padding-y + border)).\n// The padding-y value has to be in rem to match units as it is a SASS calc.\n// Using 0.42145rem with 1.3 line height gets us to spectrum's 32px.\n/* stylelint-disable-next-line number-max-precision */\n$input-btn-padding-y: 0.42145rem;\n\n//checkbox\n$custom-control-indicator-bg: var(--dh-color-input-bg);\n$custom-control-indicator-border-color: var(--dh-color-input-border);\n$custom-checkbox-indicator-border-radius: 2px;\n$custom-control-indicator-border-width: 2px;\n$custom-control-indicator-active-bg: var(--dh-color-input-bg);\n$custom-control-indicator-active-border-color: var(--dh-color-input-fg);\n$custom-control-indicator-checked-bg: var(--dh-color-input-fg);\n$custom-control-indicator-checked-color: black; // used as mask fill color\n$custom-checkbox-indicator-indeterminate-bg: var(--dh-color-input-fg);\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: var(--dh-color-input-disabled-bg);\n$custom-control-indicator-checked-disabled-bg: var(\n --dh-color-input-disabled-bg\n);\n$custom-control-label-disabled-color: var(--dh-color-input-disabled-fg);\n\n// The $custom-select-indicator variable is used by Bootstrap to provide the\n// icon for the select dropdown. Inline svgs can't use CSS variables, so we hard\n// code the color to #929192 (the default value of --dh-color-gray-600). PR #1651\n// overrides this icon altogether for known dropdowns, so technically we may not\n// need this, but it's here in case there are any remaining instances.\n$custom-select-indicator-color: #929192;\n$custom-select-bg: var(--dh-color-selector-bg);\n$custom-select-bg-size: 16px 16px;\n//dhSort icon encoded\n$custom-select-indicator: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M4 7l-.4-.8 4-3.7h.8l4 3.7-.4.8H4zm0 2l-.4.8 4 3.7h.8l4-3.7L12 9H4z'/%3E%3C/svg%3E\"),\n '#',\n '%23'\n);\n$custom-select-focus-box-shadow: $input-btn-focus-box-shadow;\n$custom-select-disabled-color: $gray-500;\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $content-bg;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n$close-color: var(--dh-color-text);\n$close-text-shadow: none;\n\n// Toast notification\n$toast-bg: var(--dh-color-accent-100);\n$toast-color: var(--dh-color-text);\n$toast-error-bg: var(--dh-color-negative-bg);\n$toast-error-color: var(--dh-color-text);\n\n//tooltips\n$tooltip-bg: var(--dh-color-tooltip-bg);\n$tooltip-color: var(--dh-color-tooltip-fg);\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem var(--dh-color-tooltip-box-shadow);\n\n//drowdowns\n$dropdown-bg: $gray-600;\n$dropdown-link-color: $foreground;\n$dropdown-link-hover-color: $foreground;\n$dropdown-link-hover-bg: var(--dh-color-item-list-hover-bg);\n$dropdown-divider-bg: $gray-700;\n\n//context menus\n$contextmenu-bg: var(--dh-color-popover-bg);\n$contextmenu-color: var(--dh-color-text);\n$contextmenu-disabled-color: var(--dh-color-text-disabled);\n$contextmenu-keyboard-selected-bg: var(--dh-color-keyboard-selected-bg);\n$contextmenu-selected-bg: var(--dh-color-item-list-hover-bg);\n$contextmenu-selected-color: var(--dh-color-item-list-selected-fg);\n\n//hr\n$hr-border-color: var(--dh-color-hr);\n\n//links\n$link-color: $gray-400;\n$link-hover-color: $foreground;\n\n//progress-bar\n$progress-bg: $gray-600;\n$progress-border-radius: 1rem;\n\n// Set global options\n$enable-shadows: false;\n$enable-gradients: false;\n$enable-print-styles: false; //I don't think anyone should expect to \"print\" this app.\n\n// Transition times\n$transition: 0.15s;\n$transition-mid: 0.2s;\n$transition-long: 0.3s;\n$transition-slow: 0.6s;\n\n//form-validation icon, uses vsWarning icon encoded here as svg\n$form-feedback-icon-invalid-color: $danger;\n$form-feedback-icon-invalid: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E \"),\n '#',\n '%23'\n);\n\n// This section of variables is not consumed directly by DH, but they need to be\n// defined for sass to compile _variables\n$table-dark-bg: $gray-800;\n$table-dark-accent-bg: var(--dh-color-highlight-hover);\n$table-dark-hover-bg: var(--dh-color-highlight-active);\n$table-dark-border-color: $gray-700;\n$popover-bg: var(--dh-color-tooltip-bg);\n$popover-border-color: var(--dh-color-overlay-modal-bg);\n$popover-header-bg: #000;\n$popover-arrow-outer-color: var(--dh-color-dropshadow);\n$custom-range-thumb-active-bg: var(--dh-color-accent-1100);\n"]}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/ChartTheme.module.scss","../../../node_modules/@deephaven/components/scss/custom.scss","../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss"],"names":[],"mappings":"AAAA;ACAA;AC6LA;AF1LA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;EACA;AAEA;EACA;EACA;EACA;AAEA;EACA","file":"ChartTheme.module.css","sourcesContent":["/* stylelint-disable */\n@import '@deephaven/components/scss/custom.scss';\n\n:export {\n paper-bgcolor: var(--dh-color-chart-bg);\n plot-bgcolor: var(--dh-color-chart-plot-bg);\n title-color: var(--dh-color-chart-title);\n legend-color: var(--dh-color-chart-legend-fg);\n colorway: var(--dh-color-chart-colorway);\n gridcolor: var(--dh-color-chart-grid);\n linecolor: var(--dh-color-chart-axis-line);\n zerolinecolor: var(--dh-color-chart-axis-line-zero);\n\n error-band-line-color: var(--dh-color-chart-error-band-line);\n ohlc-increasing: var(--dh-color-chart-ohlc-increase);\n ohlc-decreasing: var(--dh-color-chart-ohlc-decrease);\n\n /* Geo */\n coastline-color: var(--dh-color-chart-geo-coastline);\n land-color: var(--dh-color-chart-geo-land);\n ocean-color: var(--dh-color-chart-geo-ocean);\n lake-color: var(--dh-color-chart-geo-lake);\n river-color: var(--dh-color-chart-geo-river);\n\n /* Indicator */\n indicator-increasing: var(--dh-color-chart-indicator-increase);\n indicator-decreasing: var(--dh-color-chart-indicator-decrease);\n indicator-gauge: var(--dh-color-chart-indicator-gauge);\n\n /* Map */\n map-style: var(--dh-color-chart-map-style);\n}\n","/* stylelint-disable scss/at-import-no-partial-leading-underscore */\n// Consumers should be able to resolve bootstrap/ to node_modules/bootstrap\n\n//Make bootstrap functions available for use in overrides\n@import 'bootstrap/scss/_functions.scss';\n@import './bootstrap_overrides.scss';\n\n//_variable imports come after bootstrap default overrides,\n// makes all other variables and mixins from bootstrap available\n/// with just importing customer.scss\n@import 'bootstrap/scss/_variables.scss';\n@import 'bootstrap/scss/_mixins.scss';\n\n//New variables come after imports\n@import './new_variables.scss';\n@import './util.scss';\n","// Styling overrides for bootstrap\n@use 'sass:map';\n\n// Override / set color variables\n$red: var(--dh-color-visual-red);\n$orange: var(--dh-color-visual-orange);\n$yellow: var(--dh-color-visual-yellow);\n$green: var(--dh-color-visual-green);\n$blue: var(--dh-color-visual-blue);\n$purple: var(--dh-color-visual-purple);\n\n// Fallback colors are used if theme isn't loaded\n// this is required for error messages if the API doesn't load\n\n//Define our Gray scale\n$gray-100: var(--dh-color-gray-900, #fcfcfa);\n$gray-200: var(--dh-color-gray-800);\n$gray-300: var(--dh-color-gray-700);\n$gray-400: var(--dh-color-gray-600);\n$gray-500: var(--dh-color-gray-500);\n// intentional duplicate, scale doesn't line up otherwise\n// as we have gray-850 and spectrum doesn't and it is needed\n$gray-600: var(--dh-color-gray-500);\n$gray-700: var(--dh-color-gray-400);\n$gray-800: var(--dh-color-gray-300);\n$gray-850: var(--dh-color-gray-200);\n$gray-900: var(--dh-color-gray-75);\n$black: var(--dh-color-black, #1a171a);\n$white: var(--dh-color-white, #f0f0ee);\n\n//Define some UI colors\n$interfacegray: var(--dh-color-content-bg, #2d2a2e);\n$interfaceblue: var(--dh-color-accent-bg);\n$interfacewhite: $white;\n$interfaceblack: $black;\n$content-bg: var(--dh-color-content-bg, #2d2a2e);\n$background: var(--dh-color-bg, #1a171a);\n$foreground: var(--dh-color-fg, #f0f0ee);\n\n// Extend default Bootstrap $grays map\n$grays-custom: (\n '850': $gray-850,\n);\n$grays: () !default;\n$grays: map-merge($grays, $grays-custom);\n\n// Extend default Bootstrap $colors map\n$colors-custom: (\n 'black': $black,\n);\n$colors: () !default;\n$colors: map-merge($colors, $colors-custom);\n\n// Override default Bootstrap $theme-colors map by mapping each key to itself.\n// These will then be re-mapped inside of `button-outline-variant` and\n// `button-outline-variant` mixins in `bootstrap_override_mixins_buttons.scss`\n$theme-colors-self-map: ();\n@each $key\n in (\n 'primary',\n 'secondary',\n 'success',\n 'info',\n 'warning',\n 'danger',\n 'light',\n 'dark'\n )\n{\n $theme-colors-self-map: map.set($theme-colors-self-map, $key, $key);\n}\n$theme-colors: () !default;\n$theme-colors: map-merge($theme-colors, $theme-colors-self-map);\n\n// Used by bootstrap_override_mixins_buttons.scss to map Bootstrap colors to\n// DH semantic colors\n$bootstrap-dh-semantic-map: (\n 'primary': 'accent',\n 'secondary': 'neutral',\n 'success': 'positive',\n 'info': 'info',\n 'warning': 'notice',\n 'danger': 'negative',\n // We shouldn't be using these, but mapping so they work with our custom\n // `color-yiq` mixin. If we find a way to remove $light + $dark that are\n // defined in Bootstrap _variables.scss, we should remove these\n 'light': 'neutral',\n 'dark': 'neutral',\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: var(--dh-color-accent-bg);\n$primary-hover: var(--dh-color-accent-hover-bg);\n$primary-dark: var(--dh-color-accent-down-bg);\n$secondary: var(--dh-color-neutral-bg);\n$secondary-hover: var(--dh-color-neutral-hover-bg);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: var(--dh-color-negative-bg);\n$danger-hover: var(--dh-color-negative-hover-bg);\n// We really don't want to use $light or $dark variables, but Bootstrap defines\n// them in _variables.scss. Explicitly setting them to ensure we are in control\n// of their values. If we can find a way to remove them, we should\n$light: var(--dh-color-gray-light);\n$dark: var(--dh-color-gray-dark);\n// Bootstrap doesn't define $mid, and we want to move away from this particular\n// semantic. Should be deleted by #1635\n$mid: var(--dh-color-gray-mid);\n\n$semantic-colors: (\n 'primary-hover': $primary-hover,\n 'primary-dark': $primary-dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n 'secondary-hover': $secondary-hover,\n 'danger-hover': $danger-hover,\n);\n\n$component-active-bg: $primary;\n$theme-color-interval: 9%;\n$yiq-contrasted-threshold: 180;\n\n// Override fonts\n$font-family-sans-serif:\n 'Fira Sans',\n -apple-system,\n blinkmacsystemfont,\n 'Segoe UI',\n 'Roboto',\n 'Helvetica Neue',\n arial,\n sans-serif; //fira sans then native system ui fallbacks\n$font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',\n 'Courier New', monospace;\n$font-family-base: $font-family-sans-serif;\n\n$headings-font-weight: 400;\n\n//Text overides\n$text-muted: $gray-400;\n\n//Style Selection highlight color\n$text-select-color: var(--dh-color-text-highlight);\n\n//Grid variables, same value as default just making easily accessible\n$grid-gutter-width: 30px;\n\n//Visual Overrides\n$border-radius: 4px;\n$box-shadow: 0 0.1rem 1rem var(--dh-color-dropshadow);\n\n//Override Btn\n$btn-border-radius: 4rem;\n$btn-padding-x: 1.5rem;\n$btn-transition:\n color 0.12s ease-in-out,\n background-color 0.12s ease-in-out,\n border-color 0.12s ease-in-out,\n box-shadow 0.12s ease-in-out; //default 0.15 is too long\n$btn-border-width: 2px;\n$btn-font-weight: var(--spectrum-global-font-weight-bold);\n$btn-line-height: 1.3;\n\n//Override Inputs\n$input-bg: var(--dh-color-input-bg);\n$input-disabled-bg: var(--dh-color-input-disabled-bg);\n$input-color: var(--dh-color-input-fg);\n$input-border-color: var(--dh-color-input-border);\n$input-placeholder-color: var(--dh-color-input-placeholder);\n$input-focus-border-color: var(--dh-color-input-focus-border);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: color-mix(\n in srgb,\n var(--dh-color-accent) 35%,\n transparent\n);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n$input-btn-line-height: 1.3;\n// Bootstrap uses a calc expression to determine the input height (calc(line-height + 2*padding-y + border)).\n// The padding-y value has to be in rem to match units as it is a SASS calc.\n// Using 0.42145rem with 1.3 line height gets us to spectrum's 32px.\n/* stylelint-disable-next-line number-max-precision */\n$input-btn-padding-y: 0.42145rem;\n\n//checkbox\n$custom-control-indicator-bg: var(--dh-color-input-bg);\n$custom-control-indicator-border-color: var(--dh-color-input-border);\n$custom-checkbox-indicator-border-radius: 2px;\n$custom-control-indicator-border-width: 2px;\n$custom-control-indicator-active-bg: var(--dh-color-input-bg);\n$custom-control-indicator-active-border-color: var(--dh-color-input-fg);\n$custom-control-indicator-checked-bg: var(--dh-color-input-fg);\n$custom-control-indicator-checked-color: black; // used as mask fill color\n$custom-checkbox-indicator-indeterminate-bg: var(--dh-color-input-fg);\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: var(--dh-color-input-disabled-bg);\n$custom-control-indicator-checked-disabled-bg: var(\n --dh-color-input-disabled-bg\n);\n$custom-control-label-disabled-color: var(--dh-color-input-disabled-fg);\n\n// The $custom-select-indicator variable is used by Bootstrap to provide the\n// icon for the select dropdown. Inline svgs can't use CSS variables, so we hard\n// code the color to #929192 (the default value of --dh-color-gray-600). PR #1651\n// overrides this icon altogether for known dropdowns, so technically we may not\n// need this, but it's here in case there are any remaining instances.\n$custom-select-indicator-color: #929192;\n$custom-select-bg: var(--dh-color-selector-bg);\n$custom-select-bg-size: 16px 16px;\n//dhSort icon encoded\n$custom-select-indicator: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M4 7l-.4-.8 4-3.7h.8l4 3.7-.4.8H4zm0 2l-.4.8 4 3.7h.8l4-3.7L12 9H4z'/%3E%3C/svg%3E\"),\n '#',\n '%23'\n);\n$custom-select-focus-box-shadow: $input-btn-focus-box-shadow;\n$custom-select-disabled-color: $gray-500;\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $content-bg;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n$close-color: var(--dh-color-text);\n$close-text-shadow: none;\n\n// Toast notification\n$toast-bg: var(--dh-color-accent-100);\n$toast-color: var(--dh-color-text);\n$toast-error-bg: var(--dh-color-negative-bg);\n$toast-error-color: var(--dh-color-text);\n\n//tooltips\n$tooltip-bg: var(--dh-color-tooltip-bg);\n$tooltip-color: var(--dh-color-tooltip-fg);\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem var(--dh-color-tooltip-box-shadow);\n\n//drowdowns\n$dropdown-bg: $gray-600;\n$dropdown-link-color: $foreground;\n$dropdown-link-hover-color: $foreground;\n$dropdown-link-hover-bg: var(--dh-color-item-list-hover-bg);\n$dropdown-divider-bg: $gray-700;\n\n//context menus\n$contextmenu-bg: var(--dh-color-popover-bg);\n$contextmenu-color: var(--dh-color-text);\n$contextmenu-disabled-color: var(--dh-color-text-disabled);\n$contextmenu-keyboard-selected-bg: var(--dh-color-keyboard-selected-bg);\n$contextmenu-selected-bg: var(--dh-color-item-list-hover-bg);\n$contextmenu-selected-color: var(--dh-color-item-list-selected-fg);\n\n//hr\n$hr-border-color: var(--dh-color-hr);\n\n//links\n$link-color: $gray-400;\n$link-hover-color: $foreground;\n\n//progress-bar\n$progress-bg: $gray-600;\n$progress-border-radius: 1rem;\n\n// Set global options\n$enable-shadows: false;\n$enable-gradients: false;\n$enable-print-styles: false; //I don't think anyone should expect to \"print\" this app.\n\n// Transition times\n$transition: 0.15s;\n$transition-mid: 0.2s;\n$transition-long: 0.3s;\n$transition-slow: 0.6s;\n\n//form-validation icon, uses vsWarning icon encoded here as svg\n$form-feedback-icon-invalid-color: $danger;\n$form-feedback-icon-invalid: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E \"),\n '#',\n '%23'\n);\n\n// This section of variables is not consumed directly by DH, but they need to be\n// defined for sass to compile _variables\n$table-dark-bg: $gray-800;\n$table-dark-accent-bg: var(--dh-color-highlight-hover);\n$table-dark-hover-bg: var(--dh-color-highlight-active);\n$table-dark-border-color: $gray-700;\n$popover-bg: var(--dh-color-tooltip-bg);\n$popover-border-color: var(--dh-color-overlay-modal-bg);\n$popover-header-bg: #000;\n$popover-arrow-outer-color: var(--dh-color-dropshadow);\n$custom-range-thumb-active-bg: var(--dh-color-accent-1100);\n"]}
|
package/dist/ChartUtils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartUtils.d.ts","sourceRoot":"","sources":["../src/ChartUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,EAGf,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,KAAK,EACV,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,IAAI,IAAI,UAAU,EAClB,QAAQ,EACR,UAAU,EAEV,YAAY,EACZ,QAAQ,EAET,MAAM,WAAW,CAAC;AACnB,OAAO,EAAiC,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,GAAG,CAC/B,MAAM,EACN;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CACF,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE7C,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;IAChD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;I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AI,CAAC,QAAQ,GAAG,IAAW,GAC3C,OAAO;IAqCV,cAAc,CACZ,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,GAAG,IAAI,EACjC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,GACzB,OAAO,CAAC,UAAU,CAAC;IAwCtB;;;;;OAKG;IACH,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,QAAQ;IAmEhD;;;;OAIG;IACH,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IA8ErD;;;OAGG;IACH,eAAe,CACb,QAAQ,EAAE,kBAAkB,GAC3B,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,eAAe,CAAA;KAAE;CAU7E;AAED,eAAe,UAAU,CAAC"}
|
package/dist/ChartUtils.js
CHANGED
|
@@ -1580,7 +1580,8 @@ class ChartUtils {
|
|
|
1580
1580
|
land_color,
|
|
1581
1581
|
ocean_color,
|
|
1582
1582
|
lake_color,
|
|
1583
|
-
river_color
|
|
1583
|
+
river_color,
|
|
1584
|
+
map_style
|
|
1584
1585
|
/* eslint-disable camelcase */
|
|
1585
1586
|
} = theme;
|
|
1586
1587
|
var layout = {
|
|
@@ -1633,6 +1634,9 @@ class ChartUtils {
|
|
|
1633
1634
|
oceancolor: ocean_color,
|
|
1634
1635
|
lakecolor: lake_color,
|
|
1635
1636
|
rivercolor: river_color
|
|
1637
|
+
},
|
|
1638
|
+
map: {
|
|
1639
|
+
style: map_style
|
|
1636
1640
|
}
|
|
1637
1641
|
};
|
|
1638
1642
|
layout.datarevision = 0;
|
package/dist/ChartUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartUtils.js","names":["Log","TableUtils","set","assertNotNull","bindAllMethods","log","module","BUSINESS_COLUMN_TYPE","MILLIS_PER_HOUR","NANOS_PER_MILLI","isDateWrapper","value","asDate","undefined","isLongWrapper","asNumber","isDateTimeColumnFormatter","dhTimeZone","isRangedPlotlyAxis","range","autorange","isWebGLSupported","canvas","document","createElement","gl","getContext","WebGLRenderingContext","e","IS_WEBGL_SUPPORTED","ChartUtils","getPlotlyErrorBars","x","xLow","xHigh","array","map","i","arrayminus","type","symmetric","convertNumberPrefix","prefix","replace","getPlotlyNumberFormat","formatter","columnType","formatPattern","subpatterns","split","matchArray","match","placeholderDigits","zeroDigits","decimalDigits","optionalDecimalDigits","numberType","percentSign","suffix","paddingLength","length","isCommaSeparated","indexOf","comma","plotlyNumberType","decimalLength","trimOption","tickformat","concat","tickprefix","ticksuffix","automargin","addTickSpacing","axisFormat","axis","isDateType","gapBetweenMajorTicks","updatedFormat","tickSpacing","Math","tickmode","dtick","getSourceForAxis","chart","series","j","sources","source","getSeriesVisibility","name","settings","hiddenSeries","includes","getHiddenLabels","makeSeriesData","mode","showLegend","orientation","arguments","ORIENTATION","VERTICAL","showlegend","getMarkerSymbol","deephavenShape","Error","getAllAxes","figure","charts","reduce","axes","getAxisTypeMap","groupArray","getChartForSeries","getLayoutRanges","layout","ranges","keys","Object","filter","key","getAxisLayoutProperty","axisProperty","axisIndex","axisIndexString","periodToDecimal","period","values","Number","decimalToPeriod","decimal","hours","floor","minutes","round","toString","padStart","property","result","item","_result$get","group","get","push","Map","normalizeColorway","colorway","Array","isArray","warn","titleFromSettings","xAxis","title","join","getTimeZoneDiff","calendarTimeZone","formatterTimeZone","standardOffset","createClosedRangesForPartialHoliday","holidayPeriods","calendarPeriods","calendarRanges","open","close","sort","a","b","holidayRanges","closedRanges","c","calendarRange","lastClose","h","holidayRange","constructor","dh","_defineProperty","daysOfWeek","freeze","calendar","DayOfWeek","getAxisFormats","axisFormats","nullFormat","allAxes","axisTypeMap","axisSources","k","axisType","typeAxes","getAxisPropertyName","axisLayoutProperty","has","debug","getPlotlyAxisFormat","businessCalendar","rangebreaks","createRangeBreaksFromBusinessCalendar","size","getPlotlyChartType","plotStyle","isBusinessTime","allowWebGL","plot","SeriesPlotStyle","SCATTER","LINE","BAR","STACKED_BAR","PIE","TREEMAP","HISTOGRAM","OHLC","getPlotlyChartMode","areLinesVisible","areShapesVisible","modes","Set","add","MODE_LINES","MODE_MARKERS","getPlotlyProperty","sourceType","SourceType","X","Y","TIME","LABEL","PARENT","COLOR","Z","X_LOW","X_HIGH","Y_LOW","Y_HIGH","OPEN","HIGH","LOW","CLOSE","SHAPE","SIZE","HOVER_TEXT","TEXT","getPlotlySeriesOrientation","_sources$","AxisType","HORIZONTAL","makeSeriesDataFromSeries","seriesVisibility","isLinesVisible","isShapesVisible","lineColor","shapeColor","shape","shapeSize","some","_source$axis","getChartType","seriesData","addSourcesToSeriesData","addStylingToSeriesData","seriesDataParam","dataAttributeName","marker","line","width","AREA","fill","STACKED_AREA","stackgroup","STEP","textinfo","hoverinfo","tiling","packing","pad","textposition","color","symbol","DEFAULT_MARKER_SIZE","visible","getAxisSide","axisPosition","AxisPosition","BOTTOM","TOP","LEFT","RIGHT","updateFigureAxes","layoutParam","chartAxisRangeParser","plotWidth","plotHeight","figureAxes","axisRangeParser","bounds","getChartBounds","updateLayoutAxes","removeStaleAxes","_axisPositionMap$get","cols","rows","column","colspan","row","rowspan","endColumn","endRow","columnSize","rowSize","xMarginSize","AXIS_SIZE_PX","yMarginSize","bottom","top","left","right","axisPositionMap","rightAxes","max","min","LEGEND_WIDTH_PX","MAX_LEGEND_SIZE","DEFAULT_AXIS_SIZE","getPlotlyDateFormat","dataFormatter","getColumnTypeFormatter","showTimeZone","i18n","DateTimeFormat","format","Date","isNumberType","formatType","AxisFormatType","CATEGORY","chartAxes","xAxisSize","MIN_AXIS_SIZE","MAX_AXIS_SIZE","yAxisSize","axisTypes","figureAxisTypeMap","figureTypeAxes","isYAxis","plotSize","chartAxisIndex","figureAxisIndex","layoutAxis","updateLayoutAxis","rangeParser","rangeStart","rangeEnd","figureAxisTypes","layoutAxisParam","_axis$label","axisSize","label","text","side","position","_this$getAxisProperty","_axisPositionMap$get2","overlaying","positionAxes","sideIndex","anchor","leftAxes","domain","bottomAxes","topAxes","minRange","maxRange","logAxis","isNaN","autorangeoptions","minallowed","log10","maxallowed","createBoundsFromPeriods","periods","timeZoneDiff","numberPeriods","nextPeriod","createBreaksFromPeriods","bound","pattern","createBoundsFromDays","businessDays","weekLength","businessDaysInt","day","businessDaysSet","closedDays","boundsArray","forEach","closedDay","adjustedDay","createBreaksFromDays","businessPeriods","holidays","timeZone","typeFormatter","createRangeBreakValuesFromHolidays","fullHolidays","partialHolidays","holiday","createPartialHoliday","createFullHoliday","adjustDateForTimeZone","date","_calendar$businessPer","dateString","dayOfWeek","getDay","isBusinessDay","closedPeriods","rangeBreaks","closeStart","closeEnd","dvalue","unwrapValue","wrapValue","makeFigureSettings","table","settingsAxis","NUMBER","yAxis","chartType","ChartType","XY","dataSources","columnName","DATE_FORMAT","substr","parse","tzFormat","estimatedOffset","estimatedDate","offset","makeLayoutAxis","theme","gridcolor","linecolor","rangeslider","showline","ticks","ticklen","tickcolor","paper_bgcolor","tickfont","zerolinecolor","font","title_color","legend","legend_color","assign","showgrid","zerolinewidth","makeDefaultTemplate","error_band_line_color","ohlc_increasing","ohlc_decreasing","indicator_increasing","indicator_decreasing","indicator_gauge","data","bar","scatter","error_x","error_y","ohlc","increasing","decreasing","pie","outsidetextfont","treemap","indicator","delta","gauge","makeDefaultLayout","plot_bgcolor","coastline_color","land_color","ocean_color","lake_color","river_color","autosize","family","xanchor","xref","yanchor","_objectSpread","DEFAULT_TITLE_PADDING","y","margin","DEFAULT_MARGIN","xaxis","yaxis","polar","angularaxis","radialaxis","bgcolor","scene","zaxis","geo","showcoastlines","showframe","showland","showocean","showlakes","showrivers","coastlinecolor","landcolor","oceancolor","lakecolor","rivercolor","datarevision","hydrateSettings","l","r","t"],"sources":["../src/ChartUtils.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport {\n type DateTimeColumnFormatter,\n type Formatter,\n type TableColumnFormatter,\n TableUtils,\n} from '@deephaven/jsapi-utils';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport { set } from 'lodash';\nimport type {\n Layout,\n PlotData,\n PlotType,\n Axis as PlotlyAxis,\n ErrorBar,\n LayoutAxis,\n AxisType as PlotlyAxisType,\n MarkerSymbol,\n Template,\n Delta,\n} from 'plotly.js';\nimport { assertNotNull, bindAllMethods, type Range } from '@deephaven/utils';\nimport { type ChartTheme } from './ChartTheme';\n\nexport type FilterColumnMap = Map<\n string,\n {\n name: string;\n type: string;\n }\n>;\n\nexport type FilterMap = Map<string, unknown>;\n\nexport interface ChartModelSettings {\n hiddenSeries?: string[];\n type?: keyof typeof DhType.plot.SeriesPlotStyle;\n series?: string[];\n xAxis?: string;\n title?: string;\n}\n\nexport interface SeriesData {\n type: string | null;\n mode: string | null;\n name: string;\n orientation: string;\n xaxis?: number;\n marker?: unknown;\n xLow?: number;\n xHigh?: number;\n}\n\nexport type RangeParser = (range: Range) => unknown[];\n\nexport type AxisRangeParser = (axis: DhType.plot.Axis) => RangeParser;\n\nexport type ChartAxisRangeParser = (\n chart: DhType.plot.Chart\n) => AxisRangeParser;\n\ntype LayoutAxisKey =\n | 'xaxis'\n | 'xaxis2'\n | 'xaxis3'\n | 'xaxis4'\n | 'xaxis5'\n | 'xaxis6'\n | 'xaxis7'\n | 'xaxis8'\n | 'xaxis9'\n | 'yaxis'\n | 'yaxis2'\n | 'yaxis3'\n | 'yaxis4'\n | 'yaxis5'\n | 'yaxis6'\n | 'yaxis7'\n | 'yaxis8'\n | 'yaxis9';\n\nexport interface TreeMapData extends PlotData {\n tiling: {\n packing: 'squarify';\n pad: 0;\n };\n}\n\ninterface Rangebreaks {\n bounds?: number[];\n dvalue?: number;\n enable?: boolean;\n name?: string;\n pattern?: 'day of week' | 'hour' | '';\n values?: string[];\n}\ninterface RangebreakAxisFormat extends PlotlyAxis {\n rangebreaks: Rangebreaks[];\n}\n\nexport type ChartBounds = {\n left: number;\n right: number;\n top: number;\n bottom: number;\n};\n\nexport type AxisTypeMap = Map<DhType.plot.AxisType, DhType.plot.Axis[]>;\ntype AxisPositionMap = Map<DhType.plot.AxisPosition, DhType.plot.Axis[]>;\n\nconst log = Log.module('ChartUtils');\n\nconst BUSINESS_COLUMN_TYPE = 'io.deephaven.time.DateTime';\n\nconst MILLIS_PER_HOUR = 3600000;\n\nconst NANOS_PER_MILLI = 1000000;\n\nfunction isDateWrapper(value: unknown): value is DhType.DateWrapper {\n return (value as DhType.DateWrapper).asDate !== undefined;\n}\n\nfunction isLongWrapper(value: unknown): value is DhType.LongWrapper {\n return (value as DhType.LongWrapper).asNumber !== undefined;\n}\n\nfunction isDateTimeColumnFormatter(\n value: TableColumnFormatter\n): value is DateTimeColumnFormatter {\n return (value as DateTimeColumnFormatter).dhTimeZone !== undefined;\n}\n\nfunction isRangedPlotlyAxis(value: unknown): value is { range: Range[] } {\n return (\n value != null &&\n (value as PlotlyAxis).range != null &&\n ((value as PlotlyAxis).autorange === false ||\n (value as PlotlyAxis).autorange === undefined)\n );\n}\n\n/**\n * Check if WebGL is supported in the current environment.\n * Most modern browsers do support WebGL, but it's possible to disable it and it is also not available\n * in some headless environments, which can affect e2e tests.\n *\n * https://github.com/microsoft/playwright/issues/13146\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1375585\n *\n * @returns True if Web GL is supported, false otherwise\n */\nexport function isWebGLSupported(): boolean {\n try {\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/By_example/Detect_WebGL\n const canvas = document.createElement('canvas');\n const gl =\n canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n return gl != null && gl instanceof WebGLRenderingContext;\n } catch (e) {\n return false;\n }\n}\n\nconst IS_WEBGL_SUPPORTED = isWebGLSupported();\n\nclass ChartUtils {\n static DEFAULT_AXIS_SIZE = 0.15;\n\n static MIN_AXIS_SIZE = 0.025;\n\n static MAX_AXIS_SIZE = 0.2;\n\n static AXIS_SIZE_PX = 75;\n\n static LEGEND_WIDTH_PX = 50;\n\n static MAX_LEGEND_SIZE = 0.25;\n\n static ORIENTATION = Object.freeze({\n HORIZONTAL: 'h',\n VERTICAL: 'v',\n } as const);\n\n static DATE_FORMAT = 'yyyy-MM-dd HH:mm:ss.SSSSSS';\n\n static DEFAULT_MARGIN = Object.freeze({ l: 60, r: 50, t: 30, b: 60, pad: 0 });\n\n static DEFAULT_TITLE_PADDING = Object.freeze({ t: 8 });\n\n static SUBTITLE_LINE_HEIGHT = 25;\n\n static DEFAULT_MARKER_SIZE = 6;\n\n static MODE_MARKERS: PlotData['mode'] = 'markers';\n\n static MODE_LINES: PlotData['mode'] = 'lines';\n\n /**\n * Generate the plotly error bar data from the passed in data.\n * Iris passes in the values as absolute, plotly needs them as relative.\n * @param x The main data array\n * @param xLow The absolute low values\n * @param xHigh\n *\n * @returns The error_x object required by plotly, or null if none is required\n */\n static getPlotlyErrorBars(\n x: number[],\n xLow: number[],\n xHigh: number[]\n ): ErrorBar {\n const array = xHigh.map((value, i) => value - x[i]);\n const arrayminus = xLow.map((value, i) => x[i] - value);\n return {\n type: 'data',\n symmetric: false,\n array,\n arrayminus,\n };\n }\n\n static convertNumberPrefix(prefix: string): string {\n return prefix.replace(/\\u00A4\\u00A4/g, 'USD').replace(/\\u00A4/g, '$');\n }\n\n static getPlotlyNumberFormat(\n formatter: Formatter | null,\n columnType: string,\n formatPattern: string | null | undefined\n ): Partial<LayoutAxis> | null {\n if (formatPattern == null || formatPattern === '') {\n return null;\n }\n\n // We translate java formatting: https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html\n // Into d3 number formatting: https://github.com/d3/d3-format\n // We can't translate number formatting exactly, but should be able to translate the most common cases\n // First split it into the subpatterns; currently only handling the positive subpattern, ignoring the rest\n const subpatterns = formatPattern.split(';');\n\n const matchArray = subpatterns[0].match(\n /^([^#,0.]*)([#,]*)([0,]*)(\\.?)(0*)(#*)(E?0*)(%?)(.*)/\n );\n assertNotNull(matchArray);\n\n const [\n ,\n prefix,\n placeholderDigits,\n zeroDigits,\n ,\n decimalDigits,\n optionalDecimalDigits,\n numberType,\n percentSign,\n suffix,\n ] = matchArray;\n\n const paddingLength = zeroDigits.replace(',', '').length;\n const isCommaSeparated =\n placeholderDigits.indexOf(',') >= 0 || zeroDigits.indexOf(',') >= 0;\n const comma = isCommaSeparated ? ',' : '';\n const plotlyNumberType =\n numberType != null && numberType !== '' ? 'e' : 'f';\n\n const type = percentSign !== '' ? percentSign : plotlyNumberType;\n\n const decimalLength = decimalDigits.length + optionalDecimalDigits.length;\n // IDS-4565 Plotly uses an older version of d3 which doesn't support the trim option or negative brackets\n // If plotly updates it's d3 version, this should be re-enabled\n // const trimOption = optionalDecimalDigits.length > 0 ? '~' : '';\n const trimOption = '';\n\n const tickformat = `0${paddingLength}${comma}.${decimalLength}${trimOption}${type}`;\n const tickprefix = ChartUtils.convertNumberPrefix(prefix);\n // prefix and suffix are processed the same\n const ticksuffix = ChartUtils.convertNumberPrefix(suffix);\n\n return { tickformat, tickprefix, ticksuffix, automargin: true };\n }\n\n /**\n * Adds tick spacing for an axis that has gapBetweenMajorTicks defined.\n *\n * @param axisFormat the current axis format, may be null\n * @param axis the current axis\n * @param isDateType indicates if the columns is a date type\n */\n static addTickSpacing(\n axisFormat: Partial<LayoutAxis> | null,\n axis: DhType.plot.Axis,\n isDateType: boolean\n ): Partial<PlotlyAxis> | null {\n const { gapBetweenMajorTicks } = axis;\n if (gapBetweenMajorTicks != null && gapBetweenMajorTicks > 0) {\n const updatedFormat: Partial<PlotlyAxis> = axisFormat || {};\n let tickSpacing = gapBetweenMajorTicks;\n if (isDateType) {\n // Need to convert from nanoseconds to milliseconds\n tickSpacing = gapBetweenMajorTicks / NANOS_PER_MILLI;\n }\n if (axis.log) {\n tickSpacing = Math.log(tickSpacing);\n }\n // Note that tickmode defaults to 'auto'\n updatedFormat.tickmode = 'linear';\n updatedFormat.dtick = tickSpacing;\n return updatedFormat;\n }\n\n return axisFormat;\n }\n\n /**\n * Retrieve the data source for a given axis in a chart\n * @param chart The chart to get the source for\n * @param axis The axis to find the source for\n * @returns The first source matching this axis\n */\n static getSourceForAxis(\n chart: DhType.plot.Chart,\n axis: DhType.plot.Axis\n ): DhType.plot.SeriesDataSource | null {\n for (let i = 0; i < chart.series.length; i += 1) {\n const series = chart.series[i];\n for (let j = 0; j < series.sources.length; j += 1) {\n const source = series.sources[j];\n if (source.axis === axis) {\n return source;\n }\n }\n }\n\n return null;\n }\n\n /**\n * Get visibility setting for the series object\n * @param name The series name to get the visibility for\n * @param settings Chart settings\n * @returns True for visible series and 'legendonly' for hidden\n */\n static getSeriesVisibility(\n name: string,\n settings?: Partial<ChartModelSettings>\n ): boolean | 'legendonly' {\n if (\n settings != null &&\n settings.hiddenSeries != null &&\n settings.hiddenSeries.includes(name)\n ) {\n return 'legendonly';\n }\n return true;\n }\n\n /**\n * Get hidden labels array from chart settings\n * @param settings Chart settings\n * @returns Array of hidden series names\n */\n static getHiddenLabels(settings: Partial<ChartModelSettings>): string[] {\n if (settings?.hiddenSeries) {\n return [...settings.hiddenSeries];\n }\n return [];\n }\n\n /**\n * Create a default series data object. Apply styling to the object afterward.\n * @returns A simple series data object with no styling\n */\n static makeSeriesData(\n type: PlotType | undefined,\n mode: PlotData['mode'] | undefined,\n name: string,\n showLegend: boolean | null,\n orientation: 'h' | 'v' = ChartUtils.ORIENTATION.VERTICAL\n ): Partial<PlotData> {\n return {\n type,\n mode,\n name,\n orientation,\n showlegend: showLegend ?? undefined,\n };\n }\n\n /**\n * Get the Plotly marker symbol for the provided Deephaven shape\n * Deephaven shapes: https://deephaven.io/enterprise/docs/plotting/visual-formatting/#point-formatting\n * Plotly shapes: https://plotly.com/javascript/reference/scattergl/#scattergl-marker-symbol\n * Table of plotly shapes: https://plotly.com/python/marker-style/#custom-marker-symbols\n * @param deephavenShape Deephaven shape to get the marker symbol for\n */\n static getMarkerSymbol(deephavenShape: string): MarkerSymbol {\n switch (deephavenShape) {\n case 'SQUARE':\n return 'square';\n case 'CIRCLE':\n return 'circle';\n case 'DIAMOND':\n return 'diamond';\n case 'UP_TRIANGLE':\n return 'triangle-up';\n case 'DOWN_TRIANGLE':\n return 'triangle-down';\n case 'RIGHT_TRIANGLE':\n return 'triangle-right';\n case 'LEFT_TRIANGLE':\n return 'triangle-left';\n // There don't seem to be any plotly equivalents for ellipse or rectangles\n // Rectangles could be `line-ew`, `line-ns`, or `hourglass` and `bowtie` instead?\n // Ellipse could be `asterisk` or `diamond-wide` instead?\n // Just throw an error, we've already got a bunch of types.\n case 'ELLIPSE':\n case 'HORIZONTAL_RECTANGLE':\n case 'VERTICAL_RECTANGLE':\n default:\n throw new Error(`Unrecognized shape ${deephavenShape}`);\n }\n }\n\n /**\n * Get all axes for a given `Figure`. Iterates through all charts axes and concatenates them.\n * @param figure Figure to get all axes for\n */\n static getAllAxes(figure: DhType.plot.Figure): DhType.plot.Axis[] {\n return figure.charts.reduce(\n (axes, chart) => [...axes, ...chart.axes],\n [] as DhType.plot.Axis[]\n );\n }\n\n /**\n * Get the axis type map for the figure provided\n * @param figure Figure to get the type map for\n * @returns Axis type map for the figure provided\n */\n static getAxisTypeMap(figure: DhType.plot.Figure): AxisTypeMap {\n const axes = ChartUtils.getAllAxes(figure);\n return ChartUtils.groupArray(axes, 'type');\n }\n\n /**\n * Retrieve the chart that contains the passed in series from the figure\n * @param figure The figure to retrieve the chart from\n * @param series The series to get the chart for\n */\n static getChartForSeries(\n figure: DhType.plot.Figure,\n series: DhType.plot.Series\n ): DhType.plot.Chart | null {\n const { charts } = figure;\n\n for (let i = 0; i < charts.length; i += 1) {\n const chart = charts[i];\n for (let j = 0; j < chart.series.length; j += 1) {\n if (series === chart.series[j]) {\n return chart;\n }\n }\n }\n\n return null;\n }\n\n /**\n * Get an object mapping axis to their ranges\n * @param layout The plotly layout object to get the ranges from\n * @returns An object mapping the axis name to it's range\n */\n static getLayoutRanges(layout: Partial<Layout>): Record<string, Range[]> {\n const ranges: Record<string, Range[]> = {};\n const keys: (keyof Layout)[] = Object.keys(layout).filter(\n key => key.indexOf('axis') >= 0\n ) as LayoutAxisKey[];\n for (let i = 0; i < keys.length; i += 1) {\n const key = keys[i];\n const value = layout[key];\n if (isRangedPlotlyAxis(value)) {\n // Only want to add the range if it's not autoranged\n ranges[key] = [...(value as PlotlyAxis).range];\n }\n }\n\n return ranges;\n }\n\n static getAxisLayoutProperty(\n axisProperty: 'x' | 'y',\n axisIndex: number\n ): LayoutAxisKey {\n const axisIndexString = axisIndex > 0 ? `${axisIndex + 1}` : '';\n return `${axisProperty ?? ''}axis${axisIndexString}` as LayoutAxisKey;\n }\n\n /**\n * Converts an open or close period to a declimal. e.g '09:30\" to 9.5\n *\n * @param period the open or close value of the period\n */\n static periodToDecimal(period: string): number {\n const values = period.split(':');\n return Number(values[0]) + Number(values[1]) / 60;\n }\n\n /**\n * Converts a decimal to a period. e.g 9.5 to '09:30'\n *\n * @param decimal the decimal value to\n */\n static decimalToPeriod(decimal: number): string {\n const hours = Math.floor(decimal);\n const minutes = Math.round((decimal - hours) * 60);\n return `${hours.toString().padStart(2, '0')}:${minutes\n .toString()\n .padStart(2, '0')}`;\n }\n\n /**\n * Groups an array and returns a map\n * @param array The object to group\n * @param property The property name to group by\n * @returns A map containing the items grouped by their values for the property\n */\n static groupArray<T, P extends keyof T>(\n array: T[],\n property: P\n ): Map<T[P], T[]> {\n return array.reduce((result, item) => {\n const key = item[property];\n const group: T[] = result.get(key) ?? [];\n group.push(item);\n result.set(key, group);\n return result;\n }, new Map());\n }\n\n /**\n * Parses the colorway value of a theme and returns an array of colors\n * Value could be a single string with space separated colors or already be an\n * array of strings representing the colorway\n * @param colorway The colorway value to normalize\n * @returns Colorway array for the theme or undefined\n */\n static normalizeColorway(colorway?: string | string[]): string[] | undefined {\n if (colorway == null) {\n return;\n }\n\n if (Array.isArray(colorway)) {\n return colorway;\n }\n\n if (typeof colorway === 'string') {\n return colorway.split(' ');\n }\n\n log.warn(`Unexpected colorway format: ${colorway}`);\n }\n\n static titleFromSettings(settings: ChartModelSettings): string {\n const {\n series,\n xAxis,\n title = `${(series ?? []).join(', ')} by ${xAxis}`,\n } = settings;\n\n return title;\n }\n\n static getTimeZoneDiff(\n calendarTimeZone: DhType.i18n.TimeZone,\n formatterTimeZone?: DhType.i18n.TimeZone\n ): number {\n return formatterTimeZone\n ? (calendarTimeZone.standardOffset - formatterTimeZone.standardOffset) /\n 60\n : 0;\n }\n\n /**\n * Creates closed periods for a partial holiday.\n *\n * @param holidayPeriods the business periods for the holiday\n * @param calendarPeriods the business periods for the calendar\n * @returns an array of closed ranges for the partial holiday. Should be the ranges during the regular business hours that are _not_ specified by the holiday periods.\n */\n static createClosedRangesForPartialHoliday(\n holidayPeriods: DhType.calendar.BusinessPeriod[],\n calendarPeriods: DhType.calendar.BusinessPeriod[]\n ): Range[] {\n // First restrict the periods to only those that are actual business periods.\n const calendarRanges: Range[] = calendarPeriods.map(period => [\n ChartUtils.periodToDecimal(period.open),\n ChartUtils.periodToDecimal(period.close),\n ]);\n calendarRanges.sort((a, b) => a[0] - b[0]);\n if (calendarRanges.length === 0) {\n calendarRanges.push([0, 24]);\n }\n const holidayRanges: Range[] = holidayPeriods.map(period => [\n ChartUtils.periodToDecimal(period.open),\n ChartUtils.periodToDecimal(period.close),\n ]);\n holidayRanges.sort((a, b) => a[0] - b[0]);\n\n const closedRanges: Range[] = [];\n\n // Separate index cursor for the holiday ranges\n for (let c = 0; c < calendarRanges.length; c += 1) {\n const calendarRange = calendarRanges[c];\n let lastClose = calendarRange[0];\n for (let h = 0; h < holidayRanges.length; h += 1) {\n const holidayRange = holidayRanges[h];\n if (holidayRange[1] > lastClose && holidayRange[0] < calendarRange[1]) {\n if (holidayRange[0] > lastClose) {\n closedRanges.push([lastClose, holidayRange[0]]);\n }\n // eslint-disable-next-line prefer-destructuring\n lastClose = holidayRange[1];\n }\n }\n if (lastClose < calendarRange[1]) {\n closedRanges.push([lastClose, calendarRange[1]]);\n }\n }\n return closedRanges;\n }\n\n private dh: typeof DhType;\n\n private daysOfWeek: readonly string[];\n\n constructor(dh: typeof DhType) {\n this.dh = dh;\n this.daysOfWeek = Object.freeze(dh.calendar.DayOfWeek.values());\n bindAllMethods(this);\n }\n\n /**\n * Retrieve the axis formats from the provided figure.\n * Currently defaults to just the x/y axes.\n * @param figure The figure to get the axis formats for\n * @param formatter The formatter to use when getting the axis format\n * @returns A map of axis layout property names to axis formats\n */\n getAxisFormats(\n figure: DhType.plot.Figure,\n formatter: Formatter\n ): Map<LayoutAxisKey, Partial<PlotlyAxis>> {\n const axisFormats = new Map();\n const nullFormat = { tickformat: null, ticksuffix: null };\n\n const allAxes = ChartUtils.getAllAxes(figure);\n const axisTypeMap = ChartUtils.groupArray(allAxes, 'type');\n const { charts } = figure;\n\n for (let i = 0; i < charts.length; i += 1) {\n const chart = charts[i];\n\n for (let j = 0; j < chart.series.length; j += 1) {\n const series = chart.series[j];\n const { sources } = series;\n const axisSources = sources.filter(source => source.axis);\n for (let k = 0; k < axisSources.length; k += 1) {\n const source = axisSources[k];\n const { axis } = source;\n const { type: axisType } = axis;\n const typeAxes = axisTypeMap.get(axisType);\n assertNotNull(typeAxes);\n const axisIndex = typeAxes.indexOf(axis);\n const axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n const axisLayoutProperty = ChartUtils.getAxisLayoutProperty(\n axisProperty,\n axisIndex\n );\n\n if (axisFormats.has(axisLayoutProperty)) {\n log.debug(`${axisLayoutProperty} already added.`);\n } else {\n log.debug(`Adding ${axisLayoutProperty} to axisFormats.`);\n const axisFormat = this.getPlotlyAxisFormat(source, formatter);\n if (axisFormat === null) {\n axisFormats.set(axisLayoutProperty, nullFormat);\n } else {\n axisFormats.set(axisLayoutProperty, axisFormat);\n\n const { businessCalendar } = axis;\n if (businessCalendar != null) {\n (axisFormat as RangebreakAxisFormat).rangebreaks =\n this.createRangeBreaksFromBusinessCalendar(\n businessCalendar,\n formatter\n );\n }\n\n if (axisFormats.size === chart.axes.length) {\n return axisFormats;\n }\n }\n }\n }\n }\n }\n }\n\n return axisFormats;\n }\n\n /**\n * Converts the Iris plot style into a plotly chart type\n * @param plotStyle The plotStyle to use, see dh.plot.SeriesPlotStyle\n * @param isBusinessTime If the plot is using business time for an axis\n * @param allowWebGL If WebGL is allowedd\n */\n getPlotlyChartType(\n plotStyle: DhType.plot.SeriesPlotStyle,\n isBusinessTime: boolean,\n allowWebGL = true\n ): PlotType | undefined {\n const { dh } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.SCATTER:\n case dh.plot.SeriesPlotStyle.LINE:\n // scattergl mode is more performant (usually), but doesn't support the rangebreaks we need for businessTime calendars\n // In some cases, WebGL is less performant (like in virtual desktop environments), so we also allow the option of the user explicitly disabling it even if it's supported\n return !isBusinessTime && IS_WEBGL_SUPPORTED && allowWebGL\n ? 'scattergl'\n : 'scatter';\n case dh.plot.SeriesPlotStyle.BAR:\n case dh.plot.SeriesPlotStyle.STACKED_BAR:\n return 'bar';\n\n case dh.plot.SeriesPlotStyle.PIE:\n return 'pie';\n\n case dh.plot.SeriesPlotStyle.TREEMAP:\n return 'treemap';\n\n case dh.plot.SeriesPlotStyle.HISTOGRAM:\n return 'histogram';\n\n case dh.plot.SeriesPlotStyle.OHLC:\n return 'ohlc';\n\n default:\n return undefined;\n }\n }\n\n /**\n * Converts the Iris plot style into a plotly chart mode\n * @param plotStyle The plotStyle to use, see dh.plot.SeriesPlotStyle.*\n * @param areLinesVisible Whether lines are visible or not\n * @param areShapesVisible Whether shapes are visible or not\n */\n getPlotlyChartMode(\n plotStyle: DhType.plot.SeriesPlotStyle,\n areLinesVisible?: boolean | null,\n areShapesVisible?: boolean | null\n ): PlotData['mode'] | undefined {\n const { dh } = this;\n const modes = new Set<PlotData['mode']>();\n\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.SCATTER:\n // Default to only showing shapes in scatter plots\n if (areLinesVisible ?? false) {\n modes.add(ChartUtils.MODE_LINES);\n }\n if (areShapesVisible ?? true) {\n modes.add(ChartUtils.MODE_MARKERS);\n }\n break;\n case dh.plot.SeriesPlotStyle.LINE:\n // Default to only showing lines in line series\n if (areLinesVisible ?? true) {\n modes.add(ChartUtils.MODE_LINES);\n }\n if (areShapesVisible ?? false) {\n modes.add(ChartUtils.MODE_MARKERS);\n }\n break;\n default:\n break;\n }\n\n return modes.size > 0\n ? ([...modes].join('+') as PlotData['mode'])\n : undefined;\n }\n\n /**\n * Get the property to set on the series data for plotly\n * @param plotStyle The plot style of the series\n * @param sourceType The source type for the series\n */\n getPlotlyProperty(\n plotStyle: DhType.plot.SeriesPlotStyle,\n sourceType: DhType.plot.SourceType\n ): string {\n const { dh } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.PIE:\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'labels';\n case dh.plot.SourceType.Y:\n return 'values';\n default:\n break;\n }\n break;\n case dh.plot.SeriesPlotStyle.OHLC:\n switch (sourceType) {\n case dh.plot.SourceType.TIME:\n return 'x';\n default:\n break;\n }\n break;\n case dh.plot.SeriesPlotStyle.TREEMAP:\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'ids';\n case dh.plot.SourceType.Y:\n return 'values';\n case dh.plot.SourceType.LABEL:\n return 'labels';\n case dh.plot.SourceType.PARENT:\n return 'parents';\n case dh.plot.SourceType.COLOR:\n return 'marker.colors';\n default:\n break;\n }\n break;\n default:\n break;\n }\n\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'x';\n case dh.plot.SourceType.Y:\n return 'y';\n case dh.plot.SourceType.Z:\n return 'z';\n case dh.plot.SourceType.X_LOW:\n return 'xLow';\n case dh.plot.SourceType.X_HIGH:\n return 'xHigh';\n case dh.plot.SourceType.Y_LOW:\n return 'yLow';\n case dh.plot.SourceType.Y_HIGH:\n return 'yHigh';\n case dh.plot.SourceType.TIME:\n return 'time';\n case dh.plot.SourceType.OPEN:\n return 'open';\n case dh.plot.SourceType.HIGH:\n return 'high';\n case dh.plot.SourceType.LOW:\n return 'low';\n case dh.plot.SourceType.CLOSE:\n return 'close';\n case dh.plot.SourceType.SHAPE:\n return 'shape';\n case dh.plot.SourceType.SIZE:\n return 'size';\n case dh.plot.SourceType.LABEL:\n return 'label';\n case dh.plot.SourceType.COLOR:\n return 'color';\n case dh.plot.SourceType.PARENT:\n return 'parent';\n case dh.plot.SourceType.HOVER_TEXT:\n return 'hovertext';\n case dh.plot.SourceType.TEXT:\n return 'text';\n default:\n throw new Error(`Unrecognized source type: ${sourceType}`);\n }\n }\n\n getPlotlySeriesOrientation(\n series: DhType.plot.Series\n ): 'h' | 'v' | undefined {\n const { dh } = this;\n const { sources } = series;\n if (sources.length === 2 && sources[0]?.axis?.type === dh.plot.AxisType.Y) {\n return ChartUtils.ORIENTATION.HORIZONTAL;\n }\n\n return ChartUtils.ORIENTATION.VERTICAL;\n }\n\n /**\n * Create a data series (trace) for use with plotly\n * @param series The series to create the series data with\n * @param axisTypeMap The map of axes grouped by type\n * @param seriesVisibility Visibility setting for the series\n * @returns The series data (trace) object for use with plotly.\n */\n makeSeriesDataFromSeries(\n series: DhType.plot.Series,\n axisTypeMap: AxisTypeMap,\n seriesVisibility: boolean | 'legendonly',\n showLegend: boolean | null = null,\n allowWebGL = true\n ): Partial<PlotData> {\n const {\n name,\n isLinesVisible,\n isShapesVisible,\n plotStyle,\n lineColor,\n shapeColor,\n sources,\n shape,\n shapeSize,\n } = series;\n\n const isBusinessTime = sources.some(\n source => source.axis?.businessCalendar\n );\n const type = this.getChartType(plotStyle, isBusinessTime, allowWebGL);\n const mode = this.getPlotlyChartMode(\n plotStyle,\n isLinesVisible ?? undefined,\n isShapesVisible ?? undefined\n );\n const orientation = this.getPlotlySeriesOrientation(series);\n const seriesData = ChartUtils.makeSeriesData(\n type,\n mode,\n name,\n showLegend,\n orientation\n );\n\n this.addSourcesToSeriesData(seriesData, plotStyle, sources, axisTypeMap);\n\n this.addStylingToSeriesData(\n seriesData,\n plotStyle,\n lineColor,\n shapeColor,\n shape,\n shapeSize,\n seriesVisibility\n );\n\n return seriesData;\n }\n\n addSourcesToSeriesData(\n seriesDataParam: Partial<PlotData>,\n plotStyle: DhType.plot.SeriesPlotStyle,\n sources: DhType.plot.SeriesDataSource[],\n axisTypeMap: AxisTypeMap\n ): void {\n const seriesData = seriesDataParam;\n for (let k = 0; k < sources.length; k += 1) {\n const source = sources[k];\n const { axis, type: sourceType } = source;\n\n const dataAttributeName = this.getPlotlyProperty(plotStyle, sourceType);\n set(seriesData, dataAttributeName, []);\n\n const axisProperty =\n axis != null ? this.getAxisPropertyName(axis.type) : null;\n if (axisProperty != null) {\n const axes = axisTypeMap.get(axis.type);\n if (axes) {\n const axisIndex = axes.indexOf(axis);\n const axisIndexString = axisIndex > 0 ? `${axisIndex + 1}` : '';\n seriesData[\n `${axisProperty}axis`\n ] = `${axisProperty}${axisIndexString}`;\n }\n }\n }\n }\n\n addStylingToSeriesData(\n seriesDataParam: Partial<PlotData>,\n plotStyle: DhType.plot.SeriesPlotStyle,\n lineColor: string | null = null,\n shapeColor: string | null = null,\n shape: string | null = null,\n shapeSize: number | null = null,\n seriesVisibility: 'legendonly' | boolean | null = null\n ): void {\n const { dh } = this;\n const seriesData = seriesDataParam;\n // Add some empty objects so we can fill them in later with details without checking for existence\n seriesData.marker = { line: {} }; // border line width on markers\n seriesData.line = {\n width: 1, // default line width for lines, should eventually be able to override\n };\n\n if (plotStyle === dh.plot.SeriesPlotStyle.AREA) {\n seriesData.fill = 'tozeroy';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.STACKED_AREA) {\n seriesData.stackgroup = 'stack';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.STEP) {\n seriesData.line.shape = 'hv'; // plot.ly horizontal then vertical step styling\n } else if (plotStyle === dh.plot.SeriesPlotStyle.HISTOGRAM) {\n // The default histfunc in plotly is 'count', but the data passed up from the API provides explicit x/y values and bins\n // Since it's converted to bar, just set the widths of each bar\n seriesData.width = [];\n } else if (plotStyle === dh.plot.SeriesPlotStyle.PIE) {\n seriesData.textinfo = 'label+percent';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.TREEMAP) {\n seriesData.hoverinfo = 'text';\n seriesData.textinfo = 'label+text';\n (seriesData as TreeMapData).tiling = {\n packing: 'squarify',\n pad: 0,\n };\n seriesData.textposition = 'middle center';\n }\n\n if (lineColor != null) {\n if (plotStyle === dh.plot.SeriesPlotStyle.BAR) {\n seriesData.marker.color = lineColor;\n } else {\n seriesData.line.color = lineColor;\n }\n }\n\n if (shapeColor != null) {\n seriesData.marker.color = shapeColor;\n }\n\n if (shape != null && shape.length > 0) {\n try {\n seriesData.marker.symbol = ChartUtils.getMarkerSymbol(shape);\n } catch (e) {\n log.warn('Unable to handle shape', shape, ':', e);\n }\n }\n\n if (shapeSize != null) {\n seriesData.marker.size = shapeSize * ChartUtils.DEFAULT_MARKER_SIZE;\n }\n\n // Skipping pie charts\n // Pie slice visibility is configured in chart layout instead of series data\n if (seriesVisibility != null && plotStyle !== dh.plot.SeriesPlotStyle.PIE) {\n seriesData.visible = seriesVisibility;\n }\n }\n\n getChartType(\n plotStyle: DhType.plot.SeriesPlotStyle,\n isBusinessTime: boolean,\n allowWebGL = true\n ): PlotType | undefined {\n const { dh } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.HISTOGRAM:\n // When reading data from the `Figure`, it already provides bins and values, so rather than using\n // plot.ly to calculate the bins and sum values, just convert it to a bar chart\n return 'bar';\n default:\n return this.getPlotlyChartType(plotStyle, isBusinessTime, allowWebGL);\n }\n }\n\n /**\n * Return the plotly axis property name\n * @param axisType The axis type to get the property name for\n */\n getAxisPropertyName(axisType: DhType.plot.AxisType): 'x' | 'y' | null {\n const { dh } = this;\n switch (axisType) {\n case dh.plot.AxisType.X:\n return 'x';\n case dh.plot.AxisType.Y:\n return 'y';\n default:\n return null;\n }\n }\n\n /**\n * Returns the plotly \"side\" value for the provided axis position\n * @param axisPosition The Iris AxisPosition of the axis\n */\n getAxisSide(\n axisPosition: DhType.plot.AxisPosition\n ): LayoutAxis['side'] | undefined {\n const { dh } = this;\n switch (axisPosition) {\n case dh.plot.AxisPosition.BOTTOM:\n return 'bottom';\n case dh.plot.AxisPosition.TOP:\n return 'top';\n case dh.plot.AxisPosition.LEFT:\n return 'left';\n case dh.plot.AxisPosition.RIGHT:\n return 'right';\n default:\n return undefined;\n }\n }\n\n /**\n * Update the layout with all the axes information for the provided figure\n * @param figure Figure to update the axes for\n * @param layoutParam Layout object to update in place\n * @param chartAxisRangeParser Function to retrieve the axis range parser\n * @param plotWidth Width of the plot in pixels\n * @param plotHeight Height of the plot in pixels\n */\n updateFigureAxes(\n layoutParam: Partial<Layout>,\n figure: DhType.plot.Figure,\n chartAxisRangeParser?: ChartAxisRangeParser,\n plotWidth = 0,\n plotHeight = 0\n ): void {\n const layout = layoutParam;\n const figureAxes = ChartUtils.getAllAxes(figure);\n for (let i = 0; i < figure.charts.length; i += 1) {\n const chart = figure.charts[i];\n const axisRangeParser = chartAxisRangeParser?.(chart);\n const bounds = this.getChartBounds(figure, chart, plotWidth, plotHeight);\n this.updateLayoutAxes(\n layout,\n chart.axes,\n figureAxes,\n plotWidth,\n plotHeight,\n bounds,\n axisRangeParser\n );\n }\n\n this.removeStaleAxes(layout, figureAxes);\n }\n\n getChartBounds(\n figure: DhType.plot.Figure,\n chart: DhType.plot.Chart,\n plotWidth: number,\n plotHeight: number\n ): ChartBounds {\n const { dh } = this;\n const { cols, rows } = figure;\n const { column, colspan, row, rowspan } = chart;\n\n const endColumn = column + colspan;\n const endRow = row + rowspan;\n const columnSize = 1 / cols;\n const rowSize = 1 / rows;\n const xMarginSize = ChartUtils.AXIS_SIZE_PX / plotWidth;\n const yMarginSize = ChartUtils.AXIS_SIZE_PX / plotHeight;\n\n const bounds: ChartBounds = {\n // Need to invert the row positioning so the first one defined shows up on top instead of the bottom, since coordinates start in bottom left\n bottom: (rows - endRow) * rowSize + (endRow < rows ? yMarginSize / 2 : 0),\n top: (rows - row) * rowSize - (row > 0 ? yMarginSize / 2 : 0),\n\n left: column * columnSize + (column > 0 ? xMarginSize / 2 : 0),\n right: endColumn * columnSize - (endColumn < cols ? xMarginSize / 2 : 0),\n };\n\n // Adjust the bounds based on where the legend is\n // For now, always assume the legend is shown on the right\n const axisPositionMap = ChartUtils.groupArray(chart.axes, 'position');\n const rightAxes = axisPositionMap.get(dh.plot.AxisPosition.RIGHT) ?? [];\n if (rightAxes.length > 0) {\n if (plotWidth > 0) {\n bounds.right -=\n (bounds.right - bounds.left) *\n Math.max(\n 0,\n Math.min(\n ChartUtils.LEGEND_WIDTH_PX / plotWidth,\n ChartUtils.MAX_LEGEND_SIZE\n )\n );\n } else {\n bounds.right -=\n (bounds.right - bounds.left) * ChartUtils.DEFAULT_AXIS_SIZE;\n }\n }\n\n return bounds;\n }\n\n getPlotlyDateFormat(\n formatter: Formatter | null,\n columnType: string,\n formatPattern: string | undefined | null\n ): Partial<LayoutAxis> {\n const { dh } = this;\n const tickformat =\n formatPattern == null\n ? undefined\n : formatPattern\n .replace('%', '%%')\n .replace(/S{9}/g, '%9f')\n .replace(/S{8}/g, '%8f')\n .replace(/S{7}/g, '%7f')\n .replace(/S{6}/g, '%6f')\n .replace(/S{5}/g, '%5f')\n .replace(/S{4}/g, '%4f')\n .replace(/S{3}/g, '%3f')\n .replace(/S{2}/g, '%2f')\n .replace(/S{1}/g, '%1f')\n .replace(/y{4}/g, '%Y')\n .replace(/y{2}/g, '%y')\n .replace(/M{4}/g, '%B')\n .replace(/M{3}/g, '%b')\n .replace(/M{2}/g, '%m')\n .replace(/M{1}/g, '%-m')\n .replace(/E{4,}/g, '%A')\n .replace(/E{1,}/g, '%a')\n .replace(/d{2}/g, '%d')\n .replace(/([^%]|^)d{1}/g, '$1%-d')\n .replace(/H{2}/g, '%H')\n .replace(/h{2}/g, '%I')\n .replace(/h{1}/g, '%-I')\n .replace(/m{2}/g, '%M')\n .replace(/s{2}/g, '%S')\n .replace(\"'T'\", 'T')\n .replace(' z', ''); // timezone added as suffix if necessary\n\n let ticksuffix;\n const dataFormatter = formatter?.getColumnTypeFormatter(columnType);\n if (\n dataFormatter != null &&\n isDateTimeColumnFormatter(dataFormatter) &&\n dataFormatter.dhTimeZone != null &&\n dataFormatter.showTimeZone\n ) {\n ticksuffix = dh.i18n.DateTimeFormat.format(\n ' z',\n new Date(),\n dataFormatter.dhTimeZone\n );\n }\n\n return {\n tickformat,\n ticksuffix,\n automargin: true,\n };\n }\n\n /**\n * Gets the plotly axis formatting information from the source passed in\n * @param source The Source to get the formatter information from\n * @param formatter The current formatter for formatting data\n */\n getPlotlyAxisFormat(\n source: DhType.plot.SeriesDataSource,\n formatter: Formatter | null = null\n ): Partial<PlotlyAxis> | null {\n const { dh } = this;\n const { axis, columnType } = source;\n const { formatPattern } = axis;\n\n let axisFormat = null;\n if (TableUtils.isDateType(columnType)) {\n axisFormat = this.getPlotlyDateFormat(\n formatter,\n columnType,\n formatPattern\n );\n axisFormat = ChartUtils.addTickSpacing(axisFormat, axis, true);\n } else if (TableUtils.isNumberType(columnType)) {\n axisFormat = ChartUtils.getPlotlyNumberFormat(\n formatter,\n columnType,\n formatPattern\n );\n axisFormat = ChartUtils.addTickSpacing(axisFormat, axis, false);\n }\n\n if (axis.formatType === dh.plot.AxisFormatType.CATEGORY) {\n if (axisFormat) {\n axisFormat.type = 'category';\n } else {\n axisFormat = {\n type: 'category' as PlotlyAxisType,\n tickformat: undefined,\n ticksuffix: undefined,\n };\n }\n }\n\n return axisFormat;\n }\n\n /**\n * Updates the axes positions and sizes in the layout object provided.\n * If the axis did not exist in the layout previously, it is created and added.\n * Any axis that no longer exists in axes is removed.\n * With Downsampling enabled, will also update the range on the axis itself as appropriate\n * @param layoutParam The layout object to update\n * @param chartAxes The chart axes to update the layout with\n * @param figureAxes All figure axes to update the layout with\n * @param plotWidth The width of the plot to calculate the axis sizes for\n * @param plotHeight The height of the plot to calculate the axis sizes for\n * @param bounds The bounds for this set of axes\n * @param axisRangeParser A function to retrieve the range parser for a given axis\n */\n updateLayoutAxes(\n layoutParam: Partial<Layout>,\n chartAxes: DhType.plot.Axis[],\n figureAxes: DhType.plot.Axis[],\n plotWidth = 0,\n plotHeight = 0,\n bounds: ChartBounds = { left: 0, top: 0, right: 1, bottom: 1 },\n axisRangeParser?: AxisRangeParser\n ): void {\n const { dh } = this;\n const xAxisSize =\n plotWidth > 0\n ? Math.max(\n ChartUtils.MIN_AXIS_SIZE,\n Math.min(\n ChartUtils.AXIS_SIZE_PX / plotHeight,\n ChartUtils.MAX_AXIS_SIZE\n )\n )\n : ChartUtils.DEFAULT_AXIS_SIZE;\n const yAxisSize =\n plotHeight > 0\n ? Math.max(\n ChartUtils.MIN_AXIS_SIZE,\n Math.min(\n ChartUtils.AXIS_SIZE_PX / plotWidth,\n ChartUtils.MAX_AXIS_SIZE\n )\n )\n : ChartUtils.DEFAULT_AXIS_SIZE;\n\n const layout = layoutParam;\n const axisPositionMap = ChartUtils.groupArray(chartAxes, 'position');\n const axisTypeMap = ChartUtils.groupArray(chartAxes, 'type');\n const axisTypes = [...axisTypeMap.keys()];\n const figureAxisTypeMap = ChartUtils.groupArray(figureAxes, 'type');\n for (let j = 0; j < axisTypes.length; j += 1) {\n const axisType = axisTypes[j];\n const axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n const typeAxes = axisTypeMap.get(axisType);\n const figureTypeAxes = figureAxisTypeMap.get(axisType);\n const isYAxis = axisType === dh.plot.AxisType.Y;\n const plotSize = isYAxis ? plotHeight : plotWidth;\n\n assertNotNull(typeAxes);\n assertNotNull(figureTypeAxes);\n for (\n let chartAxisIndex = 0;\n chartAxisIndex < typeAxes.length;\n chartAxisIndex += 1\n ) {\n const axis = typeAxes[chartAxisIndex];\n const figureAxisIndex = figureTypeAxes.indexOf(axis);\n const axisLayoutProperty = ChartUtils.getAxisLayoutProperty(\n axisProperty,\n figureAxisIndex\n );\n\n if (layout[axisLayoutProperty] == null) {\n layout[axisLayoutProperty] = {};\n }\n\n const layoutAxis = layout[axisLayoutProperty];\n if (layoutAxis != null) {\n this.updateLayoutAxis(\n layoutAxis,\n axis,\n chartAxisIndex,\n axisPositionMap,\n xAxisSize,\n yAxisSize,\n bounds\n );\n\n const { range, autorange } = layoutAxis;\n if (\n axisRangeParser != null &&\n range !== undefined &&\n (autorange === undefined || autorange === false)\n ) {\n const rangeParser = axisRangeParser(axis);\n const [rangeStart, rangeEnd] = rangeParser(range as Range);\n\n log.debug(\n 'Setting downsample range',\n plotSize,\n rangeStart,\n rangeEnd\n );\n\n axis.range(plotSize, rangeStart, rangeEnd);\n } else {\n axis.range(plotSize);\n }\n }\n }\n }\n }\n }\n\n /**\n * Remove any axes from the layout param that no longer belong to any series\n * @param layoutParam Layout object to remove stale axes from\n * @param axes All axes in the figure\n */\n removeStaleAxes(\n layoutParam: Partial<Layout>,\n axes: DhType.plot.Axis[]\n ): void {\n const layout = layoutParam;\n const figureAxisTypeMap = ChartUtils.groupArray(axes, 'type');\n const figureAxisTypes = [...figureAxisTypeMap.keys()];\n for (let i = 0; i < figureAxisTypes.length; i += 1) {\n const axisType = figureAxisTypes[i];\n const typeAxes = figureAxisTypeMap.get(axisType);\n assertNotNull(typeAxes);\n let axisIndex = typeAxes.length;\n // Delete any axes that may no longer exist\n const axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n let axisLayoutProperty = ChartUtils.getAxisLayoutProperty(\n axisProperty,\n axisIndex\n );\n while (layout[axisLayoutProperty] != null) {\n delete layout[axisLayoutProperty];\n\n axisIndex += 1;\n axisLayoutProperty = ChartUtils.getAxisLayoutProperty(\n axisProperty,\n axisIndex\n );\n }\n }\n }\n }\n\n /**\n * Updates the layout axis object in place\n * @param layoutAxisParam The plotly layout axis param\n * @param axis The Iris Axis to update the plotly layout with\n * @param axisIndex The type index for this axis\n * @param axisPositionMap All the axes mapped by position\n * @param axisSize The size of each axis in percent\n * @param bounds The bounds of the axes domains\n */\n updateLayoutAxis(\n layoutAxisParam: Partial<LayoutAxis>,\n axis: DhType.plot.Axis,\n axisIndex: number,\n axisPositionMap: AxisPositionMap,\n xAxisSize: number,\n yAxisSize: number,\n bounds: {\n left: number;\n bottom: number;\n top: number;\n right: number;\n }\n ): void {\n const { dh } = this;\n const isYAxis = axis.type === dh.plot.AxisType.Y;\n const axisSize = isYAxis ? yAxisSize : xAxisSize;\n const layoutAxis = layoutAxisParam;\n // Enterprise API returns null for empty axis labels\n // Passing null title text to Plotly results in incorrect axis position, DH-9164\n const label = axis.label ?? '';\n if (\n layoutAxis.title !== undefined &&\n typeof layoutAxis.title !== 'string'\n ) {\n layoutAxis.title.text = label;\n } else {\n layoutAxis.title = { text: label };\n }\n\n if (axis.log) {\n layoutAxis.type = 'log';\n }\n\n layoutAxis.side = this.getAxisSide(axis.position);\n\n if (axisIndex > 0) {\n layoutAxis.overlaying = this.getAxisPropertyName(axis.type) ?? undefined;\n\n const positionAxes = axisPositionMap.get(axis.position) ?? [];\n const sideIndex = positionAxes.indexOf(axis);\n if (sideIndex > 0) {\n layoutAxis.anchor = 'free';\n\n if (axis.position === dh.plot.AxisPosition.RIGHT) {\n layoutAxis.position =\n bounds.right + (sideIndex - positionAxes.length + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.TOP) {\n layoutAxis.position =\n bounds.top + (sideIndex - positionAxes.length + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.BOTTOM) {\n layoutAxis.position =\n bounds.bottom + (positionAxes.length - sideIndex + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.LEFT) {\n layoutAxis.position =\n bounds.left + (positionAxes.length - sideIndex + 1) * axisSize;\n }\n }\n } else if (axis.type === dh.plot.AxisType.X) {\n const leftAxes = axisPositionMap.get(dh.plot.AxisPosition.LEFT) || [];\n const rightAxes = axisPositionMap.get(dh.plot.AxisPosition.RIGHT) || [];\n const left = Math.max(\n bounds.left,\n bounds.left + (leftAxes.length - 1) * yAxisSize\n );\n const right = Math.min(\n bounds.right - (rightAxes.length - 1) * yAxisSize,\n bounds.right\n );\n layoutAxis.domain = [left, right];\n } else if (axis.type === dh.plot.AxisType.Y) {\n const bottomAxes = axisPositionMap.get(dh.plot.AxisPosition.BOTTOM) || [];\n const topAxes = axisPositionMap.get(dh.plot.AxisPosition.TOP) || [];\n const bottom = Math.max(\n bounds.bottom,\n bounds.bottom + (bottomAxes.length - 1) * xAxisSize\n );\n const top = Math.min(\n bounds.top - (topAxes.length - 1) * xAxisSize,\n bounds.top\n );\n layoutAxis.domain = [bottom, top];\n }\n\n // autorangeoptions exists in plotly.js but not in the types\n // axis.range only applies to the initial axis range, can't handle specifying min or max independently,\n // and cannot be returned to if the user changes the range via interaction\n // minallowed and maxallowed can be set independently and can be returned to if the user changes\n // the range via interaction\n const { minRange, maxRange, log: logAxis } = axis;\n if (!Number.isNaN(minRange) || !Number.isNaN(maxRange)) {\n layoutAxis.autorangeoptions = {};\n if (!Number.isNaN(minRange)) {\n layoutAxis.autorangeoptions.minallowed = logAxis\n ? Math.log10(minRange)\n : minRange;\n }\n if (!Number.isNaN(maxRange)) {\n layoutAxis.autorangeoptions.maxallowed = logAxis\n ? Math.log10(maxRange)\n : maxRange;\n }\n }\n }\n\n /**\n * Creates the bounds for the periods specified.\n * For example, if you pass in [['09:00', '17:00']], it will return [17, 9] (closing at 5pm, opening at 9am the next day)\n * If you pass [['09:00', '12:00'], ['13:00', '17:00']], it will return [12, 13] (closing at noon, opening at 1pm) and [17, 9] (closing at 5pm, opening at 9am the next day)\n * @param periods Periods to map\n * @param timeZoneDiff Time zone difference in hours\n * @returns Bounds for the periods in plotly format\n */\n // eslint-disable-next-line class-methods-use-this\n createBoundsFromPeriods(\n periods: DhType.calendar.BusinessPeriod[],\n timeZoneDiff = 0\n ): Range[] {\n if (periods.length === 0) {\n return [];\n }\n const numberPeriods = periods\n .map(period => [\n (ChartUtils.periodToDecimal(period.open) + timeZoneDiff) % 24,\n (ChartUtils.periodToDecimal(period.close) + timeZoneDiff) % 24,\n ])\n .sort((a, b) => a[0] - b[0]);\n\n const bounds: Range[] = [];\n for (let i = 0; i < numberPeriods.length; i += 1) {\n const period = numberPeriods[i];\n const nextPeriod = numberPeriods[(i + 1) % numberPeriods.length];\n bounds.push([period[1], nextPeriod[0]]);\n }\n return bounds;\n }\n\n /**\n * Creates range breaks for plotly from business periods.\n * @param periods Business periods to create the breaks for\n * @param timeZoneDiff Time zone difference in hours\n * @returns Plotly range breaks for the business periods\n */\n createBreaksFromPeriods(\n periods: DhType.calendar.BusinessPeriod[],\n timeZoneDiff = 0\n ): Rangebreaks[] {\n const bounds = this.createBoundsFromPeriods(periods, timeZoneDiff);\n return bounds.map(bound => ({\n pattern: 'hour',\n bounds: bound,\n }));\n }\n\n /**\n * Creates range break bounds for plotly from business days.\n * For example a standard business week of ['MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY']\n * will result in [[6,1]] meaning close on Saturday and open on Monday.\n * If you remove Wednesday from the array, then you get two closures [[6, 1], [3, 4]]\n *\n * @param businessDays the days to display on the x-axis\n */\n createBoundsFromDays(businessDays: string[]): Range[] {\n const weekLength = this.daysOfWeek.length;\n // No breaks if all days are business days\n if (businessDays.length === weekLength) {\n return [];\n }\n const businessDaysInt = businessDays.map(day =>\n this.daysOfWeek.indexOf(day)\n );\n const businessDaysSet = new Set(businessDaysInt);\n\n // These are the days when business is closed (e.g. Saturday to start the weekend)\n const closedDays = new Set<number>();\n for (let i = 0; i < weekLength; i += 1) {\n if (\n !businessDaysSet.has(i) &&\n businessDaysSet.has((i - 1 + weekLength) % weekLength)\n ) {\n closedDays.add(i);\n }\n }\n\n const boundsArray: Range[] = [];\n // For each close day, find the next open day\n closedDays.forEach(closedDay => {\n for (let i = 0; i < weekLength; i += 1) {\n const adjustedDay = (closedDay + i) % weekLength;\n if (businessDaysSet.has(adjustedDay)) {\n boundsArray.push([closedDay, adjustedDay]);\n return;\n }\n }\n throw new Error(\n `Unable to find open day for closed day ${closedDay}, businessDays: ${businessDays}`\n );\n });\n return boundsArray;\n }\n\n /**\n * Breaks in plotly for business days\n * @param businessDays Business days to create the breaks for\n * @returns Plotly range breaks for the business days\n */\n createBreaksFromDays(businessDays: string[]): Rangebreaks[] {\n const bounds = this.createBoundsFromDays(businessDays);\n return bounds.map(bound => ({\n pattern: 'day of week',\n bounds: bound,\n }));\n }\n\n /**\n * Creates range breaks for plotly from a business calendar.\n * @param businessCalendar Calendar to create the breaks from\n * @param formatter Formatter to use for time zones\n * @returns Plotly Rangebreaks for the business calendar\n */\n createRangeBreaksFromBusinessCalendar(\n businessCalendar: DhType.calendar.BusinessCalendar,\n formatter: Formatter\n ): Rangebreaks[] {\n const rangebreaks: Rangebreaks[] = [];\n const {\n businessPeriods,\n businessDays,\n holidays,\n timeZone: calendarTimeZone,\n } = businessCalendar;\n const typeFormatter =\n formatter?.getColumnTypeFormatter(BUSINESS_COLUMN_TYPE);\n let formatterTimeZone;\n if (isDateTimeColumnFormatter(typeFormatter)) {\n formatterTimeZone = typeFormatter.dhTimeZone;\n }\n const timeZoneDiff = ChartUtils.getTimeZoneDiff(\n calendarTimeZone,\n formatterTimeZone\n );\n if (holidays.length > 0) {\n rangebreaks.push(\n ...this.createRangeBreakValuesFromHolidays(\n holidays,\n calendarTimeZone,\n formatterTimeZone,\n businessCalendar\n )\n );\n }\n\n rangebreaks.push(\n ...this.createBreaksFromPeriods(businessPeriods, timeZoneDiff)\n );\n rangebreaks.push(...this.createBreaksFromDays(businessDays));\n\n return rangebreaks;\n }\n\n /**\n * Creates an array of range breaks for all holidays.\n *\n * @param holidays an array of holidays\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n * @param calendar the calendar the holidays are from\n */\n createRangeBreakValuesFromHolidays(\n holidays: DhType.calendar.Holiday[],\n calendarTimeZone: DhType.i18n.TimeZone,\n formatterTimeZone?: DhType.i18n.TimeZone,\n calendar?: DhType.calendar.BusinessCalendar\n ): Rangebreaks[] {\n const fullHolidays: string[] = [];\n const partialHolidays: {\n values: string[];\n dvalue: number;\n }[] = [];\n holidays.forEach(holiday => {\n if (holiday.businessPeriods.length > 0) {\n partialHolidays.push(\n ...this.createPartialHoliday(\n holiday,\n calendarTimeZone,\n formatterTimeZone,\n calendar\n )\n );\n } else {\n fullHolidays.push(\n this.createFullHoliday(holiday, calendarTimeZone, formatterTimeZone)\n );\n }\n });\n return [{ values: fullHolidays }, ...partialHolidays];\n }\n\n /**\n * Creates the range break value for a full holiday. A full holiday is day that has no business periods.\n *\n * @param holiday the full holiday\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n */\n createFullHoliday(\n holiday: DhType.calendar.Holiday,\n calendarTimeZone: DhType.i18n.TimeZone,\n formatterTimeZone?: DhType.i18n.TimeZone\n ): string {\n return this.adjustDateForTimeZone(\n `${holiday.date.toString()} 00:00:00.000000`,\n calendarTimeZone,\n formatterTimeZone\n );\n }\n\n /**\n * Creates the range break for a partial holiday. A partial holiday is holiday with business periods\n * that are different than the default business periods.\n *\n * @param holiday the partial holiday\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n * @param calendar the calendar the holiday is from. Used to check against the default business periods to ensure this holiday needs to be specified\n *\n * @returns an array of range breaks for the partial holiday\n */\n createPartialHoliday(\n holiday: DhType.calendar.Holiday,\n calendarTimeZone: DhType.i18n.TimeZone,\n formatterTimeZone?: DhType.i18n.TimeZone,\n calendar?: DhType.calendar.BusinessCalendar\n ): {\n values: string[];\n dvalue: number;\n }[] {\n if (holiday.businessPeriods.length === 0) {\n return [];\n }\n\n const dateString = holiday.date.toString();\n\n // First check that the holiday is on a business day. If it's not, we can ignore it\n if (calendar) {\n const dayOfWeek = new Date(dateString).getDay();\n const isBusinessDay = calendar.businessDays.includes(\n this.daysOfWeek[dayOfWeek]\n );\n if (!isBusinessDay) {\n return [];\n }\n }\n\n const closedPeriods = ChartUtils.createClosedRangesForPartialHoliday(\n holiday.businessPeriods,\n calendar?.businessPeriods ?? []\n );\n\n const rangeBreaks = [];\n for (let i = 0; i < closedPeriods.length; i += 1) {\n const [closeStart, closeEnd] = closedPeriods[i];\n // Skip over any periods where start and close are the same (zero hours)\n if (closeStart !== closeEnd) {\n const values = [\n this.adjustDateForTimeZone(\n `${dateString} ${ChartUtils.decimalToPeriod(closeStart)}:00.000000`,\n calendarTimeZone,\n formatterTimeZone\n ),\n ];\n const dvalue = MILLIS_PER_HOUR * (closeEnd - closeStart);\n rangeBreaks.push({ values, dvalue });\n }\n }\n return rangeBreaks;\n }\n\n /**\n * Adjusts a date string from the calendar time zone to the formatter time zone.\n *\n * @param dateString the date string\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n */\n adjustDateForTimeZone(\n dateString: string,\n calendarTimeZone: DhType.i18n.TimeZone,\n formatterTimeZone?: DhType.i18n.TimeZone\n ): string {\n if (\n formatterTimeZone &&\n formatterTimeZone.standardOffset !== calendarTimeZone.standardOffset\n ) {\n return this.unwrapValue(\n this.wrapValue(dateString, BUSINESS_COLUMN_TYPE, calendarTimeZone),\n formatterTimeZone\n ) as string;\n }\n return dateString;\n }\n\n /**\n * Creates the Figure settings from the Chart Builder settings\n * This should be deprecated at some point, and have Chart Builder create the figure settings directly.\n * This logic will still need to exist to translate existing charts, but could be part of a migration script\n * to translate the data.\n * Change when we decide to add more functionality to the Chart Builder.\n * @param settings The chart builder settings\n * @param settings.title The title for this figure\n * @param settings.xAxis The name of the column to use for the x-axis\n * @param settings.series The name of the columns to use for the series of this figure\n * @param settings.type The plot style for this figure\n */\n makeFigureSettings(\n settings: ChartModelSettings,\n table: DhType.Table\n ): {\n charts: {\n chartType: string;\n axes: { formatType: string; type: string; position: string }[];\n series: {\n plotStyle: string;\n name: string;\n dataSources: {\n type: string;\n columnName: string;\n axis: { formatType: string; type: string; position: string };\n table: DhType.Table;\n }[];\n }[];\n }[];\n title: string;\n } {\n const { dh } = this;\n const { series, xAxis: settingsAxis, type } = settings;\n const title = ChartUtils.titleFromSettings(settings);\n const xAxis = {\n formatType: `${dh.plot.AxisFormatType.NUMBER}`,\n type: `${dh.plot.AxisType.X}`,\n position: `${dh.plot.AxisPosition.BOTTOM}`,\n };\n const yAxis = {\n formatType: `${dh.plot.AxisFormatType.NUMBER}`,\n type: `${dh.plot.AxisType.Y}`,\n position: `${dh.plot.AxisPosition.LEFT}`,\n };\n\n return {\n charts: [\n {\n chartType: `${dh.plot.ChartType.XY}`,\n axes: [xAxis, yAxis],\n series: (series ?? []).map(name => ({\n plotStyle: `${type}`,\n name,\n dataSources: [\n {\n type: `${dh.plot.SourceType.X}`,\n columnName: settingsAxis ?? '',\n axis: xAxis,\n table,\n },\n {\n type: `${dh.plot.SourceType.Y}`,\n columnName: name,\n axis: yAxis,\n table,\n },\n ],\n })),\n },\n ],\n title,\n };\n }\n\n /**\n * Unwraps a value provided from API to a value plotly can understand\n * Eg. Unwraps DateWrapper, LongWrapper objects.\n */\n unwrapValue(value: unknown, timeZone?: DhType.i18n.TimeZone): unknown {\n const { dh } = this;\n if (value != null) {\n if (isDateWrapper(value)) {\n return dh.i18n.DateTimeFormat.format(\n ChartUtils.DATE_FORMAT,\n value,\n timeZone\n );\n }\n\n if (isLongWrapper(value)) {\n return value.asNumber();\n }\n }\n\n return value;\n }\n\n /**\n *\n * @param value The value to wrap up\n * @param columnType The type of column this value is from\n * @param timeZone The time zone if applicable\n */\n wrapValue(\n value: unknown,\n columnType: string,\n timeZone: DhType.i18n.TimeZone | null = null\n ): unknown {\n const { dh } = this;\n if (TableUtils.isDateType(columnType) && typeof value === 'string') {\n // Need to limit the format to the actual length of the string range set in plotly\n // Otherwise parse will fail\n const text = value;\n const format = ChartUtils.DATE_FORMAT.substr(0, value.length);\n const date = dh.i18n.DateTimeFormat.parse(format, text);\n if (!timeZone) {\n return date;\n }\n\n // IDS-5994 Due to date parsing, time zone, and daylight savings shenanigans, we need\n // to pass the actual offset with the time to have it parse correctly.\n // However, the offset can change based on the date because of Daylight Savings\n // So we end up parsing the date multiple times. And curse daylight savings.\n const tzFormat = `${format} Z`;\n const estimatedOffset = dh.i18n.DateTimeFormat.format(\n 'Z',\n date,\n timeZone\n );\n const estimatedDate = dh.i18n.DateTimeFormat.parse(\n tzFormat,\n `${text} ${estimatedOffset}`\n );\n const offset = dh.i18n.DateTimeFormat.format(\n 'Z',\n estimatedDate,\n timeZone\n );\n return dh.i18n.DateTimeFormat.parse(tzFormat, `${text} ${offset}`);\n }\n\n return value;\n }\n\n makeLayoutAxis(\n type: DhType.plot.AxisType | null,\n theme: Partial<ChartTheme>\n ): Partial<LayoutAxis> {\n const { dh } = this;\n const axis = {\n automargin: true,\n gridcolor: theme.gridcolor,\n linecolor: theme.linecolor,\n rangeslider: { visible: false },\n showline: true,\n ticks: 'outside' as const,\n ticklen: 5, // act as padding, can't find a tick padding\n tickcolor: theme.paper_bgcolor, // hide ticks as padding\n tickfont: {\n color: theme.zerolinecolor,\n },\n title: {\n font: {\n color: theme.title_color,\n },\n },\n legend: {\n font: {\n color: theme.legend_color,\n },\n },\n };\n\n if (type === dh.plot.AxisType.X) {\n Object.assign(axis, {\n showgrid: true,\n });\n } else if (type === dh.plot.AxisType.Y) {\n Object.assign(axis, {\n zerolinecolor: theme.zerolinecolor,\n zerolinewidth: 2,\n });\n }\n\n return axis;\n }\n\n /**\n * Creates a plotly layout template object based on a given theme.\n * See https://plotly.com/javascript/reference/layout/#layout-template\n * @param theme The theme to use for the layout template\n * @returns The layout template object\n */\n makeDefaultTemplate(theme: ChartTheme): Template {\n /* eslint-disable camelcase */\n const {\n error_band_line_color,\n ohlc_increasing,\n ohlc_decreasing,\n title_color,\n indicator_increasing,\n indicator_decreasing,\n indicator_gauge,\n } = theme;\n\n return {\n data: {\n bar: [\n {\n marker: {\n line: { color: 'transparent' },\n },\n },\n ],\n scatter: [\n {\n error_x: { color: error_band_line_color } as ErrorBar,\n error_y: { color: error_band_line_color } as ErrorBar,\n },\n ],\n ohlc: [\n {\n increasing: { line: { color: ohlc_increasing } },\n decreasing: { line: { color: ohlc_decreasing } },\n },\n ],\n pie: [\n {\n outsidetextfont: {\n color: title_color,\n },\n },\n ],\n treemap: [\n {\n outsidetextfont: {\n color: title_color,\n },\n },\n ],\n indicator: [\n {\n title: { font: { color: title_color } },\n delta: {\n decreasing: {\n color: indicator_decreasing,\n } as Delta['increasing'],\n increasing: {\n color: indicator_increasing,\n } as Delta['decreasing'],\n },\n gauge: { bar: { color: indicator_gauge } },\n },\n ],\n },\n /* eslint-enable camelcase */\n layout: this.makeDefaultLayout(theme),\n };\n }\n\n /**\n * Creates a plotly layout object based on a given theme.\n * See https://plotly.com/javascript/reference/layout/\n * @param theme The theme to use for the layout\n */\n makeDefaultLayout(theme: ChartTheme): Partial<Layout> {\n const { dh } = this;\n\n const {\n /* Used as top level properties of `Layout` */\n /* eslint-disable camelcase */\n paper_bgcolor,\n plot_bgcolor,\n title_color,\n coastline_color,\n land_color,\n ocean_color,\n lake_color,\n river_color,\n /* eslint-disable camelcase */\n } = theme;\n\n const layout: Partial<Layout> = {\n paper_bgcolor,\n plot_bgcolor,\n autosize: true,\n colorway: ChartUtils.normalizeColorway(theme?.colorway),\n font: {\n family: \"'Fira Sans', sans-serif\",\n color: title_color,\n },\n title: {\n font: {\n color: title_color,\n },\n xanchor: 'center',\n xref: 'paper',\n yanchor: 'top',\n pad: { ...ChartUtils.DEFAULT_TITLE_PADDING },\n y: 1,\n },\n legend: {\n font: {\n color: title_color,\n },\n },\n margin: { ...ChartUtils.DEFAULT_MARGIN },\n xaxis: this.makeLayoutAxis(dh.plot.AxisType.X, theme),\n yaxis: this.makeLayoutAxis(dh.plot.AxisType.Y, theme),\n polar: {\n angularaxis: this.makeLayoutAxis(dh.plot.AxisType.SHAPE, theme),\n radialaxis: this.makeLayoutAxis(dh.plot.AxisType.SHAPE, theme),\n bgcolor: theme.plot_bgcolor,\n },\n scene: {\n xaxis: this.makeLayoutAxis(dh.plot.AxisType.X, theme),\n yaxis: this.makeLayoutAxis(dh.plot.AxisType.Y, theme),\n zaxis: this.makeLayoutAxis(null, theme),\n },\n geo: {\n showcoastlines: true,\n showframe: false,\n showland: true,\n showocean: true,\n showlakes: true,\n showrivers: true,\n bgcolor: paper_bgcolor,\n coastlinecolor: coastline_color,\n landcolor: land_color,\n oceancolor: ocean_color,\n lakecolor: lake_color,\n rivercolor: river_color,\n },\n };\n layout.datarevision = 0;\n\n return layout;\n }\n\n /**\n * Hydrate settings from a JSONable object\n * @param settings Dehydrated settings\n */\n hydrateSettings(\n settings: ChartModelSettings\n ): Omit<ChartModelSettings, 'type'> & { type?: DhType.plot.SeriesPlotStyle } {\n const { dh } = this;\n return {\n ...settings,\n type:\n settings.type != null\n ? dh.plot.SeriesPlotStyle[settings.type]\n : undefined,\n };\n }\n}\n\nexport default ChartUtils;\n"],"mappings":";;;;;AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAIEC,UAAU,QACL,wBAAwB;AAE/B,SAASC,GAAG,QAAQ,QAAQ;AAa5B,SAASC,aAAa,EAAEC,cAAc,QAAoB,kBAAkB;AAyF5E,IAAMC,GAAG,GAAGL,GAAG,CAACM,MAAM,CAAC,YAAY,CAAC;AAEpC,IAAMC,oBAAoB,GAAG,4BAA4B;AAEzD,IAAMC,eAAe,GAAG,OAAO;AAE/B,IAAMC,eAAe,GAAG,OAAO;AAE/B,SAASC,aAAaA,CAACC,KAAc,EAA+B;EAClE,OAAQA,KAAK,CAAwBC,MAAM,KAAKC,SAAS;AAC3D;AAEA,SAASC,aAAaA,CAACH,KAAc,EAA+B;EAClE,OAAQA,KAAK,CAAwBI,QAAQ,KAAKF,SAAS;AAC7D;AAEA,SAASG,yBAAyBA,CAChCL,KAA2B,EACO;EAClC,OAAQA,KAAK,CAA6BM,UAAU,KAAKJ,SAAS;AACpE;AAEA,SAASK,kBAAkBA,CAACP,KAAc,EAA+B;EACvE,OACEA,KAAK,IAAI,IAAI,IACZA,KAAK,CAAgBQ,KAAK,IAAI,IAAI,KACjCR,KAAK,CAAgBS,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,UAAU,iBAaOuF,MAAM,CAAC4D,MAAM,CAAC;EACjCoE,UAAU,EAAE,GAAG;EACfjJ,QAAQ,EAAE;AACZ,CAAU,CAAC;AAAA2E,eAAA,CAhBPjJ,UAAU,iBAkBO,4BAA4B;AAAAiJ,eAAA,CAlB7CjJ,UAAU,oBAoBUuF,MAAM,CAAC4D,MAAM,CAAC;EAAEqV,CAAC,EAAE,EAAE;EAAEC,CAAC,EAAE,EAAE;EAAEC,CAAC,EAAE,EAAE;EAAEnW,CAAC,EAAE,EAAE;EAAE6G,GAAG,EAAE;AAAE,CAAC,CAAC;AAAAnG,eAAA,CApBzEjJ,UAAU,2BAsBiBuF,MAAM,CAAC4D,MAAM,CAAC;EAAEuV,CAAC,EAAE;AAAE,CAAC,CAAC;AAAAzV,eAAA,CAtBlDjJ,UAAU,0BAwBgB,EAAE;AAAAiJ,eAAA,CAxB5BjJ,UAAU,yBA0Be,CAAC;AAAAiJ,eAAA,CA1B1BjJ,UAAU,kBA4B0B,SAAS;AAAAiJ,eAAA,CA5B7CjJ,UAAU,gBA8BwB,OAAO;AA2+D/C,eAAeA,UAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"ChartUtils.js","names":["Log","TableUtils","set","assertNotNull","bindAllMethods","log","module","BUSINESS_COLUMN_TYPE","MILLIS_PER_HOUR","NANOS_PER_MILLI","isDateWrapper","value","asDate","undefined","isLongWrapper","asNumber","isDateTimeColumnFormatter","dhTimeZone","isRangedPlotlyAxis","range","autorange","isWebGLSupported","canvas","document","createElement","gl","getContext","WebGLRenderingContext","e","IS_WEBGL_SUPPORTED","ChartUtils","getPlotlyErrorBars","x","xLow","xHigh","array","map","i","arrayminus","type","symmetric","convertNumberPrefix","prefix","replace","getPlotlyNumberFormat","formatter","columnType","formatPattern","subpatterns","split","matchArray","match","placeholderDigits","zeroDigits","decimalDigits","optionalDecimalDigits","numberType","percentSign","suffix","paddingLength","length","isCommaSeparated","indexOf","comma","plotlyNumberType","decimalLength","trimOption","tickformat","concat","tickprefix","ticksuffix","automargin","addTickSpacing","axisFormat","axis","isDateType","gapBetweenMajorTicks","updatedFormat","tickSpacing","Math","tickmode","dtick","getSourceForAxis","chart","series","j","sources","source","getSeriesVisibility","name","settings","hiddenSeries","includes","getHiddenLabels","makeSeriesData","mode","showLegend","orientation","arguments","ORIENTATION","VERTICAL","showlegend","getMarkerSymbol","deephavenShape","Error","getAllAxes","figure","charts","reduce","axes","getAxisTypeMap","groupArray","getChartForSeries","getLayoutRanges","layout","ranges","keys","Object","filter","key","getAxisLayoutProperty","axisProperty","axisIndex","axisIndexString","periodToDecimal","period","values","Number","decimalToPeriod","decimal","hours","floor","minutes","round","toString","padStart","property","result","item","_result$get","group","get","push","Map","normalizeColorway","colorway","Array","isArray","warn","titleFromSettings","xAxis","title","join","getTimeZoneDiff","calendarTimeZone","formatterTimeZone","standardOffset","createClosedRangesForPartialHoliday","holidayPeriods","calendarPeriods","calendarRanges","open","close","sort","a","b","holidayRanges","closedRanges","c","calendarRange","lastClose","h","holidayRange","constructor","dh","_defineProperty","daysOfWeek","freeze","calendar","DayOfWeek","getAxisFormats","axisFormats","nullFormat","allAxes","axisTypeMap","axisSources","k","axisType","typeAxes","getAxisPropertyName","axisLayoutProperty","has","debug","getPlotlyAxisFormat","businessCalendar","rangebreaks","createRangeBreaksFromBusinessCalendar","size","getPlotlyChartType","plotStyle","isBusinessTime","allowWebGL","plot","SeriesPlotStyle","SCATTER","LINE","BAR","STACKED_BAR","PIE","TREEMAP","HISTOGRAM","OHLC","getPlotlyChartMode","areLinesVisible","areShapesVisible","modes","Set","add","MODE_LINES","MODE_MARKERS","getPlotlyProperty","sourceType","SourceType","X","Y","TIME","LABEL","PARENT","COLOR","Z","X_LOW","X_HIGH","Y_LOW","Y_HIGH","OPEN","HIGH","LOW","CLOSE","SHAPE","SIZE","HOVER_TEXT","TEXT","getPlotlySeriesOrientation","_sources$","AxisType","HORIZONTAL","makeSeriesDataFromSeries","seriesVisibility","isLinesVisible","isShapesVisible","lineColor","shapeColor","shape","shapeSize","some","_source$axis","getChartType","seriesData","addSourcesToSeriesData","addStylingToSeriesData","seriesDataParam","dataAttributeName","marker","line","width","AREA","fill","STACKED_AREA","stackgroup","STEP","textinfo","hoverinfo","tiling","packing","pad","textposition","color","symbol","DEFAULT_MARKER_SIZE","visible","getAxisSide","axisPosition","AxisPosition","BOTTOM","TOP","LEFT","RIGHT","updateFigureAxes","layoutParam","chartAxisRangeParser","plotWidth","plotHeight","figureAxes","axisRangeParser","bounds","getChartBounds","updateLayoutAxes","removeStaleAxes","_axisPositionMap$get","cols","rows","column","colspan","row","rowspan","endColumn","endRow","columnSize","rowSize","xMarginSize","AXIS_SIZE_PX","yMarginSize","bottom","top","left","right","axisPositionMap","rightAxes","max","min","LEGEND_WIDTH_PX","MAX_LEGEND_SIZE","DEFAULT_AXIS_SIZE","getPlotlyDateFormat","dataFormatter","getColumnTypeFormatter","showTimeZone","i18n","DateTimeFormat","format","Date","isNumberType","formatType","AxisFormatType","CATEGORY","chartAxes","xAxisSize","MIN_AXIS_SIZE","MAX_AXIS_SIZE","yAxisSize","axisTypes","figureAxisTypeMap","figureTypeAxes","isYAxis","plotSize","chartAxisIndex","figureAxisIndex","layoutAxis","updateLayoutAxis","rangeParser","rangeStart","rangeEnd","figureAxisTypes","layoutAxisParam","_axis$label","axisSize","label","text","side","position","_this$getAxisProperty","_axisPositionMap$get2","overlaying","positionAxes","sideIndex","anchor","leftAxes","domain","bottomAxes","topAxes","minRange","maxRange","logAxis","isNaN","autorangeoptions","minallowed","log10","maxallowed","createBoundsFromPeriods","periods","timeZoneDiff","numberPeriods","nextPeriod","createBreaksFromPeriods","bound","pattern","createBoundsFromDays","businessDays","weekLength","businessDaysInt","day","businessDaysSet","closedDays","boundsArray","forEach","closedDay","adjustedDay","createBreaksFromDays","businessPeriods","holidays","timeZone","typeFormatter","createRangeBreakValuesFromHolidays","fullHolidays","partialHolidays","holiday","createPartialHoliday","createFullHoliday","adjustDateForTimeZone","date","_calendar$businessPer","dateString","dayOfWeek","getDay","isBusinessDay","closedPeriods","rangeBreaks","closeStart","closeEnd","dvalue","unwrapValue","wrapValue","makeFigureSettings","table","settingsAxis","NUMBER","yAxis","chartType","ChartType","XY","dataSources","columnName","DATE_FORMAT","substr","parse","tzFormat","estimatedOffset","estimatedDate","offset","makeLayoutAxis","theme","gridcolor","linecolor","rangeslider","showline","ticks","ticklen","tickcolor","paper_bgcolor","tickfont","zerolinecolor","font","title_color","legend","legend_color","assign","showgrid","zerolinewidth","makeDefaultTemplate","error_band_line_color","ohlc_increasing","ohlc_decreasing","indicator_increasing","indicator_decreasing","indicator_gauge","data","bar","scatter","error_x","error_y","ohlc","increasing","decreasing","pie","outsidetextfont","treemap","indicator","delta","gauge","makeDefaultLayout","plot_bgcolor","coastline_color","land_color","ocean_color","lake_color","river_color","map_style","autosize","family","xanchor","xref","yanchor","_objectSpread","DEFAULT_TITLE_PADDING","y","margin","DEFAULT_MARGIN","xaxis","yaxis","polar","angularaxis","radialaxis","bgcolor","scene","zaxis","geo","showcoastlines","showframe","showland","showocean","showlakes","showrivers","coastlinecolor","landcolor","oceancolor","lakecolor","rivercolor","style","datarevision","hydrateSettings","l","r","t"],"sources":["../src/ChartUtils.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport {\n type DateTimeColumnFormatter,\n type Formatter,\n type TableColumnFormatter,\n TableUtils,\n} from '@deephaven/jsapi-utils';\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport { set } from 'lodash';\nimport type {\n Layout,\n PlotData,\n PlotType,\n Axis as PlotlyAxis,\n ErrorBar,\n LayoutAxis,\n AxisType as PlotlyAxisType,\n MarkerSymbol,\n Template,\n Delta,\n} from 'plotly.js';\nimport { assertNotNull, bindAllMethods, type Range } from '@deephaven/utils';\nimport { type ChartTheme } from './ChartTheme';\n\nexport type FilterColumnMap = Map<\n string,\n {\n name: string;\n type: string;\n }\n>;\n\nexport type FilterMap = Map<string, unknown>;\n\nexport interface ChartModelSettings {\n hiddenSeries?: string[];\n type?: keyof typeof DhType.plot.SeriesPlotStyle;\n series?: string[];\n xAxis?: string;\n title?: string;\n}\n\nexport interface SeriesData {\n type: string | null;\n mode: string | null;\n name: string;\n orientation: string;\n xaxis?: number;\n marker?: unknown;\n xLow?: number;\n xHigh?: number;\n}\n\nexport type RangeParser = (range: Range) => unknown[];\n\nexport type AxisRangeParser = (axis: DhType.plot.Axis) => RangeParser;\n\nexport type ChartAxisRangeParser = (\n chart: DhType.plot.Chart\n) => AxisRangeParser;\n\ntype LayoutAxisKey =\n | 'xaxis'\n | 'xaxis2'\n | 'xaxis3'\n | 'xaxis4'\n | 'xaxis5'\n | 'xaxis6'\n | 'xaxis7'\n | 'xaxis8'\n | 'xaxis9'\n | 'yaxis'\n | 'yaxis2'\n | 'yaxis3'\n | 'yaxis4'\n | 'yaxis5'\n | 'yaxis6'\n | 'yaxis7'\n | 'yaxis8'\n | 'yaxis9';\n\nexport interface TreeMapData extends PlotData {\n tiling: {\n packing: 'squarify';\n pad: 0;\n };\n}\n\ninterface Rangebreaks {\n bounds?: number[];\n dvalue?: number;\n enable?: boolean;\n name?: string;\n pattern?: 'day of week' | 'hour' | '';\n values?: string[];\n}\ninterface RangebreakAxisFormat extends PlotlyAxis {\n rangebreaks: Rangebreaks[];\n}\n\nexport type ChartBounds = {\n left: number;\n right: number;\n top: number;\n bottom: number;\n};\n\nexport type AxisTypeMap = Map<DhType.plot.AxisType, DhType.plot.Axis[]>;\ntype AxisPositionMap = Map<DhType.plot.AxisPosition, DhType.plot.Axis[]>;\n\nconst log = Log.module('ChartUtils');\n\nconst BUSINESS_COLUMN_TYPE = 'io.deephaven.time.DateTime';\n\nconst MILLIS_PER_HOUR = 3600000;\n\nconst NANOS_PER_MILLI = 1000000;\n\nfunction isDateWrapper(value: unknown): value is DhType.DateWrapper {\n return (value as DhType.DateWrapper).asDate !== undefined;\n}\n\nfunction isLongWrapper(value: unknown): value is DhType.LongWrapper {\n return (value as DhType.LongWrapper).asNumber !== undefined;\n}\n\nfunction isDateTimeColumnFormatter(\n value: TableColumnFormatter\n): value is DateTimeColumnFormatter {\n return (value as DateTimeColumnFormatter).dhTimeZone !== undefined;\n}\n\nfunction isRangedPlotlyAxis(value: unknown): value is { range: Range[] } {\n return (\n value != null &&\n (value as PlotlyAxis).range != null &&\n ((value as PlotlyAxis).autorange === false ||\n (value as PlotlyAxis).autorange === undefined)\n );\n}\n\n/**\n * Check if WebGL is supported in the current environment.\n * Most modern browsers do support WebGL, but it's possible to disable it and it is also not available\n * in some headless environments, which can affect e2e tests.\n *\n * https://github.com/microsoft/playwright/issues/13146\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1375585\n *\n * @returns True if Web GL is supported, false otherwise\n */\nexport function isWebGLSupported(): boolean {\n try {\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/By_example/Detect_WebGL\n const canvas = document.createElement('canvas');\n const gl =\n canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\n return gl != null && gl instanceof WebGLRenderingContext;\n } catch (e) {\n return false;\n }\n}\n\nconst IS_WEBGL_SUPPORTED = isWebGLSupported();\n\nclass ChartUtils {\n static DEFAULT_AXIS_SIZE = 0.15;\n\n static MIN_AXIS_SIZE = 0.025;\n\n static MAX_AXIS_SIZE = 0.2;\n\n static AXIS_SIZE_PX = 75;\n\n static LEGEND_WIDTH_PX = 50;\n\n static MAX_LEGEND_SIZE = 0.25;\n\n static ORIENTATION = Object.freeze({\n HORIZONTAL: 'h',\n VERTICAL: 'v',\n } as const);\n\n static DATE_FORMAT = 'yyyy-MM-dd HH:mm:ss.SSSSSS';\n\n static DEFAULT_MARGIN = Object.freeze({ l: 60, r: 50, t: 30, b: 60, pad: 0 });\n\n static DEFAULT_TITLE_PADDING = Object.freeze({ t: 8 });\n\n static SUBTITLE_LINE_HEIGHT = 25;\n\n static DEFAULT_MARKER_SIZE = 6;\n\n static MODE_MARKERS: PlotData['mode'] = 'markers';\n\n static MODE_LINES: PlotData['mode'] = 'lines';\n\n /**\n * Generate the plotly error bar data from the passed in data.\n * Iris passes in the values as absolute, plotly needs them as relative.\n * @param x The main data array\n * @param xLow The absolute low values\n * @param xHigh\n *\n * @returns The error_x object required by plotly, or null if none is required\n */\n static getPlotlyErrorBars(\n x: number[],\n xLow: number[],\n xHigh: number[]\n ): ErrorBar {\n const array = xHigh.map((value, i) => value - x[i]);\n const arrayminus = xLow.map((value, i) => x[i] - value);\n return {\n type: 'data',\n symmetric: false,\n array,\n arrayminus,\n };\n }\n\n static convertNumberPrefix(prefix: string): string {\n return prefix.replace(/\\u00A4\\u00A4/g, 'USD').replace(/\\u00A4/g, '$');\n }\n\n static getPlotlyNumberFormat(\n formatter: Formatter | null,\n columnType: string,\n formatPattern: string | null | undefined\n ): Partial<LayoutAxis> | null {\n if (formatPattern == null || formatPattern === '') {\n return null;\n }\n\n // We translate java formatting: https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html\n // Into d3 number formatting: https://github.com/d3/d3-format\n // We can't translate number formatting exactly, but should be able to translate the most common cases\n // First split it into the subpatterns; currently only handling the positive subpattern, ignoring the rest\n const subpatterns = formatPattern.split(';');\n\n const matchArray = subpatterns[0].match(\n /^([^#,0.]*)([#,]*)([0,]*)(\\.?)(0*)(#*)(E?0*)(%?)(.*)/\n );\n assertNotNull(matchArray);\n\n const [\n ,\n prefix,\n placeholderDigits,\n zeroDigits,\n ,\n decimalDigits,\n optionalDecimalDigits,\n numberType,\n percentSign,\n suffix,\n ] = matchArray;\n\n const paddingLength = zeroDigits.replace(',', '').length;\n const isCommaSeparated =\n placeholderDigits.indexOf(',') >= 0 || zeroDigits.indexOf(',') >= 0;\n const comma = isCommaSeparated ? ',' : '';\n const plotlyNumberType =\n numberType != null && numberType !== '' ? 'e' : 'f';\n\n const type = percentSign !== '' ? percentSign : plotlyNumberType;\n\n const decimalLength = decimalDigits.length + optionalDecimalDigits.length;\n // IDS-4565 Plotly uses an older version of d3 which doesn't support the trim option or negative brackets\n // If plotly updates it's d3 version, this should be re-enabled\n // const trimOption = optionalDecimalDigits.length > 0 ? '~' : '';\n const trimOption = '';\n\n const tickformat = `0${paddingLength}${comma}.${decimalLength}${trimOption}${type}`;\n const tickprefix = ChartUtils.convertNumberPrefix(prefix);\n // prefix and suffix are processed the same\n const ticksuffix = ChartUtils.convertNumberPrefix(suffix);\n\n return { tickformat, tickprefix, ticksuffix, automargin: true };\n }\n\n /**\n * Adds tick spacing for an axis that has gapBetweenMajorTicks defined.\n *\n * @param axisFormat the current axis format, may be null\n * @param axis the current axis\n * @param isDateType indicates if the columns is a date type\n */\n static addTickSpacing(\n axisFormat: Partial<LayoutAxis> | null,\n axis: DhType.plot.Axis,\n isDateType: boolean\n ): Partial<PlotlyAxis> | null {\n const { gapBetweenMajorTicks } = axis;\n if (gapBetweenMajorTicks != null && gapBetweenMajorTicks > 0) {\n const updatedFormat: Partial<PlotlyAxis> = axisFormat || {};\n let tickSpacing = gapBetweenMajorTicks;\n if (isDateType) {\n // Need to convert from nanoseconds to milliseconds\n tickSpacing = gapBetweenMajorTicks / NANOS_PER_MILLI;\n }\n if (axis.log) {\n tickSpacing = Math.log(tickSpacing);\n }\n // Note that tickmode defaults to 'auto'\n updatedFormat.tickmode = 'linear';\n updatedFormat.dtick = tickSpacing;\n return updatedFormat;\n }\n\n return axisFormat;\n }\n\n /**\n * Retrieve the data source for a given axis in a chart\n * @param chart The chart to get the source for\n * @param axis The axis to find the source for\n * @returns The first source matching this axis\n */\n static getSourceForAxis(\n chart: DhType.plot.Chart,\n axis: DhType.plot.Axis\n ): DhType.plot.SeriesDataSource | null {\n for (let i = 0; i < chart.series.length; i += 1) {\n const series = chart.series[i];\n for (let j = 0; j < series.sources.length; j += 1) {\n const source = series.sources[j];\n if (source.axis === axis) {\n return source;\n }\n }\n }\n\n return null;\n }\n\n /**\n * Get visibility setting for the series object\n * @param name The series name to get the visibility for\n * @param settings Chart settings\n * @returns True for visible series and 'legendonly' for hidden\n */\n static getSeriesVisibility(\n name: string,\n settings?: Partial<ChartModelSettings>\n ): boolean | 'legendonly' {\n if (\n settings != null &&\n settings.hiddenSeries != null &&\n settings.hiddenSeries.includes(name)\n ) {\n return 'legendonly';\n }\n return true;\n }\n\n /**\n * Get hidden labels array from chart settings\n * @param settings Chart settings\n * @returns Array of hidden series names\n */\n static getHiddenLabels(settings: Partial<ChartModelSettings>): string[] {\n if (settings?.hiddenSeries) {\n return [...settings.hiddenSeries];\n }\n return [];\n }\n\n /**\n * Create a default series data object. Apply styling to the object afterward.\n * @returns A simple series data object with no styling\n */\n static makeSeriesData(\n type: PlotType | undefined,\n mode: PlotData['mode'] | undefined,\n name: string,\n showLegend: boolean | null,\n orientation: 'h' | 'v' = ChartUtils.ORIENTATION.VERTICAL\n ): Partial<PlotData> {\n return {\n type,\n mode,\n name,\n orientation,\n showlegend: showLegend ?? undefined,\n };\n }\n\n /**\n * Get the Plotly marker symbol for the provided Deephaven shape\n * Deephaven shapes: https://deephaven.io/enterprise/docs/plotting/visual-formatting/#point-formatting\n * Plotly shapes: https://plotly.com/javascript/reference/scattergl/#scattergl-marker-symbol\n * Table of plotly shapes: https://plotly.com/python/marker-style/#custom-marker-symbols\n * @param deephavenShape Deephaven shape to get the marker symbol for\n */\n static getMarkerSymbol(deephavenShape: string): MarkerSymbol {\n switch (deephavenShape) {\n case 'SQUARE':\n return 'square';\n case 'CIRCLE':\n return 'circle';\n case 'DIAMOND':\n return 'diamond';\n case 'UP_TRIANGLE':\n return 'triangle-up';\n case 'DOWN_TRIANGLE':\n return 'triangle-down';\n case 'RIGHT_TRIANGLE':\n return 'triangle-right';\n case 'LEFT_TRIANGLE':\n return 'triangle-left';\n // There don't seem to be any plotly equivalents for ellipse or rectangles\n // Rectangles could be `line-ew`, `line-ns`, or `hourglass` and `bowtie` instead?\n // Ellipse could be `asterisk` or `diamond-wide` instead?\n // Just throw an error, we've already got a bunch of types.\n case 'ELLIPSE':\n case 'HORIZONTAL_RECTANGLE':\n case 'VERTICAL_RECTANGLE':\n default:\n throw new Error(`Unrecognized shape ${deephavenShape}`);\n }\n }\n\n /**\n * Get all axes for a given `Figure`. Iterates through all charts axes and concatenates them.\n * @param figure Figure to get all axes for\n */\n static getAllAxes(figure: DhType.plot.Figure): DhType.plot.Axis[] {\n return figure.charts.reduce(\n (axes, chart) => [...axes, ...chart.axes],\n [] as DhType.plot.Axis[]\n );\n }\n\n /**\n * Get the axis type map for the figure provided\n * @param figure Figure to get the type map for\n * @returns Axis type map for the figure provided\n */\n static getAxisTypeMap(figure: DhType.plot.Figure): AxisTypeMap {\n const axes = ChartUtils.getAllAxes(figure);\n return ChartUtils.groupArray(axes, 'type');\n }\n\n /**\n * Retrieve the chart that contains the passed in series from the figure\n * @param figure The figure to retrieve the chart from\n * @param series The series to get the chart for\n */\n static getChartForSeries(\n figure: DhType.plot.Figure,\n series: DhType.plot.Series\n ): DhType.plot.Chart | null {\n const { charts } = figure;\n\n for (let i = 0; i < charts.length; i += 1) {\n const chart = charts[i];\n for (let j = 0; j < chart.series.length; j += 1) {\n if (series === chart.series[j]) {\n return chart;\n }\n }\n }\n\n return null;\n }\n\n /**\n * Get an object mapping axis to their ranges\n * @param layout The plotly layout object to get the ranges from\n * @returns An object mapping the axis name to it's range\n */\n static getLayoutRanges(layout: Partial<Layout>): Record<string, Range[]> {\n const ranges: Record<string, Range[]> = {};\n const keys: (keyof Layout)[] = Object.keys(layout).filter(\n key => key.indexOf('axis') >= 0\n ) as LayoutAxisKey[];\n for (let i = 0; i < keys.length; i += 1) {\n const key = keys[i];\n const value = layout[key];\n if (isRangedPlotlyAxis(value)) {\n // Only want to add the range if it's not autoranged\n ranges[key] = [...(value as PlotlyAxis).range];\n }\n }\n\n return ranges;\n }\n\n static getAxisLayoutProperty(\n axisProperty: 'x' | 'y',\n axisIndex: number\n ): LayoutAxisKey {\n const axisIndexString = axisIndex > 0 ? `${axisIndex + 1}` : '';\n return `${axisProperty ?? ''}axis${axisIndexString}` as LayoutAxisKey;\n }\n\n /**\n * Converts an open or close period to a declimal. e.g '09:30\" to 9.5\n *\n * @param period the open or close value of the period\n */\n static periodToDecimal(period: string): number {\n const values = period.split(':');\n return Number(values[0]) + Number(values[1]) / 60;\n }\n\n /**\n * Converts a decimal to a period. e.g 9.5 to '09:30'\n *\n * @param decimal the decimal value to\n */\n static decimalToPeriod(decimal: number): string {\n const hours = Math.floor(decimal);\n const minutes = Math.round((decimal - hours) * 60);\n return `${hours.toString().padStart(2, '0')}:${minutes\n .toString()\n .padStart(2, '0')}`;\n }\n\n /**\n * Groups an array and returns a map\n * @param array The object to group\n * @param property The property name to group by\n * @returns A map containing the items grouped by their values for the property\n */\n static groupArray<T, P extends keyof T>(\n array: T[],\n property: P\n ): Map<T[P], T[]> {\n return array.reduce((result, item) => {\n const key = item[property];\n const group: T[] = result.get(key) ?? [];\n group.push(item);\n result.set(key, group);\n return result;\n }, new Map());\n }\n\n /**\n * Parses the colorway value of a theme and returns an array of colors\n * Value could be a single string with space separated colors or already be an\n * array of strings representing the colorway\n * @param colorway The colorway value to normalize\n * @returns Colorway array for the theme or undefined\n */\n static normalizeColorway(colorway?: string | string[]): string[] | undefined {\n if (colorway == null) {\n return;\n }\n\n if (Array.isArray(colorway)) {\n return colorway;\n }\n\n if (typeof colorway === 'string') {\n return colorway.split(' ');\n }\n\n log.warn(`Unexpected colorway format: ${colorway}`);\n }\n\n static titleFromSettings(settings: ChartModelSettings): string {\n const {\n series,\n xAxis,\n title = `${(series ?? []).join(', ')} by ${xAxis}`,\n } = settings;\n\n return title;\n }\n\n static getTimeZoneDiff(\n calendarTimeZone: DhType.i18n.TimeZone,\n formatterTimeZone?: DhType.i18n.TimeZone\n ): number {\n return formatterTimeZone\n ? (calendarTimeZone.standardOffset - formatterTimeZone.standardOffset) /\n 60\n : 0;\n }\n\n /**\n * Creates closed periods for a partial holiday.\n *\n * @param holidayPeriods the business periods for the holiday\n * @param calendarPeriods the business periods for the calendar\n * @returns an array of closed ranges for the partial holiday. Should be the ranges during the regular business hours that are _not_ specified by the holiday periods.\n */\n static createClosedRangesForPartialHoliday(\n holidayPeriods: DhType.calendar.BusinessPeriod[],\n calendarPeriods: DhType.calendar.BusinessPeriod[]\n ): Range[] {\n // First restrict the periods to only those that are actual business periods.\n const calendarRanges: Range[] = calendarPeriods.map(period => [\n ChartUtils.periodToDecimal(period.open),\n ChartUtils.periodToDecimal(period.close),\n ]);\n calendarRanges.sort((a, b) => a[0] - b[0]);\n if (calendarRanges.length === 0) {\n calendarRanges.push([0, 24]);\n }\n const holidayRanges: Range[] = holidayPeriods.map(period => [\n ChartUtils.periodToDecimal(period.open),\n ChartUtils.periodToDecimal(period.close),\n ]);\n holidayRanges.sort((a, b) => a[0] - b[0]);\n\n const closedRanges: Range[] = [];\n\n // Separate index cursor for the holiday ranges\n for (let c = 0; c < calendarRanges.length; c += 1) {\n const calendarRange = calendarRanges[c];\n let lastClose = calendarRange[0];\n for (let h = 0; h < holidayRanges.length; h += 1) {\n const holidayRange = holidayRanges[h];\n if (holidayRange[1] > lastClose && holidayRange[0] < calendarRange[1]) {\n if (holidayRange[0] > lastClose) {\n closedRanges.push([lastClose, holidayRange[0]]);\n }\n // eslint-disable-next-line prefer-destructuring\n lastClose = holidayRange[1];\n }\n }\n if (lastClose < calendarRange[1]) {\n closedRanges.push([lastClose, calendarRange[1]]);\n }\n }\n return closedRanges;\n }\n\n private dh: typeof DhType;\n\n private daysOfWeek: readonly string[];\n\n constructor(dh: typeof DhType) {\n this.dh = dh;\n this.daysOfWeek = Object.freeze(dh.calendar.DayOfWeek.values());\n bindAllMethods(this);\n }\n\n /**\n * Retrieve the axis formats from the provided figure.\n * Currently defaults to just the x/y axes.\n * @param figure The figure to get the axis formats for\n * @param formatter The formatter to use when getting the axis format\n * @returns A map of axis layout property names to axis formats\n */\n getAxisFormats(\n figure: DhType.plot.Figure,\n formatter: Formatter\n ): Map<LayoutAxisKey, Partial<PlotlyAxis>> {\n const axisFormats = new Map();\n const nullFormat = { tickformat: null, ticksuffix: null };\n\n const allAxes = ChartUtils.getAllAxes(figure);\n const axisTypeMap = ChartUtils.groupArray(allAxes, 'type');\n const { charts } = figure;\n\n for (let i = 0; i < charts.length; i += 1) {\n const chart = charts[i];\n\n for (let j = 0; j < chart.series.length; j += 1) {\n const series = chart.series[j];\n const { sources } = series;\n const axisSources = sources.filter(source => source.axis);\n for (let k = 0; k < axisSources.length; k += 1) {\n const source = axisSources[k];\n const { axis } = source;\n const { type: axisType } = axis;\n const typeAxes = axisTypeMap.get(axisType);\n assertNotNull(typeAxes);\n const axisIndex = typeAxes.indexOf(axis);\n const axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n const axisLayoutProperty = ChartUtils.getAxisLayoutProperty(\n axisProperty,\n axisIndex\n );\n\n if (axisFormats.has(axisLayoutProperty)) {\n log.debug(`${axisLayoutProperty} already added.`);\n } else {\n log.debug(`Adding ${axisLayoutProperty} to axisFormats.`);\n const axisFormat = this.getPlotlyAxisFormat(source, formatter);\n if (axisFormat === null) {\n axisFormats.set(axisLayoutProperty, nullFormat);\n } else {\n axisFormats.set(axisLayoutProperty, axisFormat);\n\n const { businessCalendar } = axis;\n if (businessCalendar != null) {\n (axisFormat as RangebreakAxisFormat).rangebreaks =\n this.createRangeBreaksFromBusinessCalendar(\n businessCalendar,\n formatter\n );\n }\n\n if (axisFormats.size === chart.axes.length) {\n return axisFormats;\n }\n }\n }\n }\n }\n }\n }\n\n return axisFormats;\n }\n\n /**\n * Converts the Iris plot style into a plotly chart type\n * @param plotStyle The plotStyle to use, see dh.plot.SeriesPlotStyle\n * @param isBusinessTime If the plot is using business time for an axis\n * @param allowWebGL If WebGL is allowedd\n */\n getPlotlyChartType(\n plotStyle: DhType.plot.SeriesPlotStyle,\n isBusinessTime: boolean,\n allowWebGL = true\n ): PlotType | undefined {\n const { dh } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.SCATTER:\n case dh.plot.SeriesPlotStyle.LINE:\n // scattergl mode is more performant (usually), but doesn't support the rangebreaks we need for businessTime calendars\n // In some cases, WebGL is less performant (like in virtual desktop environments), so we also allow the option of the user explicitly disabling it even if it's supported\n return !isBusinessTime && IS_WEBGL_SUPPORTED && allowWebGL\n ? 'scattergl'\n : 'scatter';\n case dh.plot.SeriesPlotStyle.BAR:\n case dh.plot.SeriesPlotStyle.STACKED_BAR:\n return 'bar';\n\n case dh.plot.SeriesPlotStyle.PIE:\n return 'pie';\n\n case dh.plot.SeriesPlotStyle.TREEMAP:\n return 'treemap';\n\n case dh.plot.SeriesPlotStyle.HISTOGRAM:\n return 'histogram';\n\n case dh.plot.SeriesPlotStyle.OHLC:\n return 'ohlc';\n\n default:\n return undefined;\n }\n }\n\n /**\n * Converts the Iris plot style into a plotly chart mode\n * @param plotStyle The plotStyle to use, see dh.plot.SeriesPlotStyle.*\n * @param areLinesVisible Whether lines are visible or not\n * @param areShapesVisible Whether shapes are visible or not\n */\n getPlotlyChartMode(\n plotStyle: DhType.plot.SeriesPlotStyle,\n areLinesVisible?: boolean | null,\n areShapesVisible?: boolean | null\n ): PlotData['mode'] | undefined {\n const { dh } = this;\n const modes = new Set<PlotData['mode']>();\n\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.SCATTER:\n // Default to only showing shapes in scatter plots\n if (areLinesVisible ?? false) {\n modes.add(ChartUtils.MODE_LINES);\n }\n if (areShapesVisible ?? true) {\n modes.add(ChartUtils.MODE_MARKERS);\n }\n break;\n case dh.plot.SeriesPlotStyle.LINE:\n // Default to only showing lines in line series\n if (areLinesVisible ?? true) {\n modes.add(ChartUtils.MODE_LINES);\n }\n if (areShapesVisible ?? false) {\n modes.add(ChartUtils.MODE_MARKERS);\n }\n break;\n default:\n break;\n }\n\n return modes.size > 0\n ? ([...modes].join('+') as PlotData['mode'])\n : undefined;\n }\n\n /**\n * Get the property to set on the series data for plotly\n * @param plotStyle The plot style of the series\n * @param sourceType The source type for the series\n */\n getPlotlyProperty(\n plotStyle: DhType.plot.SeriesPlotStyle,\n sourceType: DhType.plot.SourceType\n ): string {\n const { dh } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.PIE:\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'labels';\n case dh.plot.SourceType.Y:\n return 'values';\n default:\n break;\n }\n break;\n case dh.plot.SeriesPlotStyle.OHLC:\n switch (sourceType) {\n case dh.plot.SourceType.TIME:\n return 'x';\n default:\n break;\n }\n break;\n case dh.plot.SeriesPlotStyle.TREEMAP:\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'ids';\n case dh.plot.SourceType.Y:\n return 'values';\n case dh.plot.SourceType.LABEL:\n return 'labels';\n case dh.plot.SourceType.PARENT:\n return 'parents';\n case dh.plot.SourceType.COLOR:\n return 'marker.colors';\n default:\n break;\n }\n break;\n default:\n break;\n }\n\n switch (sourceType) {\n case dh.plot.SourceType.X:\n return 'x';\n case dh.plot.SourceType.Y:\n return 'y';\n case dh.plot.SourceType.Z:\n return 'z';\n case dh.plot.SourceType.X_LOW:\n return 'xLow';\n case dh.plot.SourceType.X_HIGH:\n return 'xHigh';\n case dh.plot.SourceType.Y_LOW:\n return 'yLow';\n case dh.plot.SourceType.Y_HIGH:\n return 'yHigh';\n case dh.plot.SourceType.TIME:\n return 'time';\n case dh.plot.SourceType.OPEN:\n return 'open';\n case dh.plot.SourceType.HIGH:\n return 'high';\n case dh.plot.SourceType.LOW:\n return 'low';\n case dh.plot.SourceType.CLOSE:\n return 'close';\n case dh.plot.SourceType.SHAPE:\n return 'shape';\n case dh.plot.SourceType.SIZE:\n return 'size';\n case dh.plot.SourceType.LABEL:\n return 'label';\n case dh.plot.SourceType.COLOR:\n return 'color';\n case dh.plot.SourceType.PARENT:\n return 'parent';\n case dh.plot.SourceType.HOVER_TEXT:\n return 'hovertext';\n case dh.plot.SourceType.TEXT:\n return 'text';\n default:\n throw new Error(`Unrecognized source type: ${sourceType}`);\n }\n }\n\n getPlotlySeriesOrientation(\n series: DhType.plot.Series\n ): 'h' | 'v' | undefined {\n const { dh } = this;\n const { sources } = series;\n if (sources.length === 2 && sources[0]?.axis?.type === dh.plot.AxisType.Y) {\n return ChartUtils.ORIENTATION.HORIZONTAL;\n }\n\n return ChartUtils.ORIENTATION.VERTICAL;\n }\n\n /**\n * Create a data series (trace) for use with plotly\n * @param series The series to create the series data with\n * @param axisTypeMap The map of axes grouped by type\n * @param seriesVisibility Visibility setting for the series\n * @returns The series data (trace) object for use with plotly.\n */\n makeSeriesDataFromSeries(\n series: DhType.plot.Series,\n axisTypeMap: AxisTypeMap,\n seriesVisibility: boolean | 'legendonly',\n showLegend: boolean | null = null,\n allowWebGL = true\n ): Partial<PlotData> {\n const {\n name,\n isLinesVisible,\n isShapesVisible,\n plotStyle,\n lineColor,\n shapeColor,\n sources,\n shape,\n shapeSize,\n } = series;\n\n const isBusinessTime = sources.some(\n source => source.axis?.businessCalendar\n );\n const type = this.getChartType(plotStyle, isBusinessTime, allowWebGL);\n const mode = this.getPlotlyChartMode(\n plotStyle,\n isLinesVisible ?? undefined,\n isShapesVisible ?? undefined\n );\n const orientation = this.getPlotlySeriesOrientation(series);\n const seriesData = ChartUtils.makeSeriesData(\n type,\n mode,\n name,\n showLegend,\n orientation\n );\n\n this.addSourcesToSeriesData(seriesData, plotStyle, sources, axisTypeMap);\n\n this.addStylingToSeriesData(\n seriesData,\n plotStyle,\n lineColor,\n shapeColor,\n shape,\n shapeSize,\n seriesVisibility\n );\n\n return seriesData;\n }\n\n addSourcesToSeriesData(\n seriesDataParam: Partial<PlotData>,\n plotStyle: DhType.plot.SeriesPlotStyle,\n sources: DhType.plot.SeriesDataSource[],\n axisTypeMap: AxisTypeMap\n ): void {\n const seriesData = seriesDataParam;\n for (let k = 0; k < sources.length; k += 1) {\n const source = sources[k];\n const { axis, type: sourceType } = source;\n\n const dataAttributeName = this.getPlotlyProperty(plotStyle, sourceType);\n set(seriesData, dataAttributeName, []);\n\n const axisProperty =\n axis != null ? this.getAxisPropertyName(axis.type) : null;\n if (axisProperty != null) {\n const axes = axisTypeMap.get(axis.type);\n if (axes) {\n const axisIndex = axes.indexOf(axis);\n const axisIndexString = axisIndex > 0 ? `${axisIndex + 1}` : '';\n seriesData[\n `${axisProperty}axis`\n ] = `${axisProperty}${axisIndexString}`;\n }\n }\n }\n }\n\n addStylingToSeriesData(\n seriesDataParam: Partial<PlotData>,\n plotStyle: DhType.plot.SeriesPlotStyle,\n lineColor: string | null = null,\n shapeColor: string | null = null,\n shape: string | null = null,\n shapeSize: number | null = null,\n seriesVisibility: 'legendonly' | boolean | null = null\n ): void {\n const { dh } = this;\n const seriesData = seriesDataParam;\n // Add some empty objects so we can fill them in later with details without checking for existence\n seriesData.marker = { line: {} }; // border line width on markers\n seriesData.line = {\n width: 1, // default line width for lines, should eventually be able to override\n };\n\n if (plotStyle === dh.plot.SeriesPlotStyle.AREA) {\n seriesData.fill = 'tozeroy';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.STACKED_AREA) {\n seriesData.stackgroup = 'stack';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.STEP) {\n seriesData.line.shape = 'hv'; // plot.ly horizontal then vertical step styling\n } else if (plotStyle === dh.plot.SeriesPlotStyle.HISTOGRAM) {\n // The default histfunc in plotly is 'count', but the data passed up from the API provides explicit x/y values and bins\n // Since it's converted to bar, just set the widths of each bar\n seriesData.width = [];\n } else if (plotStyle === dh.plot.SeriesPlotStyle.PIE) {\n seriesData.textinfo = 'label+percent';\n } else if (plotStyle === dh.plot.SeriesPlotStyle.TREEMAP) {\n seriesData.hoverinfo = 'text';\n seriesData.textinfo = 'label+text';\n (seriesData as TreeMapData).tiling = {\n packing: 'squarify',\n pad: 0,\n };\n seriesData.textposition = 'middle center';\n }\n\n if (lineColor != null) {\n if (plotStyle === dh.plot.SeriesPlotStyle.BAR) {\n seriesData.marker.color = lineColor;\n } else {\n seriesData.line.color = lineColor;\n }\n }\n\n if (shapeColor != null) {\n seriesData.marker.color = shapeColor;\n }\n\n if (shape != null && shape.length > 0) {\n try {\n seriesData.marker.symbol = ChartUtils.getMarkerSymbol(shape);\n } catch (e) {\n log.warn('Unable to handle shape', shape, ':', e);\n }\n }\n\n if (shapeSize != null) {\n seriesData.marker.size = shapeSize * ChartUtils.DEFAULT_MARKER_SIZE;\n }\n\n // Skipping pie charts\n // Pie slice visibility is configured in chart layout instead of series data\n if (seriesVisibility != null && plotStyle !== dh.plot.SeriesPlotStyle.PIE) {\n seriesData.visible = seriesVisibility;\n }\n }\n\n getChartType(\n plotStyle: DhType.plot.SeriesPlotStyle,\n isBusinessTime: boolean,\n allowWebGL = true\n ): PlotType | undefined {\n const { dh } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.HISTOGRAM:\n // When reading data from the `Figure`, it already provides bins and values, so rather than using\n // plot.ly to calculate the bins and sum values, just convert it to a bar chart\n return 'bar';\n default:\n return this.getPlotlyChartType(plotStyle, isBusinessTime, allowWebGL);\n }\n }\n\n /**\n * Return the plotly axis property name\n * @param axisType The axis type to get the property name for\n */\n getAxisPropertyName(axisType: DhType.plot.AxisType): 'x' | 'y' | null {\n const { dh } = this;\n switch (axisType) {\n case dh.plot.AxisType.X:\n return 'x';\n case dh.plot.AxisType.Y:\n return 'y';\n default:\n return null;\n }\n }\n\n /**\n * Returns the plotly \"side\" value for the provided axis position\n * @param axisPosition The Iris AxisPosition of the axis\n */\n getAxisSide(\n axisPosition: DhType.plot.AxisPosition\n ): LayoutAxis['side'] | undefined {\n const { dh } = this;\n switch (axisPosition) {\n case dh.plot.AxisPosition.BOTTOM:\n return 'bottom';\n case dh.plot.AxisPosition.TOP:\n return 'top';\n case dh.plot.AxisPosition.LEFT:\n return 'left';\n case dh.plot.AxisPosition.RIGHT:\n return 'right';\n default:\n return undefined;\n }\n }\n\n /**\n * Update the layout with all the axes information for the provided figure\n * @param figure Figure to update the axes for\n * @param layoutParam Layout object to update in place\n * @param chartAxisRangeParser Function to retrieve the axis range parser\n * @param plotWidth Width of the plot in pixels\n * @param plotHeight Height of the plot in pixels\n */\n updateFigureAxes(\n layoutParam: Partial<Layout>,\n figure: DhType.plot.Figure,\n chartAxisRangeParser?: ChartAxisRangeParser,\n plotWidth = 0,\n plotHeight = 0\n ): void {\n const layout = layoutParam;\n const figureAxes = ChartUtils.getAllAxes(figure);\n for (let i = 0; i < figure.charts.length; i += 1) {\n const chart = figure.charts[i];\n const axisRangeParser = chartAxisRangeParser?.(chart);\n const bounds = this.getChartBounds(figure, chart, plotWidth, plotHeight);\n this.updateLayoutAxes(\n layout,\n chart.axes,\n figureAxes,\n plotWidth,\n plotHeight,\n bounds,\n axisRangeParser\n );\n }\n\n this.removeStaleAxes(layout, figureAxes);\n }\n\n getChartBounds(\n figure: DhType.plot.Figure,\n chart: DhType.plot.Chart,\n plotWidth: number,\n plotHeight: number\n ): ChartBounds {\n const { dh } = this;\n const { cols, rows } = figure;\n const { column, colspan, row, rowspan } = chart;\n\n const endColumn = column + colspan;\n const endRow = row + rowspan;\n const columnSize = 1 / cols;\n const rowSize = 1 / rows;\n const xMarginSize = ChartUtils.AXIS_SIZE_PX / plotWidth;\n const yMarginSize = ChartUtils.AXIS_SIZE_PX / plotHeight;\n\n const bounds: ChartBounds = {\n // Need to invert the row positioning so the first one defined shows up on top instead of the bottom, since coordinates start in bottom left\n bottom: (rows - endRow) * rowSize + (endRow < rows ? yMarginSize / 2 : 0),\n top: (rows - row) * rowSize - (row > 0 ? yMarginSize / 2 : 0),\n\n left: column * columnSize + (column > 0 ? xMarginSize / 2 : 0),\n right: endColumn * columnSize - (endColumn < cols ? xMarginSize / 2 : 0),\n };\n\n // Adjust the bounds based on where the legend is\n // For now, always assume the legend is shown on the right\n const axisPositionMap = ChartUtils.groupArray(chart.axes, 'position');\n const rightAxes = axisPositionMap.get(dh.plot.AxisPosition.RIGHT) ?? [];\n if (rightAxes.length > 0) {\n if (plotWidth > 0) {\n bounds.right -=\n (bounds.right - bounds.left) *\n Math.max(\n 0,\n Math.min(\n ChartUtils.LEGEND_WIDTH_PX / plotWidth,\n ChartUtils.MAX_LEGEND_SIZE\n )\n );\n } else {\n bounds.right -=\n (bounds.right - bounds.left) * ChartUtils.DEFAULT_AXIS_SIZE;\n }\n }\n\n return bounds;\n }\n\n getPlotlyDateFormat(\n formatter: Formatter | null,\n columnType: string,\n formatPattern: string | undefined | null\n ): Partial<LayoutAxis> {\n const { dh } = this;\n const tickformat =\n formatPattern == null\n ? undefined\n : formatPattern\n .replace('%', '%%')\n .replace(/S{9}/g, '%9f')\n .replace(/S{8}/g, '%8f')\n .replace(/S{7}/g, '%7f')\n .replace(/S{6}/g, '%6f')\n .replace(/S{5}/g, '%5f')\n .replace(/S{4}/g, '%4f')\n .replace(/S{3}/g, '%3f')\n .replace(/S{2}/g, '%2f')\n .replace(/S{1}/g, '%1f')\n .replace(/y{4}/g, '%Y')\n .replace(/y{2}/g, '%y')\n .replace(/M{4}/g, '%B')\n .replace(/M{3}/g, '%b')\n .replace(/M{2}/g, '%m')\n .replace(/M{1}/g, '%-m')\n .replace(/E{4,}/g, '%A')\n .replace(/E{1,}/g, '%a')\n .replace(/d{2}/g, '%d')\n .replace(/([^%]|^)d{1}/g, '$1%-d')\n .replace(/H{2}/g, '%H')\n .replace(/h{2}/g, '%I')\n .replace(/h{1}/g, '%-I')\n .replace(/m{2}/g, '%M')\n .replace(/s{2}/g, '%S')\n .replace(\"'T'\", 'T')\n .replace(' z', ''); // timezone added as suffix if necessary\n\n let ticksuffix;\n const dataFormatter = formatter?.getColumnTypeFormatter(columnType);\n if (\n dataFormatter != null &&\n isDateTimeColumnFormatter(dataFormatter) &&\n dataFormatter.dhTimeZone != null &&\n dataFormatter.showTimeZone\n ) {\n ticksuffix = dh.i18n.DateTimeFormat.format(\n ' z',\n new Date(),\n dataFormatter.dhTimeZone\n );\n }\n\n return {\n tickformat,\n ticksuffix,\n automargin: true,\n };\n }\n\n /**\n * Gets the plotly axis formatting information from the source passed in\n * @param source The Source to get the formatter information from\n * @param formatter The current formatter for formatting data\n */\n getPlotlyAxisFormat(\n source: DhType.plot.SeriesDataSource,\n formatter: Formatter | null = null\n ): Partial<PlotlyAxis> | null {\n const { dh } = this;\n const { axis, columnType } = source;\n const { formatPattern } = axis;\n\n let axisFormat = null;\n if (TableUtils.isDateType(columnType)) {\n axisFormat = this.getPlotlyDateFormat(\n formatter,\n columnType,\n formatPattern\n );\n axisFormat = ChartUtils.addTickSpacing(axisFormat, axis, true);\n } else if (TableUtils.isNumberType(columnType)) {\n axisFormat = ChartUtils.getPlotlyNumberFormat(\n formatter,\n columnType,\n formatPattern\n );\n axisFormat = ChartUtils.addTickSpacing(axisFormat, axis, false);\n }\n\n if (axis.formatType === dh.plot.AxisFormatType.CATEGORY) {\n if (axisFormat) {\n axisFormat.type = 'category';\n } else {\n axisFormat = {\n type: 'category' as PlotlyAxisType,\n tickformat: undefined,\n ticksuffix: undefined,\n };\n }\n }\n\n return axisFormat;\n }\n\n /**\n * Updates the axes positions and sizes in the layout object provided.\n * If the axis did not exist in the layout previously, it is created and added.\n * Any axis that no longer exists in axes is removed.\n * With Downsampling enabled, will also update the range on the axis itself as appropriate\n * @param layoutParam The layout object to update\n * @param chartAxes The chart axes to update the layout with\n * @param figureAxes All figure axes to update the layout with\n * @param plotWidth The width of the plot to calculate the axis sizes for\n * @param plotHeight The height of the plot to calculate the axis sizes for\n * @param bounds The bounds for this set of axes\n * @param axisRangeParser A function to retrieve the range parser for a given axis\n */\n updateLayoutAxes(\n layoutParam: Partial<Layout>,\n chartAxes: DhType.plot.Axis[],\n figureAxes: DhType.plot.Axis[],\n plotWidth = 0,\n plotHeight = 0,\n bounds: ChartBounds = { left: 0, top: 0, right: 1, bottom: 1 },\n axisRangeParser?: AxisRangeParser\n ): void {\n const { dh } = this;\n const xAxisSize =\n plotWidth > 0\n ? Math.max(\n ChartUtils.MIN_AXIS_SIZE,\n Math.min(\n ChartUtils.AXIS_SIZE_PX / plotHeight,\n ChartUtils.MAX_AXIS_SIZE\n )\n )\n : ChartUtils.DEFAULT_AXIS_SIZE;\n const yAxisSize =\n plotHeight > 0\n ? Math.max(\n ChartUtils.MIN_AXIS_SIZE,\n Math.min(\n ChartUtils.AXIS_SIZE_PX / plotWidth,\n ChartUtils.MAX_AXIS_SIZE\n )\n )\n : ChartUtils.DEFAULT_AXIS_SIZE;\n\n const layout = layoutParam;\n const axisPositionMap = ChartUtils.groupArray(chartAxes, 'position');\n const axisTypeMap = ChartUtils.groupArray(chartAxes, 'type');\n const axisTypes = [...axisTypeMap.keys()];\n const figureAxisTypeMap = ChartUtils.groupArray(figureAxes, 'type');\n for (let j = 0; j < axisTypes.length; j += 1) {\n const axisType = axisTypes[j];\n const axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n const typeAxes = axisTypeMap.get(axisType);\n const figureTypeAxes = figureAxisTypeMap.get(axisType);\n const isYAxis = axisType === dh.plot.AxisType.Y;\n const plotSize = isYAxis ? plotHeight : plotWidth;\n\n assertNotNull(typeAxes);\n assertNotNull(figureTypeAxes);\n for (\n let chartAxisIndex = 0;\n chartAxisIndex < typeAxes.length;\n chartAxisIndex += 1\n ) {\n const axis = typeAxes[chartAxisIndex];\n const figureAxisIndex = figureTypeAxes.indexOf(axis);\n const axisLayoutProperty = ChartUtils.getAxisLayoutProperty(\n axisProperty,\n figureAxisIndex\n );\n\n if (layout[axisLayoutProperty] == null) {\n layout[axisLayoutProperty] = {};\n }\n\n const layoutAxis = layout[axisLayoutProperty];\n if (layoutAxis != null) {\n this.updateLayoutAxis(\n layoutAxis,\n axis,\n chartAxisIndex,\n axisPositionMap,\n xAxisSize,\n yAxisSize,\n bounds\n );\n\n const { range, autorange } = layoutAxis;\n if (\n axisRangeParser != null &&\n range !== undefined &&\n (autorange === undefined || autorange === false)\n ) {\n const rangeParser = axisRangeParser(axis);\n const [rangeStart, rangeEnd] = rangeParser(range as Range);\n\n log.debug(\n 'Setting downsample range',\n plotSize,\n rangeStart,\n rangeEnd\n );\n\n axis.range(plotSize, rangeStart, rangeEnd);\n } else {\n axis.range(plotSize);\n }\n }\n }\n }\n }\n }\n\n /**\n * Remove any axes from the layout param that no longer belong to any series\n * @param layoutParam Layout object to remove stale axes from\n * @param axes All axes in the figure\n */\n removeStaleAxes(\n layoutParam: Partial<Layout>,\n axes: DhType.plot.Axis[]\n ): void {\n const layout = layoutParam;\n const figureAxisTypeMap = ChartUtils.groupArray(axes, 'type');\n const figureAxisTypes = [...figureAxisTypeMap.keys()];\n for (let i = 0; i < figureAxisTypes.length; i += 1) {\n const axisType = figureAxisTypes[i];\n const typeAxes = figureAxisTypeMap.get(axisType);\n assertNotNull(typeAxes);\n let axisIndex = typeAxes.length;\n // Delete any axes that may no longer exist\n const axisProperty = this.getAxisPropertyName(axisType);\n if (axisProperty != null) {\n let axisLayoutProperty = ChartUtils.getAxisLayoutProperty(\n axisProperty,\n axisIndex\n );\n while (layout[axisLayoutProperty] != null) {\n delete layout[axisLayoutProperty];\n\n axisIndex += 1;\n axisLayoutProperty = ChartUtils.getAxisLayoutProperty(\n axisProperty,\n axisIndex\n );\n }\n }\n }\n }\n\n /**\n * Updates the layout axis object in place\n * @param layoutAxisParam The plotly layout axis param\n * @param axis The Iris Axis to update the plotly layout with\n * @param axisIndex The type index for this axis\n * @param axisPositionMap All the axes mapped by position\n * @param axisSize The size of each axis in percent\n * @param bounds The bounds of the axes domains\n */\n updateLayoutAxis(\n layoutAxisParam: Partial<LayoutAxis>,\n axis: DhType.plot.Axis,\n axisIndex: number,\n axisPositionMap: AxisPositionMap,\n xAxisSize: number,\n yAxisSize: number,\n bounds: {\n left: number;\n bottom: number;\n top: number;\n right: number;\n }\n ): void {\n const { dh } = this;\n const isYAxis = axis.type === dh.plot.AxisType.Y;\n const axisSize = isYAxis ? yAxisSize : xAxisSize;\n const layoutAxis = layoutAxisParam;\n // Enterprise API returns null for empty axis labels\n // Passing null title text to Plotly results in incorrect axis position, DH-9164\n const label = axis.label ?? '';\n if (\n layoutAxis.title !== undefined &&\n typeof layoutAxis.title !== 'string'\n ) {\n layoutAxis.title.text = label;\n } else {\n layoutAxis.title = { text: label };\n }\n\n if (axis.log) {\n layoutAxis.type = 'log';\n }\n\n layoutAxis.side = this.getAxisSide(axis.position);\n\n if (axisIndex > 0) {\n layoutAxis.overlaying = this.getAxisPropertyName(axis.type) ?? undefined;\n\n const positionAxes = axisPositionMap.get(axis.position) ?? [];\n const sideIndex = positionAxes.indexOf(axis);\n if (sideIndex > 0) {\n layoutAxis.anchor = 'free';\n\n if (axis.position === dh.plot.AxisPosition.RIGHT) {\n layoutAxis.position =\n bounds.right + (sideIndex - positionAxes.length + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.TOP) {\n layoutAxis.position =\n bounds.top + (sideIndex - positionAxes.length + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.BOTTOM) {\n layoutAxis.position =\n bounds.bottom + (positionAxes.length - sideIndex + 1) * axisSize;\n } else if (axis.position === dh.plot.AxisPosition.LEFT) {\n layoutAxis.position =\n bounds.left + (positionAxes.length - sideIndex + 1) * axisSize;\n }\n }\n } else if (axis.type === dh.plot.AxisType.X) {\n const leftAxes = axisPositionMap.get(dh.plot.AxisPosition.LEFT) || [];\n const rightAxes = axisPositionMap.get(dh.plot.AxisPosition.RIGHT) || [];\n const left = Math.max(\n bounds.left,\n bounds.left + (leftAxes.length - 1) * yAxisSize\n );\n const right = Math.min(\n bounds.right - (rightAxes.length - 1) * yAxisSize,\n bounds.right\n );\n layoutAxis.domain = [left, right];\n } else if (axis.type === dh.plot.AxisType.Y) {\n const bottomAxes = axisPositionMap.get(dh.plot.AxisPosition.BOTTOM) || [];\n const topAxes = axisPositionMap.get(dh.plot.AxisPosition.TOP) || [];\n const bottom = Math.max(\n bounds.bottom,\n bounds.bottom + (bottomAxes.length - 1) * xAxisSize\n );\n const top = Math.min(\n bounds.top - (topAxes.length - 1) * xAxisSize,\n bounds.top\n );\n layoutAxis.domain = [bottom, top];\n }\n\n // autorangeoptions exists in plotly.js but not in the types\n // axis.range only applies to the initial axis range, can't handle specifying min or max independently,\n // and cannot be returned to if the user changes the range via interaction\n // minallowed and maxallowed can be set independently and can be returned to if the user changes\n // the range via interaction\n const { minRange, maxRange, log: logAxis } = axis;\n if (!Number.isNaN(minRange) || !Number.isNaN(maxRange)) {\n layoutAxis.autorangeoptions = {};\n if (!Number.isNaN(minRange)) {\n layoutAxis.autorangeoptions.minallowed = logAxis\n ? Math.log10(minRange)\n : minRange;\n }\n if (!Number.isNaN(maxRange)) {\n layoutAxis.autorangeoptions.maxallowed = logAxis\n ? Math.log10(maxRange)\n : maxRange;\n }\n }\n }\n\n /**\n * Creates the bounds for the periods specified.\n * For example, if you pass in [['09:00', '17:00']], it will return [17, 9] (closing at 5pm, opening at 9am the next day)\n * If you pass [['09:00', '12:00'], ['13:00', '17:00']], it will return [12, 13] (closing at noon, opening at 1pm) and [17, 9] (closing at 5pm, opening at 9am the next day)\n * @param periods Periods to map\n * @param timeZoneDiff Time zone difference in hours\n * @returns Bounds for the periods in plotly format\n */\n // eslint-disable-next-line class-methods-use-this\n createBoundsFromPeriods(\n periods: DhType.calendar.BusinessPeriod[],\n timeZoneDiff = 0\n ): Range[] {\n if (periods.length === 0) {\n return [];\n }\n const numberPeriods = periods\n .map(period => [\n (ChartUtils.periodToDecimal(period.open) + timeZoneDiff) % 24,\n (ChartUtils.periodToDecimal(period.close) + timeZoneDiff) % 24,\n ])\n .sort((a, b) => a[0] - b[0]);\n\n const bounds: Range[] = [];\n for (let i = 0; i < numberPeriods.length; i += 1) {\n const period = numberPeriods[i];\n const nextPeriod = numberPeriods[(i + 1) % numberPeriods.length];\n bounds.push([period[1], nextPeriod[0]]);\n }\n return bounds;\n }\n\n /**\n * Creates range breaks for plotly from business periods.\n * @param periods Business periods to create the breaks for\n * @param timeZoneDiff Time zone difference in hours\n * @returns Plotly range breaks for the business periods\n */\n createBreaksFromPeriods(\n periods: DhType.calendar.BusinessPeriod[],\n timeZoneDiff = 0\n ): Rangebreaks[] {\n const bounds = this.createBoundsFromPeriods(periods, timeZoneDiff);\n return bounds.map(bound => ({\n pattern: 'hour',\n bounds: bound,\n }));\n }\n\n /**\n * Creates range break bounds for plotly from business days.\n * For example a standard business week of ['MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY']\n * will result in [[6,1]] meaning close on Saturday and open on Monday.\n * If you remove Wednesday from the array, then you get two closures [[6, 1], [3, 4]]\n *\n * @param businessDays the days to display on the x-axis\n */\n createBoundsFromDays(businessDays: string[]): Range[] {\n const weekLength = this.daysOfWeek.length;\n // No breaks if all days are business days\n if (businessDays.length === weekLength) {\n return [];\n }\n const businessDaysInt = businessDays.map(day =>\n this.daysOfWeek.indexOf(day)\n );\n const businessDaysSet = new Set(businessDaysInt);\n\n // These are the days when business is closed (e.g. Saturday to start the weekend)\n const closedDays = new Set<number>();\n for (let i = 0; i < weekLength; i += 1) {\n if (\n !businessDaysSet.has(i) &&\n businessDaysSet.has((i - 1 + weekLength) % weekLength)\n ) {\n closedDays.add(i);\n }\n }\n\n const boundsArray: Range[] = [];\n // For each close day, find the next open day\n closedDays.forEach(closedDay => {\n for (let i = 0; i < weekLength; i += 1) {\n const adjustedDay = (closedDay + i) % weekLength;\n if (businessDaysSet.has(adjustedDay)) {\n boundsArray.push([closedDay, adjustedDay]);\n return;\n }\n }\n throw new Error(\n `Unable to find open day for closed day ${closedDay}, businessDays: ${businessDays}`\n );\n });\n return boundsArray;\n }\n\n /**\n * Breaks in plotly for business days\n * @param businessDays Business days to create the breaks for\n * @returns Plotly range breaks for the business days\n */\n createBreaksFromDays(businessDays: string[]): Rangebreaks[] {\n const bounds = this.createBoundsFromDays(businessDays);\n return bounds.map(bound => ({\n pattern: 'day of week',\n bounds: bound,\n }));\n }\n\n /**\n * Creates range breaks for plotly from a business calendar.\n * @param businessCalendar Calendar to create the breaks from\n * @param formatter Formatter to use for time zones\n * @returns Plotly Rangebreaks for the business calendar\n */\n createRangeBreaksFromBusinessCalendar(\n businessCalendar: DhType.calendar.BusinessCalendar,\n formatter: Formatter\n ): Rangebreaks[] {\n const rangebreaks: Rangebreaks[] = [];\n const {\n businessPeriods,\n businessDays,\n holidays,\n timeZone: calendarTimeZone,\n } = businessCalendar;\n const typeFormatter =\n formatter?.getColumnTypeFormatter(BUSINESS_COLUMN_TYPE);\n let formatterTimeZone;\n if (isDateTimeColumnFormatter(typeFormatter)) {\n formatterTimeZone = typeFormatter.dhTimeZone;\n }\n const timeZoneDiff = ChartUtils.getTimeZoneDiff(\n calendarTimeZone,\n formatterTimeZone\n );\n if (holidays.length > 0) {\n rangebreaks.push(\n ...this.createRangeBreakValuesFromHolidays(\n holidays,\n calendarTimeZone,\n formatterTimeZone,\n businessCalendar\n )\n );\n }\n\n rangebreaks.push(\n ...this.createBreaksFromPeriods(businessPeriods, timeZoneDiff)\n );\n rangebreaks.push(...this.createBreaksFromDays(businessDays));\n\n return rangebreaks;\n }\n\n /**\n * Creates an array of range breaks for all holidays.\n *\n * @param holidays an array of holidays\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n * @param calendar the calendar the holidays are from\n */\n createRangeBreakValuesFromHolidays(\n holidays: DhType.calendar.Holiday[],\n calendarTimeZone: DhType.i18n.TimeZone,\n formatterTimeZone?: DhType.i18n.TimeZone,\n calendar?: DhType.calendar.BusinessCalendar\n ): Rangebreaks[] {\n const fullHolidays: string[] = [];\n const partialHolidays: {\n values: string[];\n dvalue: number;\n }[] = [];\n holidays.forEach(holiday => {\n if (holiday.businessPeriods.length > 0) {\n partialHolidays.push(\n ...this.createPartialHoliday(\n holiday,\n calendarTimeZone,\n formatterTimeZone,\n calendar\n )\n );\n } else {\n fullHolidays.push(\n this.createFullHoliday(holiday, calendarTimeZone, formatterTimeZone)\n );\n }\n });\n return [{ values: fullHolidays }, ...partialHolidays];\n }\n\n /**\n * Creates the range break value for a full holiday. A full holiday is day that has no business periods.\n *\n * @param holiday the full holiday\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n */\n createFullHoliday(\n holiday: DhType.calendar.Holiday,\n calendarTimeZone: DhType.i18n.TimeZone,\n formatterTimeZone?: DhType.i18n.TimeZone\n ): string {\n return this.adjustDateForTimeZone(\n `${holiday.date.toString()} 00:00:00.000000`,\n calendarTimeZone,\n formatterTimeZone\n );\n }\n\n /**\n * Creates the range break for a partial holiday. A partial holiday is holiday with business periods\n * that are different than the default business periods.\n *\n * @param holiday the partial holiday\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n * @param calendar the calendar the holiday is from. Used to check against the default business periods to ensure this holiday needs to be specified\n *\n * @returns an array of range breaks for the partial holiday\n */\n createPartialHoliday(\n holiday: DhType.calendar.Holiday,\n calendarTimeZone: DhType.i18n.TimeZone,\n formatterTimeZone?: DhType.i18n.TimeZone,\n calendar?: DhType.calendar.BusinessCalendar\n ): {\n values: string[];\n dvalue: number;\n }[] {\n if (holiday.businessPeriods.length === 0) {\n return [];\n }\n\n const dateString = holiday.date.toString();\n\n // First check that the holiday is on a business day. If it's not, we can ignore it\n if (calendar) {\n const dayOfWeek = new Date(dateString).getDay();\n const isBusinessDay = calendar.businessDays.includes(\n this.daysOfWeek[dayOfWeek]\n );\n if (!isBusinessDay) {\n return [];\n }\n }\n\n const closedPeriods = ChartUtils.createClosedRangesForPartialHoliday(\n holiday.businessPeriods,\n calendar?.businessPeriods ?? []\n );\n\n const rangeBreaks = [];\n for (let i = 0; i < closedPeriods.length; i += 1) {\n const [closeStart, closeEnd] = closedPeriods[i];\n // Skip over any periods where start and close are the same (zero hours)\n if (closeStart !== closeEnd) {\n const values = [\n this.adjustDateForTimeZone(\n `${dateString} ${ChartUtils.decimalToPeriod(closeStart)}:00.000000`,\n calendarTimeZone,\n formatterTimeZone\n ),\n ];\n const dvalue = MILLIS_PER_HOUR * (closeEnd - closeStart);\n rangeBreaks.push({ values, dvalue });\n }\n }\n return rangeBreaks;\n }\n\n /**\n * Adjusts a date string from the calendar time zone to the formatter time zone.\n *\n * @param dateString the date string\n * @param calendarTimeZone the time zone for the business calendar\n * @param formatterTimeZone the time zone for the formatter\n */\n adjustDateForTimeZone(\n dateString: string,\n calendarTimeZone: DhType.i18n.TimeZone,\n formatterTimeZone?: DhType.i18n.TimeZone\n ): string {\n if (\n formatterTimeZone &&\n formatterTimeZone.standardOffset !== calendarTimeZone.standardOffset\n ) {\n return this.unwrapValue(\n this.wrapValue(dateString, BUSINESS_COLUMN_TYPE, calendarTimeZone),\n formatterTimeZone\n ) as string;\n }\n return dateString;\n }\n\n /**\n * Creates the Figure settings from the Chart Builder settings\n * This should be deprecated at some point, and have Chart Builder create the figure settings directly.\n * This logic will still need to exist to translate existing charts, but could be part of a migration script\n * to translate the data.\n * Change when we decide to add more functionality to the Chart Builder.\n * @param settings The chart builder settings\n * @param settings.title The title for this figure\n * @param settings.xAxis The name of the column to use for the x-axis\n * @param settings.series The name of the columns to use for the series of this figure\n * @param settings.type The plot style for this figure\n */\n makeFigureSettings(\n settings: ChartModelSettings,\n table: DhType.Table\n ): {\n charts: {\n chartType: string;\n axes: { formatType: string; type: string; position: string }[];\n series: {\n plotStyle: string;\n name: string;\n dataSources: {\n type: string;\n columnName: string;\n axis: { formatType: string; type: string; position: string };\n table: DhType.Table;\n }[];\n }[];\n }[];\n title: string;\n } {\n const { dh } = this;\n const { series, xAxis: settingsAxis, type } = settings;\n const title = ChartUtils.titleFromSettings(settings);\n const xAxis = {\n formatType: `${dh.plot.AxisFormatType.NUMBER}`,\n type: `${dh.plot.AxisType.X}`,\n position: `${dh.plot.AxisPosition.BOTTOM}`,\n };\n const yAxis = {\n formatType: `${dh.plot.AxisFormatType.NUMBER}`,\n type: `${dh.plot.AxisType.Y}`,\n position: `${dh.plot.AxisPosition.LEFT}`,\n };\n\n return {\n charts: [\n {\n chartType: `${dh.plot.ChartType.XY}`,\n axes: [xAxis, yAxis],\n series: (series ?? []).map(name => ({\n plotStyle: `${type}`,\n name,\n dataSources: [\n {\n type: `${dh.plot.SourceType.X}`,\n columnName: settingsAxis ?? '',\n axis: xAxis,\n table,\n },\n {\n type: `${dh.plot.SourceType.Y}`,\n columnName: name,\n axis: yAxis,\n table,\n },\n ],\n })),\n },\n ],\n title,\n };\n }\n\n /**\n * Unwraps a value provided from API to a value plotly can understand\n * Eg. Unwraps DateWrapper, LongWrapper objects.\n */\n unwrapValue(value: unknown, timeZone?: DhType.i18n.TimeZone): unknown {\n const { dh } = this;\n if (value != null) {\n if (isDateWrapper(value)) {\n return dh.i18n.DateTimeFormat.format(\n ChartUtils.DATE_FORMAT,\n value,\n timeZone\n );\n }\n\n if (isLongWrapper(value)) {\n return value.asNumber();\n }\n }\n\n return value;\n }\n\n /**\n *\n * @param value The value to wrap up\n * @param columnType The type of column this value is from\n * @param timeZone The time zone if applicable\n */\n wrapValue(\n value: unknown,\n columnType: string,\n timeZone: DhType.i18n.TimeZone | null = null\n ): unknown {\n const { dh } = this;\n if (TableUtils.isDateType(columnType) && typeof value === 'string') {\n // Need to limit the format to the actual length of the string range set in plotly\n // Otherwise parse will fail\n const text = value;\n const format = ChartUtils.DATE_FORMAT.substr(0, value.length);\n const date = dh.i18n.DateTimeFormat.parse(format, text);\n if (!timeZone) {\n return date;\n }\n\n // IDS-5994 Due to date parsing, time zone, and daylight savings shenanigans, we need\n // to pass the actual offset with the time to have it parse correctly.\n // However, the offset can change based on the date because of Daylight Savings\n // So we end up parsing the date multiple times. And curse daylight savings.\n const tzFormat = `${format} Z`;\n const estimatedOffset = dh.i18n.DateTimeFormat.format(\n 'Z',\n date,\n timeZone\n );\n const estimatedDate = dh.i18n.DateTimeFormat.parse(\n tzFormat,\n `${text} ${estimatedOffset}`\n );\n const offset = dh.i18n.DateTimeFormat.format(\n 'Z',\n estimatedDate,\n timeZone\n );\n return dh.i18n.DateTimeFormat.parse(tzFormat, `${text} ${offset}`);\n }\n\n return value;\n }\n\n makeLayoutAxis(\n type: DhType.plot.AxisType | null,\n theme: Partial<ChartTheme>\n ): Partial<LayoutAxis> {\n const { dh } = this;\n const axis = {\n automargin: true,\n gridcolor: theme.gridcolor,\n linecolor: theme.linecolor,\n rangeslider: { visible: false },\n showline: true,\n ticks: 'outside' as const,\n ticklen: 5, // act as padding, can't find a tick padding\n tickcolor: theme.paper_bgcolor, // hide ticks as padding\n tickfont: {\n color: theme.zerolinecolor,\n },\n title: {\n font: {\n color: theme.title_color,\n },\n },\n legend: {\n font: {\n color: theme.legend_color,\n },\n },\n };\n\n if (type === dh.plot.AxisType.X) {\n Object.assign(axis, {\n showgrid: true,\n });\n } else if (type === dh.plot.AxisType.Y) {\n Object.assign(axis, {\n zerolinecolor: theme.zerolinecolor,\n zerolinewidth: 2,\n });\n }\n\n return axis;\n }\n\n /**\n * Creates a plotly layout template object based on a given theme.\n * See https://plotly.com/javascript/reference/layout/#layout-template\n * @param theme The theme to use for the layout template\n * @returns The layout template object\n */\n makeDefaultTemplate(theme: ChartTheme): Template {\n /* eslint-disable camelcase */\n const {\n error_band_line_color,\n ohlc_increasing,\n ohlc_decreasing,\n title_color,\n indicator_increasing,\n indicator_decreasing,\n indicator_gauge,\n } = theme;\n\n return {\n data: {\n bar: [\n {\n marker: {\n line: { color: 'transparent' },\n },\n },\n ],\n scatter: [\n {\n error_x: { color: error_band_line_color } as ErrorBar,\n error_y: { color: error_band_line_color } as ErrorBar,\n },\n ],\n ohlc: [\n {\n increasing: { line: { color: ohlc_increasing } },\n decreasing: { line: { color: ohlc_decreasing } },\n },\n ],\n pie: [\n {\n outsidetextfont: {\n color: title_color,\n },\n },\n ],\n treemap: [\n {\n outsidetextfont: {\n color: title_color,\n },\n },\n ],\n indicator: [\n {\n title: { font: { color: title_color } },\n delta: {\n decreasing: {\n color: indicator_decreasing,\n } as Delta['increasing'],\n increasing: {\n color: indicator_increasing,\n } as Delta['decreasing'],\n },\n gauge: { bar: { color: indicator_gauge } },\n },\n ],\n },\n /* eslint-enable camelcase */\n layout: this.makeDefaultLayout(theme),\n };\n }\n\n /**\n * Creates a plotly layout object based on a given theme.\n * See https://plotly.com/javascript/reference/layout/\n * @param theme The theme to use for the layout\n */\n makeDefaultLayout(theme: ChartTheme): Partial<Layout> {\n const { dh } = this;\n\n const {\n /* Used as top level properties of `Layout` */\n /* eslint-disable camelcase */\n paper_bgcolor,\n plot_bgcolor,\n title_color,\n coastline_color,\n land_color,\n ocean_color,\n lake_color,\n river_color,\n map_style,\n /* eslint-disable camelcase */\n } = theme;\n\n const layout: Partial<Layout> = {\n paper_bgcolor,\n plot_bgcolor,\n autosize: true,\n colorway: ChartUtils.normalizeColorway(theme?.colorway),\n font: {\n family: \"'Fira Sans', sans-serif\",\n color: title_color,\n },\n title: {\n font: {\n color: title_color,\n },\n xanchor: 'center',\n xref: 'paper',\n yanchor: 'top',\n pad: { ...ChartUtils.DEFAULT_TITLE_PADDING },\n y: 1,\n },\n legend: {\n font: {\n color: title_color,\n },\n },\n margin: { ...ChartUtils.DEFAULT_MARGIN },\n xaxis: this.makeLayoutAxis(dh.plot.AxisType.X, theme),\n yaxis: this.makeLayoutAxis(dh.plot.AxisType.Y, theme),\n polar: {\n angularaxis: this.makeLayoutAxis(dh.plot.AxisType.SHAPE, theme),\n radialaxis: this.makeLayoutAxis(dh.plot.AxisType.SHAPE, theme),\n bgcolor: theme.plot_bgcolor,\n },\n scene: {\n xaxis: this.makeLayoutAxis(dh.plot.AxisType.X, theme),\n yaxis: this.makeLayoutAxis(dh.plot.AxisType.Y, theme),\n zaxis: this.makeLayoutAxis(null, theme),\n },\n geo: {\n showcoastlines: true,\n showframe: false,\n showland: true,\n showocean: true,\n showlakes: true,\n showrivers: true,\n bgcolor: paper_bgcolor,\n coastlinecolor: coastline_color,\n landcolor: land_color,\n oceancolor: ocean_color,\n lakecolor: lake_color,\n rivercolor: river_color,\n },\n map: {\n style: map_style,\n },\n };\n layout.datarevision = 0;\n\n return layout;\n }\n\n /**\n * Hydrate settings from a JSONable object\n * @param settings Dehydrated settings\n */\n hydrateSettings(\n settings: ChartModelSettings\n ): Omit<ChartModelSettings, 'type'> & { type?: DhType.plot.SeriesPlotStyle } {\n const { dh } = this;\n return {\n ...settings,\n type:\n settings.type != null\n ? dh.plot.SeriesPlotStyle[settings.type]\n : undefined,\n };\n }\n}\n\nexport default ChartUtils;\n"],"mappings":";;;;;AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAIEC,UAAU,QACL,wBAAwB;AAE/B,SAASC,GAAG,QAAQ,QAAQ;AAa5B,SAASC,aAAa,EAAEC,cAAc,QAAoB,kBAAkB;AAyF5E,IAAMC,GAAG,GAAGL,GAAG,CAACM,MAAM,CAAC,YAAY,CAAC;AAEpC,IAAMC,oBAAoB,GAAG,4BAA4B;AAEzD,IAAMC,eAAe,GAAG,OAAO;AAE/B,IAAMC,eAAe,GAAG,OAAO;AAE/B,SAASC,aAAaA,CAACC,KAAc,EAA+B;EAClE,OAAQA,KAAK,CAAwBC,MAAM,KAAKC,SAAS;AAC3D;AAEA,SAASC,aAAaA,CAACH,KAAc,EAA+B;EAClE,OAAQA,KAAK,CAAwBI,QAAQ,KAAKF,SAAS;AAC7D;AAEA,SAASG,yBAAyBA,CAChCL,KAA2B,EACO;EAClC,OAAQA,KAAK,CAA6BM,UAAU,KAAKJ,SAAS;AACpE;AAEA,SAASK,kBAAkBA,CAACP,KAAc,EAA+B;EACvE,OACEA,KAAK,IAAI,IAAI,IACZA,KAAK,CAAgBQ,KAAK,IAAI,IAAI,KACjCR,KAAK,CAAgBS,SAAS,KAAK,KAAK,IACvCT,KAAK,CAAgBS,SAAS,KAAKP,SAAS,CAAC;AAEpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASQ,gBAAgBA,CAAA,EAAY;EAC1C,IAAI;IACF;IACA,IAAMC,MAAM,GAAGC,QAAQ,CAACC,aAAa,CAAC,QAAQ,CAAC;IAC/C,IAAMC,EAAE,GACNH,MAAM,CAACI,UAAU,CAAC,OAAO,CAAC,IAAIJ,MAAM,CAACI,UAAU,CAAC,oBAAoB,CAAC;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C,CAAC,EAAE,EAAE;EAAErW,CAAC,EAAE,EAAE;EAAE6G,GAAG,EAAE;AAAE,CAAC,CAAC;AAAAnG,eAAA,CApBzEjJ,UAAU,2BAsBiBuF,MAAM,CAAC4D,MAAM,CAAC;EAAEyV,CAAC,EAAE;AAAE,CAAC,CAAC;AAAA3V,eAAA,CAtBlDjJ,UAAU,0BAwBgB,EAAE;AAAAiJ,eAAA,CAxB5BjJ,UAAU,yBA0Be,CAAC;AAAAiJ,eAAA,CA1B1BjJ,UAAU,kBA4B0B,SAAS;AAAAiJ,eAAA,CA5B7CjJ,UAAU,gBA8BwB,OAAO;AA++D/C,eAAeA,UAAU","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/chart",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "Deephaven Chart",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@deephaven/components": "^1.
|
|
30
|
+
"@deephaven/components": "^1.12.0",
|
|
31
31
|
"@deephaven/icons": "^1.2.0",
|
|
32
32
|
"@deephaven/jsapi-types": "^1.0.0-dev0.40.4",
|
|
33
33
|
"@deephaven/jsapi-utils": "^1.10.1",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "f6807a8587d3b6dd0948ba3a632cd6af5cee919d"
|
|
64
64
|
}
|