@deephaven/chart 0.58.1-beta.9 → 0.59.1-beta.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/Chart.css CHANGED
@@ -1,10 +1,11 @@
1
1
  /* stylelint-disable scss/at-import-no-partial-leading-underscore */
2
+ /* stylelint-disable-next-line number-max-precision */
2
3
  .plotly-notifier {
3
4
  margin-right: 15px;
4
5
  }
5
6
 
6
7
  .plotly-notifier .notifier-note {
7
- color: var(--dh-color-fg) !important;
8
+ color: var(--dh-color-fg, #f0f0ee) !important;
8
9
  border: 0 !important;
9
10
  border-radius: 2px !important;
10
11
  background: var(--dh-color-plotly-notifier-note-bg) !important;
@@ -19,7 +20,7 @@
19
20
  transition: all 0.2s ease-in-out !important;
20
21
  }
21
22
  .plotly-notifier .notifier-close:hover {
22
- color: var(--dh-color-fg) !important;
23
+ color: var(--dh-color-fg, #f0f0ee) !important;
23
24
  }
24
25
 
25
26
  .chart-wrapper {
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../node_modules/@deephaven/components/scss/custom.scss","../src/Chart.scss","../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss","../../../node_modules/@deephaven/components/scss/new_variables.scss"],"names":[],"mappings":"AAAA;ACKA;EACE,cAJ6B;;;AAO/B;EAIE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;;AAGE;EACE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAKJ;EACE;EAGA;;AAGF;EACE,eCsFY;EDrFZ;EACA;EACA;EACA;EAGA;;AAGF;EAEE;;AAII;EACE;;AAMA;EACE;;AAOF;EACE;;;AAQZ;EACE,SEzGS","file":"Chart.css","sourcesContent":["/* 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 '@deephaven/components/scss/custom.scss';\n\n$plotly-notifier-margin-right: 15px;\n$plotly-notifier-note-border-radius: 2px;\n\n.plotly-notifier {\n margin-right: $plotly-notifier-margin-right;\n}\n\n.plotly-notifier .notifier-note {\n // Mark these properties as !important because plotly css can be loaded in a different order in production\n // See comments on IDS-4808\n // https://illumon.aha.io/comments/6737799632463662636\n color: $foreground !important;\n border: 0 !important;\n border-radius: $plotly-notifier-note-border-radius !important;\n background: var(--dh-color-plotly-notifier-note-bg) !important;\n overflow-wrap: normal !important;\n hyphens: unset !important;\n margin-bottom: $spacer-2 !important;\n box-shadow: $box-shadow !important;\n}\n\n.plotly-notifier .notifier-close {\n color: $gray-400 !important;\n transition: $transition-base !important;\n &:hover {\n color: $foreground !important;\n }\n}\n\n.chart-wrapper {\n background: var(--dh-color-chart-bg);\n\n .plot-container {\n .cartesianlayer text {\n user-select: none;\n }\n\n .hovertext path,\n .axistext path {\n stroke: none !important;\n }\n\n .axistext path {\n fill: var(--dh-color-plotly-axis-text) !important;\n box-shadow: 4px 4px var(--dh-color-black);\n }\n\n .zoomlayer .zoombox {\n fill: var(--dh-color-plotly-zoombox) !important;\n }\n\n .zoomlayer .zoombox-corners {\n fill: var(--dh-color-plotly-zoombox-corners-fill);\n stroke: var(--dh-color-plotly-zoombox-corners-stroke);\n }\n }\n\n // Tooltip arrow\n .js-plotly-plot .plotly [data-title]::before {\n border-color: transparent transparent var(--dh-color-tooltip-bg);\n\n // Make the arrow appear above the box shadow of the body\n z-index: 1002;\n }\n // Tooltip body\n .js-plotly-plot .plotly [data-title]::after {\n border-radius: $border-radius;\n background: var(--dh-color-tooltip-bg);\n color: var(--dh-color-tooltip-fg);\n padding: $tooltip-padding-y $tooltip-padding-x;\n box-shadow: var(--dh-color-tooltip-box-shadow);\n\n // Already set by plotly, just setting again in case it changes in the future so body shadow appears under arrow tip\n z-index: 1001;\n }\n\n .js-plotly-plot .plotly .modebar {\n //aggressive set as 1001 by plotly, no need for it to be explicitly above anything\n z-index: auto;\n\n .modebar-btn {\n &[data-attr='animation-spin'] {\n svg {\n animation: fa-spin 2s infinite linear;\n }\n }\n\n &[data-attr='fill-active'] {\n svg {\n path {\n fill: var(--dh-color-plotly-modebar-btn-active) !important;\n }\n }\n }\n\n &[data-attr='fill-warning'] {\n svg {\n path {\n fill: var(--dh-color-plotly-modebar-btn-warning) !important;\n }\n }\n }\n }\n }\n}\n\n.chart-error-popper .popper-content {\n padding: $spacer-1;\n}\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//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);\n$foreground: var(--dh-color-fg);\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$primary-light: var(--dh-color-accent-1100);\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-light': $primary-light,\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: hsla(var(--dh-color-accent-hsl), 0.35);\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. Using 0.4214rem with 1.3\n// line height gets us to 31.99px vs Spectrum's 32px.\n$input-btn-padding-y: 0.4214rem;\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: $primary;\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-input-disabled-fg);\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","@use 'sass:math';\n\n//Set of spacer variables from the spacer map\n$spacer-0: map-get($spacers, 0); //0\n$spacer-1: map-get($spacers, 1);\n$spacer-2: map-get($spacers, 2);\n$spacer-3: map-get($spacers, 3);\n$spacer-4: map-get($spacers, 4);\n$spacer-5: map-get($spacers, 5);\n\n//Marching Ants for golden layout dropzone and drag and drop\n//top bottom, left right.\n//create 4 background images that are 50% color 1, 50% color 2 using graidents, two veritical, two horizontal\n//size them to ant-size and thickness\n//position those images along the egdes and make top/bottom repeat-x and left/right repeat-y\n//then offest each of those background positions by ant-size in animation to make them march.\n$ant-size: 8px;\n$ant-thickness: 1px;\n\n@mixin ants-base($color-1: black, $color-2: white) {\n background-image: linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%);\n background-size:\n $ant-size $ant-thickness,\n $ant-size $ant-thickness,\n $ant-thickness $ant-size,\n $ant-thickness $ant-size;\n background-position:\n 0 top,\n 0 bottom,\n left 0,\n right 0;\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n animation: march 0.5s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n\n@mixin drag-stack($pseudo-element) {\n &::#{$pseudo-element} {\n content: ' ';\n background: $primary;\n box-shadow: $box-shadow;\n border-radius: $border-radius;\n position: absolute;\n height: 100%;\n width: 100%;\n @content;\n }\n}\n\n@function hsla-opacity($semantic-name, $i: 100) {\n @return hsla(var(--dh-color-#{$semantic-name}-hsl), math.div($i, 100));\n}\n\n@function accent-opacity($i: 100) {\n @return hsla-opacity('accent', $i);\n}\n\n@function background-opacity($i: 100) {\n @return hsla-opacity('bg', $i);\n}\n\n@function foreground-opacity($i: 100) {\n @return hsla-opacity('fg', $i);\n}\n\n$focus-bg-transparency: 0.12;\n$hover-bg-transparency: 0.14;\n$active-bg-transparency: 0.28;\n$exception-transparency: 0.13;\n"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../node_modules/@deephaven/components/scss/custom.scss","../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss","../src/Chart.scss","../../../node_modules/@deephaven/components/scss/new_variables.scss"],"names":[],"mappings":"AAAA;ACyLA;ACpLA;EACE,cAJ6B;;;AAO/B;EAIE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;;AAGE;EACE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAKJ;EACE;EAGA;;AAGF;EACE,eDuFY;ECtFZ;EACA;EACA;EACA;EAGA;;AAGF;EAEE;;AAII;EACE;;AAMA;EACE;;AAOF;EACE;;;AAQZ;EACE,SCzGS","file":"Chart.css","sourcesContent":["/* 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","// 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: hsla(var(--dh-color-accent-hsl), 0.35);\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-input-disabled-fg);\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","@import '@deephaven/components/scss/custom.scss';\n\n$plotly-notifier-margin-right: 15px;\n$plotly-notifier-note-border-radius: 2px;\n\n.plotly-notifier {\n margin-right: $plotly-notifier-margin-right;\n}\n\n.plotly-notifier .notifier-note {\n // Mark these properties as !important because plotly css can be loaded in a different order in production\n // See comments on IDS-4808\n // https://illumon.aha.io/comments/6737799632463662636\n color: $foreground !important;\n border: 0 !important;\n border-radius: $plotly-notifier-note-border-radius !important;\n background: var(--dh-color-plotly-notifier-note-bg) !important;\n overflow-wrap: normal !important;\n hyphens: unset !important;\n margin-bottom: $spacer-2 !important;\n box-shadow: $box-shadow !important;\n}\n\n.plotly-notifier .notifier-close {\n color: $gray-400 !important;\n transition: $transition-base !important;\n &:hover {\n color: $foreground !important;\n }\n}\n\n.chart-wrapper {\n background: var(--dh-color-chart-bg);\n\n .plot-container {\n .cartesianlayer text {\n user-select: none;\n }\n\n .hovertext path,\n .axistext path {\n stroke: none !important;\n }\n\n .axistext path {\n fill: var(--dh-color-plotly-axis-text) !important;\n box-shadow: 4px 4px var(--dh-color-black);\n }\n\n .zoomlayer .zoombox {\n fill: var(--dh-color-plotly-zoombox) !important;\n }\n\n .zoomlayer .zoombox-corners {\n fill: var(--dh-color-plotly-zoombox-corners-fill);\n stroke: var(--dh-color-plotly-zoombox-corners-stroke);\n }\n }\n\n // Tooltip arrow\n .js-plotly-plot .plotly [data-title]::before {\n border-color: transparent transparent var(--dh-color-tooltip-bg);\n\n // Make the arrow appear above the box shadow of the body\n z-index: 1002;\n }\n // Tooltip body\n .js-plotly-plot .plotly [data-title]::after {\n border-radius: $border-radius;\n background: var(--dh-color-tooltip-bg);\n color: var(--dh-color-tooltip-fg);\n padding: $tooltip-padding-y $tooltip-padding-x;\n box-shadow: var(--dh-color-tooltip-box-shadow);\n\n // Already set by plotly, just setting again in case it changes in the future so body shadow appears under arrow tip\n z-index: 1001;\n }\n\n .js-plotly-plot .plotly .modebar {\n //aggressive set as 1001 by plotly, no need for it to be explicitly above anything\n z-index: auto;\n\n .modebar-btn {\n &[data-attr='animation-spin'] {\n svg {\n animation: fa-spin 2s infinite linear;\n }\n }\n\n &[data-attr='fill-active'] {\n svg {\n path {\n fill: var(--dh-color-plotly-modebar-btn-active) !important;\n }\n }\n }\n\n &[data-attr='fill-warning'] {\n svg {\n path {\n fill: var(--dh-color-plotly-modebar-btn-warning) !important;\n }\n }\n }\n }\n }\n}\n\n.chart-error-popper .popper-content {\n padding: $spacer-1;\n}\n","@use 'sass:math';\n\n//Set of spacer variables from the spacer map\n$spacer-0: map-get($spacers, 0); //0\n$spacer-1: map-get($spacers, 1);\n$spacer-2: map-get($spacers, 2);\n$spacer-3: map-get($spacers, 3);\n$spacer-4: map-get($spacers, 4);\n$spacer-5: map-get($spacers, 5);\n\n//Marching Ants for golden layout dropzone and drag and drop\n//top bottom, left right.\n//create 4 background images that are 50% color 1, 50% color 2 using graidents, two veritical, two horizontal\n//size them to ant-size and thickness\n//position those images along the egdes and make top/bottom repeat-x and left/right repeat-y\n//then offest each of those background positions by ant-size in animation to make them march.\n$ant-size: 8px;\n$ant-thickness: 1px;\n\n@mixin ants-base($color-1: black, $color-2: white) {\n background-image: linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to right, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%),\n linear-gradient(to bottom, $color-2 50%, $color-1 50%);\n background-size:\n $ant-size $ant-thickness,\n $ant-size $ant-thickness,\n $ant-thickness $ant-size,\n $ant-thickness $ant-size;\n background-position:\n 0 top,\n 0 bottom,\n left 0,\n right 0;\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n animation: march 0.5s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n}\n\n@mixin drag-stack($pseudo-element) {\n &::#{$pseudo-element} {\n content: ' ';\n background: $primary;\n box-shadow: $box-shadow;\n border-radius: $border-radius;\n position: absolute;\n height: 100%;\n width: 100%;\n @content;\n }\n}\n\n@function hsla-opacity($semantic-name, $i: 100) {\n @return hsla(var(--dh-color-#{$semantic-name}-hsl), math.div($i, 100));\n}\n\n@function accent-opacity($i: 100) {\n @return hsla-opacity('accent', $i);\n}\n\n@function background-opacity($i: 100) {\n @return hsla-opacity('bg', $i);\n}\n\n@function foreground-opacity($i: 100) {\n @return hsla-opacity('fg', $i);\n}\n\n$focus-bg-transparency: 0.12;\n$hover-bg-transparency: 0.14;\n$active-bg-transparency: 0.28;\n$exception-transparency: 0.13;\n"]}
@@ -2,6 +2,7 @@ export interface ChartTheme {
2
2
  paper_bgcolor: string;
3
3
  plot_bgcolor: string;
4
4
  title_color: string;
5
+ legend_color: string;
5
6
  colorway: string;
6
7
  gridcolor: string;
7
8
  linecolor: string;
@@ -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,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,iBAAiB,IAAI,QAAQ,CAAC,UAAU,CAAC,CAmCxD;AAED,eAAe,iBAAiB,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;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,iBAAiB,IAAI,QAAQ,CAAC,UAAU,CAAC,CAoCxD;AAED,eAAe,iBAAiB,CAAC"}
@@ -20,6 +20,7 @@ export function defaultChartTheme() {
20
20
  paper_bgcolor: chartTheme['paper-bgcolor'],
21
21
  plot_bgcolor: chartTheme['plot-bgcolor'],
22
22
  title_color: chartTheme['title-color'],
23
+ legend_color: chartTheme['legend-color'],
23
24
  colorway: chartTheme.colorway,
24
25
  gridcolor: chartTheme.gridcolor,
25
26
  linecolor: chartTheme.linecolor,
@@ -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","gridcolor","linecolor","zerolinecolor","activecolor","rangebgcolor","area_color","trend_color","line_color","error_band_line_color","error_band_fill_color","ohlc_increasing","ohlc_decreasing"],"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 colorway: string;\n gridcolor: string;\n linecolor: string;\n zerolinecolor: string;\n activecolor: string;\n rangebgcolor: string;\n area_color: string;\n trend_color: string;\n line_color: string;\n error_band_line_color: string;\n error_band_fill_color: string;\n ohlc_increasing: string;\n ohlc_decreasing: 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 colorway: chartTheme.colorway,\n gridcolor: chartTheme.gridcolor,\n linecolor: chartTheme.linecolor,\n zerolinecolor: chartTheme.zerolinecolor,\n activecolor: chartTheme.activecolor,\n rangebgcolor: chartTheme.rangebgcolor,\n area_color: chartTheme['area-color'],\n trend_color: chartTheme['trend-color'],\n line_color: chartTheme['line-color'],\n error_band_line_color: chartTheme['error-band-line-color'],\n error_band_fill_color: chartTheme['error-band-fill-color'],\n ohlc_increasing: chartTheme['ohlc-increasing'],\n ohlc_decreasing: chartTheme['ohlc-decreasing'],\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;AAqBpC,OAAO,SAASC,iBAAiBA,CAAA,EAAyB;EAAA,IAAAC,oBAAA;EACxD,IAAMC,UAAU,GAAGR,2BAA2B,CAACG,aAAa,CAAC;;EAE7D;EACA;EACA;EACAK,UAAU,CAACC,QAAQ,GAAGV,mBAAmB,EAAAQ,oBAAA,GAACC,UAAU,CAACC,QAAQ,cAAAF,oBAAA,cAAAA,oBAAA,GAAI,EAAE,CAAC,CACjEG,GAAG,CAACC,IAAA;IAAA,IAAC,CAACC,KAAK,EAAEC,GAAG,CAAC,GAAAF,IAAA;IAAA,OAChBT,UAAU,CAACY,iBAAiB,CAC1BN,UAAU,CAACC,QAAQ,CAACM,SAAS,CAACH,KAAK,EAAEC,GAAG,GAAG,CAAC,CAC9C,CAAC;EAAA,CACH,CAAC,CACAG,IAAI,CAAC,GAAG,CAAC;EAEZZ,GAAG,CAACa,MAAM,CAAC,cAAc,EAAEd,aAAa,CAAC;EACzCC,GAAG,CAACa,MAAM,CAAC,sBAAsB,EAAET,UAAU,CAAC;EAE9C,OAAOU,MAAM,CAACC,MAAM,CAAC;IACnBC,aAAa,EAAEZ,UAAU,CAAC,eAAe,CAAC;IAC1Ca,YAAY,EAAEb,UAAU,CAAC,cAAc,CAAC;IACxCc,WAAW,EAAEd,UAAU,CAAC,aAAa,CAAC;IACtCC,QAAQ,EAAED,UAAU,CAACC,QAAQ;IAC7Bc,SAAS,EAAEf,UAAU,CAACe,SAAS;IAC/BC,SAAS,EAAEhB,UAAU,CAACgB,SAAS;IAC/BC,aAAa,EAAEjB,UAAU,CAACiB,aAAa;IACvCC,WAAW,EAAElB,UAAU,CAACkB,WAAW;IACnCC,YAAY,EAAEnB,UAAU,CAACmB,YAAY;IACrCC,UAAU,EAAEpB,UAAU,CAAC,YAAY,CAAC;IACpCqB,WAAW,EAAErB,UAAU,CAAC,aAAa,CAAC;IACtCsB,UAAU,EAAEtB,UAAU,CAAC,YAAY,CAAC;IACpCuB,qBAAqB,EAAEvB,UAAU,CAAC,uBAAuB,CAAC;IAC1DwB,qBAAqB,EAAExB,UAAU,CAAC,uBAAuB,CAAC;IAC1DyB,eAAe,EAAEzB,UAAU,CAAC,iBAAiB,CAAC;IAC9C0B,eAAe,EAAE1B,UAAU,CAAC,iBAAiB;EAC/C,CAAC,CAAC;AACJ;AAEA,eAAeF,iBAAiB"}
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","activecolor","rangebgcolor","area_color","trend_color","line_color","error_band_line_color","error_band_fill_color","ohlc_increasing","ohlc_decreasing"],"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 activecolor: string;\n rangebgcolor: string;\n area_color: string;\n trend_color: string;\n line_color: string;\n error_band_line_color: string;\n error_band_fill_color: string;\n ohlc_increasing: string;\n ohlc_decreasing: 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 activecolor: chartTheme.activecolor,\n rangebgcolor: chartTheme.rangebgcolor,\n area_color: chartTheme['area-color'],\n trend_color: chartTheme['trend-color'],\n line_color: chartTheme['line-color'],\n error_band_line_color: chartTheme['error-band-line-color'],\n error_band_fill_color: chartTheme['error-band-fill-color'],\n ohlc_increasing: chartTheme['ohlc-increasing'],\n ohlc_decreasing: chartTheme['ohlc-decreasing'],\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;AAsBpC,OAAO,SAASC,iBAAiBA,CAAA,EAAyB;EAAA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,CAAC;IAC1DyB,qBAAqB,EAAEzB,UAAU,CAAC,uBAAuB,CAAC;IAC1D0B,eAAe,EAAE1B,UAAU,CAAC,iBAAiB,CAAC;IAC9C2B,eAAe,EAAE3B,UAAU,CAAC,iBAAiB;EAC/C,CAAC,CAAC;AACJ;AAEA,eAAeF,iBAAiB"}
@@ -1,9 +1,11 @@
1
1
  /* stylelint-disable */
2
2
  /* stylelint-disable scss/at-import-no-partial-leading-underscore */
3
+ /* stylelint-disable-next-line number-max-precision */
3
4
  :export {
4
5
  paper-bgcolor: var(--dh-color-chart-bg);
5
6
  plot-bgcolor: var(--dh-color-chart-plot-bg);
6
7
  title-color: var(--dh-color-chart-title);
8
+ legend-color: var(--dh-color-chart-legend-color);
7
9
  colorway: var(--dh-color-chart-colorway);
8
10
  gridcolor: var(--dh-color-chart-grid);
9
11
  linecolor: var(--dh-color-chart-axis-line);
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../src/ChartTheme.module.scss","../../../node_modules/@deephaven/components/scss/custom.scss"],"names":[],"mappings":"AAAA;ACAA;ADGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;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 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 activecolor: var(--dh-color-chart-active);\n rangebgcolor: var(--dh-color-chart-range-bg);\n area-color: var(--dh-color-chart-area);\n trend-color: var(--dh-color-chart-trend);\n line-color: var(--dh-color-chart-line-deprecated);\n error-band-line-color: var(--dh-color-chart-error-band-line);\n error-band-fill-color: var(--dh-color-chart-error-band-fill);\n ohlc-increasing: var(--dh-color-chart-ohlc-increase);\n ohlc-decreasing: var(--dh-color-chart-ohlc-decrease);\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"]}
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;ACyLA;AFtLA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;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-color);\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 activecolor: var(--dh-color-chart-active);\n rangebgcolor: var(--dh-color-chart-range-bg);\n area-color: var(--dh-color-chart-area);\n trend-color: var(--dh-color-chart-trend);\n line-color: var(--dh-color-chart-line-deprecated);\n error-band-line-color: var(--dh-color-chart-error-band-line);\n error-band-fill-color: var(--dh-color-chart-error-band-fill);\n ohlc-increasing: var(--dh-color-chart-ohlc-increase);\n ohlc-decreasing: var(--dh-color-chart-ohlc-decrease);\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","// 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: hsla(var(--dh-color-accent-hsl), 0.35);\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-input-disabled-fg);\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 +1 @@
1
- {"version":3,"file":"ChartUtils.d.ts","sourceRoot":"","sources":["../src/ChartUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,SAAS,EAGV,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,KAAK,EAEL,EAAE,IAAI,MAAM,EACZ,MAAM,EACN,OAAO,EAEP,MAAM,EACN,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,aAAa,EACb,QAAQ,EACT,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,IAAI,IAAI,UAAU,EAClB,QAAQ,EACR,UAAU,EAGV,YAAY,EACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAiB,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,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;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;gBAAC,IAAI,EAAE,MAAM,CAAC;gBAAC,QAAQ,EAAE,MAAM,CAAA;aAAE,EAAE,CAAC;YAC/D,MAAM,EAAE;gBACN,SAAS,EAAE,MAAM,CAAC;gBAClB,IAAI,EAAE,MAAM,CAAC;gBACb,WAAW,EAAE;oBACX,IAAI,EAAE,MAAM,CAAC;oBACb,UAAU,EAAE,MAAM,CAAC;oBACnB,IAAI,EAAE;wBAAE,UAAU,EAAE,MAAM,CAAC;wBAAC,IAAI,EAAE,MAAM,CAAC;wBAAC,QAAQ,EAAE,MAAM,CAAA;qBAAE,CAAC;oBAC7D,KAAK,EAAE,aAAa,CAAC;iBACtB,EAAE,CAAC;aACL,EAAE,CAAC;SACL,EAAE,CAAC;QACJ,KAAK,EAAE,MAAM,CAAC;KACf;IA4CD;;;OAGG;IACH,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO;IAmBzD;;;;;OAKG;IACH,SAAS,CACP,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,MAAM,EAClB,QAAQ,GAAE,QAAQ,GAAG,IAAW,GAC/B,OAAO;IAqCV,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAuCtE,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAyCrD;;;OAGG;IACH,eAAe,CACb,QAAQ,EAAE,kBAAkB,GAC3B,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,GAAG;QAAE,IAAI,CAAC,EAAE,eAAe,CAAA;KAAE;CAUjE;AAED,eAAe,UAAU,CAAC"}
@@ -1342,6 +1342,11 @@ class ChartUtils {
1342
1342
  font: {
1343
1343
  color: theme.title_color
1344
1344
  }
1345
+ },
1346
+ legend: {
1347
+ font: {
1348
+ color: theme.legend_color
1349
+ }
1345
1350
  }
1346
1351
  };
1347
1352
  if (type === dh.plot.AxisType.X) {
@@ -1 +1 @@
1
- {"version":3,"file":"ChartUtils.js","names":["Log","TableUtils","set","assertNotNull","log","module","BUSINESS_COLUMN_TYPE","MILLIS_PER_HOUR","NANOS_PER_MILLI","isDateWrapper","value","asDate","undefined","isLongWrapper","asNumber","isDateTimeColumnFormatter","dhTimeZone","isRangedPlotlyAxis","range","autorange","ChartUtils","getPlotlyErrorBars","x","xLow","xHigh","theme","array","map","i","arrayminus","type","symmetric","color","error_band_line_color","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","property","result","item","_result$get","group","get","push","Map","getColorwayFromTheme","colorway","Array","isArray","warn","titleFromSettings","xAxis","title","join","constructor","dh","_defineProperty","daysOfWeek","freeze","calendar","DayOfWeek","getAxisFormats","_this","axisFormats","nullFormat","allAxes","axisTypeMap","axisSources","_loop","k","axisType","typeAxes","getAxisPropertyName","axisLayoutProperty","has","debug","getPlotlyAxisFormat","businessCalendar","rangebreaks","businessPeriods","businessDays","holidays","timeZone","calendarTimeZone","typeFormatter","getColumnTypeFormatter","formatterTimeZone","timeZoneDiff","standardOffset","createRangeBreakValuesFromHolidays","forEach","pattern","bounds","close","open","createBoundsFromDays","weekendBounds","size","v","_ret","getPlotlyChartType","plotStyle","isBusinessTime","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$","_sources$$axis","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","assign","paper_bgcolor","increasing","ohlc_increasing","decreasing","ohlc_decreasing","textinfo","outsidetextfont","title_color","hoverinfo","tiling","packing","pad","textposition","symbol","e","DEFAULT_MARKER_SIZE","visible","getAxisSide","axisPosition","AxisPosition","BOTTOM","TOP","LEFT","RIGHT","updateFigureAxes","layoutParam","chartAxisRangeParser","plotWidth","plotHeight","figureAxes","axisRangeParser","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","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","makeLayoutAxis","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","businessDaysInt","day","nonBusinessDaysInt","reopenDays","closed","adjustedDay","boundsArray","closedDay","fullHolidays","partialHolidays","holiday","createPartialHoliday","createFullHoliday","adjustDateForTimeZone","date","toString","dateString","closedPeriods","rangeBreaks","startClose","endClose","dvalue","unwrapValue","wrapValue","makeFigureSettings","table","settingsAxis","NUMBER","yAxis","chartType","ChartType","XY","dataSources","columnName","DATE_FORMAT","substr","parse","tzFormat","estimatedOffset","estimatedDate","offset","gridcolor","linecolor","rangeslider","showline","ticklen","tickcolor","tickfont","zerolinecolor","font","showgrid","zerolinewidth","makeDefaultLayout","_objectSpread","autosize","family","yanchor","DEFAULT_TITLE_PADDING","y","legend","margin","DEFAULT_MARGIN","xaxis","yaxis","polar","angularaxis","radialaxis","bgcolor","plot_bgcolor","scene","zaxis","datarevision","hydrateSettings","l","r","t","b"],"sources":["../src/ChartUtils.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport {\n DateTimeColumnFormatter,\n Formatter,\n TableColumnFormatter,\n TableUtils,\n} from '@deephaven/jsapi-utils';\nimport type {\n Axis,\n AxisPosition,\n AxisType,\n Chart,\n DateWrapper,\n dh as DhType,\n Figure,\n Holiday,\n LongWrapper,\n Series,\n SeriesDataSource,\n SeriesPlotStyle,\n SourceType,\n TableTemplate,\n TimeZone,\n} from '@deephaven/jsapi-types';\nimport set from 'lodash.set';\nimport type {\n Layout,\n PlotData,\n PlotType,\n Axis as PlotlyAxis,\n ErrorBar,\n LayoutAxis,\n AxisType as PlotlyAxisType,\n OhlcData,\n MarkerSymbol,\n} from 'plotly.js';\nimport { assertNotNull, Range } from '@deephaven/utils';\nimport { 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 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: Axis) => RangeParser;\n\nexport type ChartAxisRangeParser = (chart: Chart) => 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<AxisType, Axis[]>;\ntype AxisPositionMap = Map<AxisPosition, 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 DateWrapper {\n return (value as DateWrapper).asDate !== undefined;\n}\n\nfunction isLongWrapper(value: unknown): value is LongWrapper {\n return (value as 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\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 * @param theme Theme properties for the chart\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 theme: ChartTheme\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 color: theme.error_band_line_color,\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\n ): Partial<LayoutAxis> | null {\n if (!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: Axis,\n isDateType: boolean\n ): Partial<PlotlyAxis> | null {\n const { gapBetweenMajorTicks } = axis;\n if (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(chart: Chart, axis: Axis): 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: Figure): Axis[] {\n return figure.charts.reduce(\n (axes, chart) => [...axes, ...chart.axes],\n [] as 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: 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(figure: Figure, series: Series): 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 * 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 property of a theme and returns an array of colors\n * Theme could have a single string with space separated colors or an array of strings representing the colorway\n * @param theme The theme to get colorway from\n * @returns Colorway array for the theme\n */\n static getColorwayFromTheme(theme: ChartTheme): string[] {\n let colorway: string[] = [];\n if (theme.colorway) {\n if (Array.isArray(theme.colorway)) {\n colorway = theme.colorway;\n } else if (typeof theme.colorway === 'string') {\n colorway = theme.colorway.split(' ');\n } else {\n log.warn(`Unable to handle colorway property: ${theme.colorway}`);\n }\n }\n\n return 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 private dh: DhType;\n\n private daysOfWeek: readonly string[];\n\n constructor(dh: DhType) {\n this.dh = dh;\n this.daysOfWeek = Object.freeze(dh.calendar.DayOfWeek.values());\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: 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 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 = formatterTimeZone\n ? (calendarTimeZone.standardOffset -\n formatterTimeZone.standardOffset) /\n 60\n : 0;\n if (holidays.length > 0) {\n rangebreaks.push(\n ...this.createRangeBreakValuesFromHolidays(\n holidays,\n calendarTimeZone,\n formatterTimeZone\n )\n );\n }\n businessPeriods.forEach(period =>\n rangebreaks.push({\n pattern: 'hour',\n bounds: [\n ChartUtils.periodToDecimal(period.close) + timeZoneDiff,\n ChartUtils.periodToDecimal(period.open) + timeZoneDiff,\n ],\n })\n );\n // If there are seven business days, then there is no weekend\n if (businessDays.length < this.daysOfWeek.length) {\n this.createBoundsFromDays(businessDays).forEach(\n weekendBounds =>\n rangebreaks.push({\n pattern: 'day of week',\n bounds: weekendBounds,\n })\n );\n }\n\n (axisFormat as RangebreakAxisFormat).rangebreaks =\n rangebreaks;\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 */\n getPlotlyChartType(\n plotStyle: SeriesPlotStyle,\n isBusinessTime: boolean\n ): PlotType | undefined {\n const { dh } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.SCATTER:\n // scattergl mode is more performant, but doesn't support the rangebreaks we need for businessTime calendars\n return !isBusinessTime ? 'scattergl' : 'scatter';\n case dh.plot.SeriesPlotStyle.LINE:\n // There is also still some artifacting bugs with scattergl: https://github.com/plotly/plotly.js/issues/3522\n // The artifacting only occurs on line plots, which we can draw with fairly decent performance using SVG paths\n // Once the above plotly issue is fixed, scattergl should be used here (when !isBusinessTime)\n return '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: 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: SeriesPlotStyle,\n sourceType: 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(series: Series): '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 * @param theme The theme properties for the plot. See ChartTheme.js for an example\n * @returns The series data (trace) object for use with plotly.\n */\n makeSeriesDataFromSeries(\n series: Series,\n axisTypeMap: AxisTypeMap,\n seriesVisibility: boolean | 'legendonly',\n theme: ChartTheme,\n showLegend: boolean | null = null\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);\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 theme,\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: SeriesPlotStyle,\n sources: 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: SeriesPlotStyle,\n theme: ChartTheme,\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\n if (seriesData.marker.line !== undefined) {\n Object.assign(seriesData.marker.line, {\n color: theme.paper_bgcolor,\n width: 1,\n });\n }\n } else if (plotStyle === dh.plot.SeriesPlotStyle.OHLC) {\n (seriesData as Partial<OhlcData>).increasing = {\n line: { color: theme.ohlc_increasing },\n };\n (seriesData as Partial<OhlcData>).decreasing = {\n line: { color: theme.ohlc_decreasing },\n };\n } else if (plotStyle === dh.plot.SeriesPlotStyle.PIE) {\n seriesData.textinfo = 'label+percent';\n\n // TODO Open DefinitelyTyped/Plotly PR to mark family and size as optional\n // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/plotly.js/lib/traces/pie.d.ts#L6\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (seriesData as any).outsidetextfont = {\n color: theme.title_color,\n };\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (seriesData as any).outsidetextfont = { color: theme.title_color };\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: SeriesPlotStyle,\n isBusinessTime: boolean\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);\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: 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(axisPosition: AxisPosition): 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 theme Theme used for displaying the plot\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: Figure,\n theme: ChartTheme,\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 theme,\n plotWidth,\n plotHeight,\n bounds,\n axisRangeParser\n );\n }\n\n this.removeStaleAxes(layout, figureAxes);\n }\n\n getChartBounds(\n figure: Figure,\n chart: 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\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: 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 theme Theme used for displaying the plot\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: Axis[],\n figureAxes: Axis[],\n theme: ChartTheme,\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 if (layout[axisLayoutProperty] == null) {\n layout[axisLayoutProperty] = this.makeLayoutAxis(axisType, theme);\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(layoutParam: Partial<Layout>, axes: Axis[]): 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: 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\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 businessDaysInt = businessDays.map(day =>\n this.daysOfWeek.indexOf(day)\n );\n const nonBusinessDaysInt = this.daysOfWeek\n .filter(day => !businessDays.includes(day))\n .map(day => this.daysOfWeek.indexOf(day));\n // These are the days when business reopens (e.g. Monday after a weekend)\n const reopenDays = new Set<number>();\n nonBusinessDaysInt.forEach(closed => {\n for (let i = closed + 1; i < closed + this.daysOfWeek.length; i += 1) {\n const adjustedDay = i % this.daysOfWeek.length;\n if (businessDaysInt.includes(adjustedDay)) {\n reopenDays.add(adjustedDay);\n break;\n }\n }\n });\n const boundsArray: Range[] = [];\n // For each reopen day, find the furthest previous closed day\n reopenDays.forEach(open => {\n for (let i = open - 1; i > open - this.daysOfWeek.length; i -= 1) {\n const adjustedDay = i < 0 ? i + this.daysOfWeek.length : i;\n if (businessDaysInt.includes(adjustedDay)) {\n const closedDay = (adjustedDay + 1) % 7;\n boundsArray.push([closedDay, open]);\n break;\n }\n }\n });\n return boundsArray;\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 */\n createRangeBreakValuesFromHolidays(\n holidays: Holiday[],\n calendarTimeZone: TimeZone,\n formatterTimeZone?: TimeZone\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 )\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: Holiday,\n calendarTimeZone: TimeZone,\n formatterTimeZone?: 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 */\n createPartialHoliday(\n holiday: Holiday,\n calendarTimeZone: TimeZone,\n formatterTimeZone?: TimeZone\n ): {\n values: string[];\n dvalue: number;\n }[] {\n // If a holiday has business periods {open1, close1} and {open2, close2}\n // This will generate range breaks for:\n // closed from 00:00 to open1\n // closed from close1 to open2\n // closed from close2 to 23:59:59.999999\n const dateString = holiday.date.toString();\n const closedPeriods = ['00:00'];\n holiday.businessPeriods.forEach(period => {\n closedPeriods.push(period.open);\n closedPeriods.push(period.close);\n });\n // To go up to 23:59:59.999999, we calculate the dvalue using 24 - close\n closedPeriods.push('24:00');\n\n const rangeBreaks = [];\n for (let i = 0; i < closedPeriods.length; i += 2) {\n const startClose = closedPeriods[i];\n const endClose = closedPeriods[i + 1];\n // Skip over any periods where start and close are the same (zero hours)\n if (startClose !== endClose) {\n const values = [\n this.adjustDateForTimeZone(\n `${dateString} ${startClose}:00.000000`,\n calendarTimeZone,\n formatterTimeZone\n ),\n ];\n const dvalue =\n MILLIS_PER_HOUR *\n (ChartUtils.periodToDecimal(endClose) -\n ChartUtils.periodToDecimal(startClose));\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: TimeZone,\n formatterTimeZone?: 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: TableTemplate\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: TableTemplate;\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?: 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: 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(type: AxisType, theme: ChartTheme): 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 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 };\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 makeDefaultLayout(theme: ChartTheme): Partial<Layout> {\n const { dh } = this;\n const layout: Partial<Layout> = {\n ...theme,\n autosize: true,\n colorway: ChartUtils.getColorwayFromTheme(theme),\n font: {\n family: \"'Fira Sans', sans-serif\",\n color: theme.title_color,\n },\n title: {\n font: {\n color: theme.title_color,\n },\n yanchor: 'top',\n pad: { ...ChartUtils.DEFAULT_TITLE_PADDING },\n y: 1,\n },\n legend: {\n font: {\n color: theme.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(dh.plot.AxisType.Z, theme),\n },\n };\n layout.datarevision = 0;\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?: 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;AAkB/B,OAAOC,GAAG,MAAM,YAAY;AAY5B,SAASC,aAAa,QAAe,kBAAkB;AAuFvD,IAAMC,GAAG,GAAGJ,GAAG,CAACK,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,EAAwB;EAC3D,OAAQA,KAAK,CAAiBC,MAAM,KAAKC,SAAS;AACpD;AAEA,SAASC,aAAaA,CAACH,KAAc,EAAwB;EAC3D,OAAQA,KAAK,CAAiBI,QAAQ,KAAKF,SAAS;AACtD;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,CA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H,eAAA,CAlB7CxH,UAAU,oBAoBU0F,MAAM,CAACgC,MAAM,CAAC;EAAEsS,CAAC,EAAE,EAAE;EAAEC,CAAC,EAAE,EAAE;EAAEC,CAAC,EAAE,EAAE;EAAEC,CAAC,EAAE,EAAE;EAAE3K,GAAG,EAAE;AAAE,CAAC,CAAC;AAAAhI,eAAA,CApBzExH,UAAU,2BAsBiB0F,MAAM,CAACgC,MAAM,CAAC;EAAEwS,CAAC,EAAE;AAAE,CAAC,CAAC;AAAA1S,eAAA,CAtBlDxH,UAAU,0BAwBgB,EAAE;AAAAwH,eAAA,CAxB5BxH,UAAU,yBA0Be,CAAC;AAAAwH,eAAA,CA1B1BxH,UAAU,kBA4B0B,SAAS;AAAAwH,eAAA,CA5B7CxH,UAAU,gBA8BwB,OAAO;AAqtD/C,eAAeA,UAAU"}
1
+ {"version":3,"file":"ChartUtils.js","names":["Log","TableUtils","set","assertNotNull","log","module","BUSINESS_COLUMN_TYPE","MILLIS_PER_HOUR","NANOS_PER_MILLI","isDateWrapper","value","asDate","undefined","isLongWrapper","asNumber","isDateTimeColumnFormatter","dhTimeZone","isRangedPlotlyAxis","range","autorange","ChartUtils","getPlotlyErrorBars","x","xLow","xHigh","theme","array","map","i","arrayminus","type","symmetric","color","error_band_line_color","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","property","result","item","_result$get","group","get","push","Map","getColorwayFromTheme","colorway","Array","isArray","warn","titleFromSettings","xAxis","title","join","constructor","dh","_defineProperty","daysOfWeek","freeze","calendar","DayOfWeek","getAxisFormats","_this","axisFormats","nullFormat","allAxes","axisTypeMap","axisSources","_loop","k","axisType","typeAxes","getAxisPropertyName","axisLayoutProperty","has","debug","getPlotlyAxisFormat","businessCalendar","rangebreaks","businessPeriods","businessDays","holidays","timeZone","calendarTimeZone","typeFormatter","getColumnTypeFormatter","formatterTimeZone","timeZoneDiff","standardOffset","createRangeBreakValuesFromHolidays","forEach","pattern","bounds","close","open","createBoundsFromDays","weekendBounds","size","v","_ret","getPlotlyChartType","plotStyle","isBusinessTime","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$","_sources$$axis","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","assign","paper_bgcolor","increasing","ohlc_increasing","decreasing","ohlc_decreasing","textinfo","outsidetextfont","title_color","hoverinfo","tiling","packing","pad","textposition","symbol","e","DEFAULT_MARKER_SIZE","visible","getAxisSide","axisPosition","AxisPosition","BOTTOM","TOP","LEFT","RIGHT","updateFigureAxes","layoutParam","chartAxisRangeParser","plotWidth","plotHeight","figureAxes","axisRangeParser","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","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","makeLayoutAxis","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","businessDaysInt","day","nonBusinessDaysInt","reopenDays","closed","adjustedDay","boundsArray","closedDay","fullHolidays","partialHolidays","holiday","createPartialHoliday","createFullHoliday","adjustDateForTimeZone","date","toString","dateString","closedPeriods","rangeBreaks","startClose","endClose","dvalue","unwrapValue","wrapValue","makeFigureSettings","table","settingsAxis","NUMBER","yAxis","chartType","ChartType","XY","dataSources","columnName","DATE_FORMAT","substr","parse","tzFormat","estimatedOffset","estimatedDate","offset","gridcolor","linecolor","rangeslider","showline","ticklen","tickcolor","tickfont","zerolinecolor","font","legend","legend_color","showgrid","zerolinewidth","makeDefaultLayout","_objectSpread","autosize","family","yanchor","DEFAULT_TITLE_PADDING","y","margin","DEFAULT_MARGIN","xaxis","yaxis","polar","angularaxis","radialaxis","bgcolor","plot_bgcolor","scene","zaxis","datarevision","hydrateSettings","l","r","t","b"],"sources":["../src/ChartUtils.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport {\n DateTimeColumnFormatter,\n Formatter,\n TableColumnFormatter,\n TableUtils,\n} from '@deephaven/jsapi-utils';\nimport type {\n Axis,\n AxisPosition,\n AxisType,\n Chart,\n DateWrapper,\n dh as DhType,\n Figure,\n Holiday,\n LongWrapper,\n Series,\n SeriesDataSource,\n SeriesPlotStyle,\n SourceType,\n TableTemplate,\n TimeZone,\n} from '@deephaven/jsapi-types';\nimport set from 'lodash.set';\nimport type {\n Layout,\n PlotData,\n PlotType,\n Axis as PlotlyAxis,\n ErrorBar,\n LayoutAxis,\n AxisType as PlotlyAxisType,\n OhlcData,\n MarkerSymbol,\n} from 'plotly.js';\nimport { assertNotNull, Range } from '@deephaven/utils';\nimport { 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 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: Axis) => RangeParser;\n\nexport type ChartAxisRangeParser = (chart: Chart) => 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<AxisType, Axis[]>;\ntype AxisPositionMap = Map<AxisPosition, 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 DateWrapper {\n return (value as DateWrapper).asDate !== undefined;\n}\n\nfunction isLongWrapper(value: unknown): value is LongWrapper {\n return (value as 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\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 * @param theme Theme properties for the chart\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 theme: ChartTheme\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 color: theme.error_band_line_color,\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\n ): Partial<LayoutAxis> | null {\n if (!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: Axis,\n isDateType: boolean\n ): Partial<PlotlyAxis> | null {\n const { gapBetweenMajorTicks } = axis;\n if (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(chart: Chart, axis: Axis): 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: Figure): Axis[] {\n return figure.charts.reduce(\n (axes, chart) => [...axes, ...chart.axes],\n [] as 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: 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(figure: Figure, series: Series): 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 * 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 property of a theme and returns an array of colors\n * Theme could have a single string with space separated colors or an array of strings representing the colorway\n * @param theme The theme to get colorway from\n * @returns Colorway array for the theme\n */\n static getColorwayFromTheme(theme: ChartTheme): string[] {\n let colorway: string[] = [];\n if (theme.colorway) {\n if (Array.isArray(theme.colorway)) {\n colorway = theme.colorway;\n } else if (typeof theme.colorway === 'string') {\n colorway = theme.colorway.split(' ');\n } else {\n log.warn(`Unable to handle colorway property: ${theme.colorway}`);\n }\n }\n\n return 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 private dh: DhType;\n\n private daysOfWeek: readonly string[];\n\n constructor(dh: DhType) {\n this.dh = dh;\n this.daysOfWeek = Object.freeze(dh.calendar.DayOfWeek.values());\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: 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 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 = formatterTimeZone\n ? (calendarTimeZone.standardOffset -\n formatterTimeZone.standardOffset) /\n 60\n : 0;\n if (holidays.length > 0) {\n rangebreaks.push(\n ...this.createRangeBreakValuesFromHolidays(\n holidays,\n calendarTimeZone,\n formatterTimeZone\n )\n );\n }\n businessPeriods.forEach(period =>\n rangebreaks.push({\n pattern: 'hour',\n bounds: [\n ChartUtils.periodToDecimal(period.close) + timeZoneDiff,\n ChartUtils.periodToDecimal(period.open) + timeZoneDiff,\n ],\n })\n );\n // If there are seven business days, then there is no weekend\n if (businessDays.length < this.daysOfWeek.length) {\n this.createBoundsFromDays(businessDays).forEach(\n weekendBounds =>\n rangebreaks.push({\n pattern: 'day of week',\n bounds: weekendBounds,\n })\n );\n }\n\n (axisFormat as RangebreakAxisFormat).rangebreaks =\n rangebreaks;\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 */\n getPlotlyChartType(\n plotStyle: SeriesPlotStyle,\n isBusinessTime: boolean\n ): PlotType | undefined {\n const { dh } = this;\n switch (plotStyle) {\n case dh.plot.SeriesPlotStyle.SCATTER:\n // scattergl mode is more performant, but doesn't support the rangebreaks we need for businessTime calendars\n return !isBusinessTime ? 'scattergl' : 'scatter';\n case dh.plot.SeriesPlotStyle.LINE:\n // There is also still some artifacting bugs with scattergl: https://github.com/plotly/plotly.js/issues/3522\n // The artifacting only occurs on line plots, which we can draw with fairly decent performance using SVG paths\n // Once the above plotly issue is fixed, scattergl should be used here (when !isBusinessTime)\n return '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: 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: SeriesPlotStyle,\n sourceType: 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(series: Series): '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 * @param theme The theme properties for the plot. See ChartTheme.js for an example\n * @returns The series data (trace) object for use with plotly.\n */\n makeSeriesDataFromSeries(\n series: Series,\n axisTypeMap: AxisTypeMap,\n seriesVisibility: boolean | 'legendonly',\n theme: ChartTheme,\n showLegend: boolean | null = null\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);\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 theme,\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: SeriesPlotStyle,\n sources: 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: SeriesPlotStyle,\n theme: ChartTheme,\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\n if (seriesData.marker.line !== undefined) {\n Object.assign(seriesData.marker.line, {\n color: theme.paper_bgcolor,\n width: 1,\n });\n }\n } else if (plotStyle === dh.plot.SeriesPlotStyle.OHLC) {\n (seriesData as Partial<OhlcData>).increasing = {\n line: { color: theme.ohlc_increasing },\n };\n (seriesData as Partial<OhlcData>).decreasing = {\n line: { color: theme.ohlc_decreasing },\n };\n } else if (plotStyle === dh.plot.SeriesPlotStyle.PIE) {\n seriesData.textinfo = 'label+percent';\n\n // TODO Open DefinitelyTyped/Plotly PR to mark family and size as optional\n // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/plotly.js/lib/traces/pie.d.ts#L6\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (seriesData as any).outsidetextfont = {\n color: theme.title_color,\n };\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (seriesData as any).outsidetextfont = { color: theme.title_color };\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: SeriesPlotStyle,\n isBusinessTime: boolean\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);\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: 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(axisPosition: AxisPosition): 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 theme Theme used for displaying the plot\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: Figure,\n theme: ChartTheme,\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 theme,\n plotWidth,\n plotHeight,\n bounds,\n axisRangeParser\n );\n }\n\n this.removeStaleAxes(layout, figureAxes);\n }\n\n getChartBounds(\n figure: Figure,\n chart: 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\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: 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 theme Theme used for displaying the plot\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: Axis[],\n figureAxes: Axis[],\n theme: ChartTheme,\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 if (layout[axisLayoutProperty] == null) {\n layout[axisLayoutProperty] = this.makeLayoutAxis(axisType, theme);\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(layoutParam: Partial<Layout>, axes: Axis[]): 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: 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\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 businessDaysInt = businessDays.map(day =>\n this.daysOfWeek.indexOf(day)\n );\n const nonBusinessDaysInt = this.daysOfWeek\n .filter(day => !businessDays.includes(day))\n .map(day => this.daysOfWeek.indexOf(day));\n // These are the days when business reopens (e.g. Monday after a weekend)\n const reopenDays = new Set<number>();\n nonBusinessDaysInt.forEach(closed => {\n for (let i = closed + 1; i < closed + this.daysOfWeek.length; i += 1) {\n const adjustedDay = i % this.daysOfWeek.length;\n if (businessDaysInt.includes(adjustedDay)) {\n reopenDays.add(adjustedDay);\n break;\n }\n }\n });\n const boundsArray: Range[] = [];\n // For each reopen day, find the furthest previous closed day\n reopenDays.forEach(open => {\n for (let i = open - 1; i > open - this.daysOfWeek.length; i -= 1) {\n const adjustedDay = i < 0 ? i + this.daysOfWeek.length : i;\n if (businessDaysInt.includes(adjustedDay)) {\n const closedDay = (adjustedDay + 1) % 7;\n boundsArray.push([closedDay, open]);\n break;\n }\n }\n });\n return boundsArray;\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 */\n createRangeBreakValuesFromHolidays(\n holidays: Holiday[],\n calendarTimeZone: TimeZone,\n formatterTimeZone?: TimeZone\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 )\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: Holiday,\n calendarTimeZone: TimeZone,\n formatterTimeZone?: 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 */\n createPartialHoliday(\n holiday: Holiday,\n calendarTimeZone: TimeZone,\n formatterTimeZone?: TimeZone\n ): {\n values: string[];\n dvalue: number;\n }[] {\n // If a holiday has business periods {open1, close1} and {open2, close2}\n // This will generate range breaks for:\n // closed from 00:00 to open1\n // closed from close1 to open2\n // closed from close2 to 23:59:59.999999\n const dateString = holiday.date.toString();\n const closedPeriods = ['00:00'];\n holiday.businessPeriods.forEach(period => {\n closedPeriods.push(period.open);\n closedPeriods.push(period.close);\n });\n // To go up to 23:59:59.999999, we calculate the dvalue using 24 - close\n closedPeriods.push('24:00');\n\n const rangeBreaks = [];\n for (let i = 0; i < closedPeriods.length; i += 2) {\n const startClose = closedPeriods[i];\n const endClose = closedPeriods[i + 1];\n // Skip over any periods where start and close are the same (zero hours)\n if (startClose !== endClose) {\n const values = [\n this.adjustDateForTimeZone(\n `${dateString} ${startClose}:00.000000`,\n calendarTimeZone,\n formatterTimeZone\n ),\n ];\n const dvalue =\n MILLIS_PER_HOUR *\n (ChartUtils.periodToDecimal(endClose) -\n ChartUtils.periodToDecimal(startClose));\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: TimeZone,\n formatterTimeZone?: 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: TableTemplate\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: TableTemplate;\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?: 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: 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(type: AxisType, theme: ChartTheme): 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 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 makeDefaultLayout(theme: ChartTheme): Partial<Layout> {\n const { dh } = this;\n const layout: Partial<Layout> = {\n ...theme,\n autosize: true,\n colorway: ChartUtils.getColorwayFromTheme(theme),\n font: {\n family: \"'Fira Sans', sans-serif\",\n color: theme.title_color,\n },\n title: {\n font: {\n color: theme.title_color,\n },\n yanchor: 'top',\n pad: { ...ChartUtils.DEFAULT_TITLE_PADDING },\n y: 1,\n },\n legend: {\n font: {\n color: theme.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(dh.plot.AxisType.Z, theme),\n },\n };\n layout.datarevision = 0;\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?: 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;AAkB/B,OAAOC,GAAG,MAAM,YAAY;AAY5B,SAASC,aAAa,QAAe,kBAAkB;AAuFvD,IAAMC,GAAG,GAAGJ,GAAG,CAACK,MAAM,CAAC,YAAY,CAAC;AAEpC,IAAMC,o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ed41c424",
3
+ "version": "0.59.1-beta.0+9d2fcaeb",
4
4
  "description": "Deephaven Chart",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -27,13 +27,13 @@
27
27
  "build:sass": "sass --embed-sources --load-path=../../node_modules ./src:./dist"
28
28
  },
29
29
  "dependencies": {
30
- "@deephaven/components": "^0.58.1-beta.9+ed41c424",
31
- "@deephaven/icons": "^0.58.1-beta.9+ed41c424",
32
- "@deephaven/jsapi-types": "^0.58.1-beta.9+ed41c424",
33
- "@deephaven/jsapi-utils": "^0.58.1-beta.9+ed41c424",
34
- "@deephaven/log": "^0.58.1-beta.9+ed41c424",
35
- "@deephaven/react-hooks": "^0.58.1-beta.9+ed41c424",
36
- "@deephaven/utils": "^0.58.1-beta.9+ed41c424",
30
+ "@deephaven/components": "^0.59.1-beta.0+9d2fcaeb",
31
+ "@deephaven/icons": "^0.59.1-beta.0+9d2fcaeb",
32
+ "@deephaven/jsapi-types": "^0.59.1-beta.0+9d2fcaeb",
33
+ "@deephaven/jsapi-utils": "^0.59.1-beta.0+9d2fcaeb",
34
+ "@deephaven/log": "^0.59.1-beta.0+9d2fcaeb",
35
+ "@deephaven/react-hooks": "^0.59.1-beta.0+9d2fcaeb",
36
+ "@deephaven/utils": "^0.59.1-beta.0+9d2fcaeb",
37
37
  "deep-equal": "^2.0.5",
38
38
  "lodash.debounce": "^4.0.8",
39
39
  "lodash.set": "^4.3.2",
@@ -47,8 +47,8 @@
47
47
  "react": "^17.x"
48
48
  },
49
49
  "devDependencies": {
50
- "@deephaven/jsapi-shim": "^0.58.1-beta.9+ed41c424",
51
- "@deephaven/mocks": "^0.58.1-beta.9+ed41c424",
50
+ "@deephaven/jsapi-shim": "^0.59.1-beta.0+9d2fcaeb",
51
+ "@deephaven/mocks": "^0.59.1-beta.0+9d2fcaeb",
52
52
  "@types/plotly.js": "^2.12.11"
53
53
  },
54
54
  "files": [
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "ed41c424de75fcba8751a70b54a189957f979e97"
63
+ "gitHead": "9d2fcaeb5b6ffd624df9eab1cfea6ce0a183a803"
64
64
  }