@deephaven/chart 0.53.1-beta.4 → 0.53.1-layout-manager.4
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.d.ts +0 -2
- package/dist/Chart.d.ts.map +1 -1
- package/dist/Chart.js +1 -15
- package/dist/Chart.js.map +1 -1
- package/dist/ChartModelFactory.d.ts +38 -5
- package/dist/ChartModelFactory.d.ts.map +1 -1
- package/dist/ChartModelFactory.js +11 -6
- package/dist/ChartModelFactory.js.map +1 -1
- package/dist/ChartTheme.d.ts +3 -4
- package/dist/ChartTheme.d.ts.map +1 -1
- package/dist/ChartTheme.js +19 -38
- package/dist/ChartTheme.js.map +1 -1
- package/dist/ChartTheme.module.css +16 -16
- package/dist/ChartTheme.module.css.map +1 -1
- package/dist/ChartUtils.d.ts +129 -12
- package/dist/ChartUtils.d.ts.map +1 -1
- package/dist/ChartUtils.js +26 -19
- package/dist/ChartUtils.js.map +1 -1
- package/dist/FigureChartModel.d.ts +3 -4
- package/dist/FigureChartModel.d.ts.map +1 -1
- package/dist/FigureChartModel.js +8 -7
- package/dist/FigureChartModel.js.map +1 -1
- package/dist/MockChartModel.d.ts +0 -3
- package/dist/MockChartModel.d.ts.map +1 -1
- package/dist/MockChartModel.js +11 -21
- package/dist/MockChartModel.js.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/plotly/Plot.d.ts.map +1 -1
- package/dist/plotly/Plot.js +8 -3
- package/dist/plotly/Plot.js.map +1 -1
- package/package.json +9 -11
- package/dist/ChartThemeProvider.d.ts +0 -9
- package/dist/ChartThemeProvider.d.ts.map +0 -1
- package/dist/ChartThemeProvider.js +0 -35
- package/dist/ChartThemeProvider.js.map +0 -1
- package/dist/plotly/createPlotlyComponent.d.ts +0 -4
- package/dist/plotly/createPlotlyComponent.d.ts.map +0 -1
- package/dist/plotly/createPlotlyComponent.js +0 -13
- package/dist/plotly/createPlotlyComponent.js.map +0 -1
- package/dist/useChartTheme.d.ts +0 -7
- package/dist/useChartTheme.d.ts.map +0 -1
- package/dist/useChartTheme.js +0 -10
- package/dist/useChartTheme.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../src/ChartTheme.module.scss","../../../node_modules/@deephaven/components/scss/custom.scss"],"names":[],"mappings":"AAAA;ACAA;ADGA;EACE;
|
|
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;ADGA;EACE,eEOc;EFNd,cEqBS;EFpBT,aEOe;EFNf;EACA,WEgBS;EFfT,WEaS;EFZT,eEUS;EFTT,aECc;EFAd;EACA,YENK;EFOL;EACA,YETM;EFUN;EACA;EACA,iBEZM;EFaN,iBEhBI","file":"ChartTheme.module.css","sourcesContent":["/* stylelint-disable */\n@import '@deephaven/components/scss/custom.scss';\n\n:export {\n paper-bgcolor: $content-bg;\n plot-bgcolor: $gray-850;\n title-color: $white;\n colorway: $blue $green $yellow $purple $orange $red $white;\n gridcolor: $gray-700;\n linecolor: $gray-500;\n zerolinecolor: $gray-300;\n activecolor: $primary;\n rangebgcolor: rgba($gray-500, 0.7);\n area-color: $blue;\n trend-color: lighten($green, 20%);\n line-color: $green;\n error-band-line-color: lighten($green, 40%);\n error-band-fill-color: rgba(lighten($green, 20%), 0.1);\n ohlc-increasing: $green;\n ohlc-decreasing: $red;\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\n// Override / set color variables\n$red: #f95d84;\n$orange: #f37e3f;\n$yellow: #fcd65b;\n$green: #9edc6f;\n$blue: #76d9e4;\n$purple: #aa9af4;\n\n//Define some UI colors\n$interfacegray: #2d2a2e;\n$interfaceblue: #4878ea;\n$interfacewhite: #f0f0ee; //same as gray-200\n$interfaceblack: #1a171a;\n\n//Define our Gray scale\n$white: $interfacewhite;\n$gray-100: #fcfcfa;\n$gray-200: $interfacewhite;\n$gray-300: #c0bfbf;\n$gray-400: #929192;\n$gray-500: #5b5a5c;\n$gray-600: #555356;\n$gray-700: #403e41;\n$gray-800: #373438;\n$gray-850: #322f33;\n$gray-900: #211f22;\n$black: $interfaceblack;\n$content-bg: $interfacegray;\n$background: $interfaceblack;\n$foreground: $interfacewhite;\n\n//Load colors into map\n$colors: ();\n$colors: map-merge(\n (\n 'red': $red,\n 'orange': $orange,\n 'yellow': $yellow,\n 'green': $green,\n 'blue': $blue,\n 'purple': $purple,\n 'white': $white,\n 'black': $black,\n ),\n $colors\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: $interfaceblue;\n$primary-hover: darken($primary, 8%);\n$primary-dark: mix($primary, $content-bg, 25%);\n$primary-light: scale-color($primary, $lightness: -25%);\n$secondary: $gray-500;\n$secondary-hover: darken($secondary, 8%);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: $red;\n$danger-hover: darken($danger, 8%);\n$light: $gray-100;\n$mid: $gray-400; //Added a mid color, useful for input styling\n$dark: $gray-800;\n$green-dark: scale-color($green, $lightness: -45%, $saturation: -10%);\n\n$theme-colors: () !default;\n$theme-colors: map-merge(\n (\n 'primary': $primary,\n 'primary-hover': $primary-hover,\n 'primary-light': $primary-light,\n 'primary-dark': $primary-dark,\n 'secondary': $secondary,\n 'success': $success,\n 'info': $info,\n 'warning': $warning,\n 'danger': $danger,\n 'light': $light,\n 'dark': $dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n ),\n $theme-colors\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//so browsers add alpha to your color by default, ignoring opacity 1\n//by setting rgba with 0.99 it tricks browser into thinking there is alpha applied\n$text-select-color: $primary-hover;\n$text-select-color-editor: lighten(\n $gray-700,\n 15%\n); //we lighten it abit to account for that 0.01 loss, and because it needs some anyways.\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 rgba($black, 45%); //because our UI is so dark, we need darker default shadows\n$box-shadow-900: 0 0.1rem 1rem rgba(0, 0, 0, 45%); //darkest shadow for $black popups over $black UI\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\n//Override Inputs\n$input-bg: $gray-600;\n$input-disabled-bg: $gray-800;\n$input-color: $foreground;\n$input-border-color: $gray-400;\n$input-placeholder-color: $gray-400;\n$input-focus-border-color: rgba($primary, 85%);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: rgba($component-active-bg, 35%);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n\n//checkbox\n$custom-control-indicator-bg: $gray-600;\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: $gray-800;\n$custom-control-indicator-checked-disabled-bg: $gray-800;\n$custom-control-label-disabled-color: $gray-400;\n\n//Custom Select\n$custom-select-indicator-color: $gray-400;\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: darken($gray-400, 5%);\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $gray-200;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n\n// Toast notification\n$toast-bg: $primary-dark;\n$toast-color: $foreground;\n$toast-error-bg: mix($danger, $content-bg, 15%);\n$toast-error-color: $foreground;\n\n//tooltips\n$tooltip-bg: $gray-700;\n$tooltip-color: $foreground;\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem rgba($black, 80%);\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: $gray-600;\n$contextmenu-color: $foreground;\n$contextmenu-disabled-color: $text-muted;\n$contextmenu-keyboard-selected-bg: rgba($primary, 50%);\n$contextmenu-selected-bg: $primary;\n$contextmenu-selected-color: $foreground;\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: theme-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"]}
|
package/dist/ChartUtils.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Formatter } from '@deephaven/jsapi-utils';
|
|
|
2
2
|
import type { Axis, AxisPosition, AxisType, Chart, dh as DhType, Figure, Holiday, Series, SeriesDataSource, SeriesPlotStyle, SourceType, TableTemplate, TimeZone } from '@deephaven/jsapi-types';
|
|
3
3
|
import type { Layout, PlotData, PlotType, Axis as PlotlyAxis, ErrorBar, LayoutAxis, MarkerSymbol } from 'plotly.js';
|
|
4
4
|
import { Range } from '@deephaven/utils';
|
|
5
|
-
import
|
|
5
|
+
import ChartTheme from './ChartTheme';
|
|
6
6
|
export type FilterColumnMap = Map<string, {
|
|
7
7
|
name: string;
|
|
8
8
|
type: string;
|
|
@@ -83,11 +83,27 @@ declare class ChartUtils {
|
|
|
83
83
|
* @param x The main data array
|
|
84
84
|
* @param xLow The absolute low values
|
|
85
85
|
* @param xHigh
|
|
86
|
-
* @param theme Theme properties for the chart
|
|
87
86
|
*
|
|
88
87
|
* @returns The error_x object required by plotly, or null if none is required
|
|
89
88
|
*/
|
|
90
|
-
static getPlotlyErrorBars(x: number[], xLow: number[], xHigh: number[], theme
|
|
89
|
+
static getPlotlyErrorBars(x: number[], xLow: number[], xHigh: number[], theme?: Readonly<{
|
|
90
|
+
paper_bgcolor: string;
|
|
91
|
+
plot_bgcolor: string;
|
|
92
|
+
title_color: string;
|
|
93
|
+
colorway: string;
|
|
94
|
+
gridcolor: string;
|
|
95
|
+
linecolor: string;
|
|
96
|
+
zerolinecolor: string;
|
|
97
|
+
activecolor: string;
|
|
98
|
+
rangebgcolor: string;
|
|
99
|
+
area_color: string;
|
|
100
|
+
trend_color: string;
|
|
101
|
+
line_color: string;
|
|
102
|
+
error_band_line_color: string;
|
|
103
|
+
error_band_fill_color: string;
|
|
104
|
+
ohlc_increasing: string;
|
|
105
|
+
ohlc_decreasing: string;
|
|
106
|
+
}>): ErrorBar;
|
|
91
107
|
static convertNumberPrefix(prefix: string): string;
|
|
92
108
|
static getPlotlyNumberFormat(formatter: Formatter | null, columnType: string, formatPattern: string): Partial<LayoutAxis> | null;
|
|
93
109
|
/**
|
|
@@ -168,7 +184,24 @@ declare class ChartUtils {
|
|
|
168
184
|
* @param theme The theme to get colorway from
|
|
169
185
|
* @returns Colorway array for the theme
|
|
170
186
|
*/
|
|
171
|
-
static getColorwayFromTheme(theme
|
|
187
|
+
static getColorwayFromTheme(theme?: Readonly<{
|
|
188
|
+
paper_bgcolor: string;
|
|
189
|
+
plot_bgcolor: string;
|
|
190
|
+
title_color: string;
|
|
191
|
+
colorway: string;
|
|
192
|
+
gridcolor: string;
|
|
193
|
+
linecolor: string;
|
|
194
|
+
zerolinecolor: string;
|
|
195
|
+
activecolor: string;
|
|
196
|
+
rangebgcolor: string;
|
|
197
|
+
area_color: string;
|
|
198
|
+
trend_color: string;
|
|
199
|
+
line_color: string;
|
|
200
|
+
error_band_line_color: string;
|
|
201
|
+
error_band_fill_color: string;
|
|
202
|
+
ohlc_increasing: string;
|
|
203
|
+
ohlc_decreasing: string;
|
|
204
|
+
}>): string[];
|
|
172
205
|
static titleFromSettings(settings: ChartModelSettings): string;
|
|
173
206
|
private dh;
|
|
174
207
|
private daysOfWeek;
|
|
@@ -209,9 +242,26 @@ declare class ChartUtils {
|
|
|
209
242
|
* @param theme The theme properties for the plot. See ChartTheme.js for an example
|
|
210
243
|
* @returns The series data (trace) object for use with plotly.
|
|
211
244
|
*/
|
|
212
|
-
makeSeriesDataFromSeries(series: Series, axisTypeMap: AxisTypeMap, seriesVisibility: boolean | 'legendonly',
|
|
245
|
+
makeSeriesDataFromSeries(series: Series, axisTypeMap: AxisTypeMap, seriesVisibility: boolean | 'legendonly', showLegend?: boolean | null, theme?: Readonly<{
|
|
246
|
+
paper_bgcolor: string;
|
|
247
|
+
plot_bgcolor: string;
|
|
248
|
+
title_color: string;
|
|
249
|
+
colorway: string;
|
|
250
|
+
gridcolor: string;
|
|
251
|
+
linecolor: string;
|
|
252
|
+
zerolinecolor: string;
|
|
253
|
+
activecolor: string;
|
|
254
|
+
rangebgcolor: string;
|
|
255
|
+
area_color: string;
|
|
256
|
+
trend_color: string;
|
|
257
|
+
line_color: string;
|
|
258
|
+
error_band_line_color: string;
|
|
259
|
+
error_band_fill_color: string;
|
|
260
|
+
ohlc_increasing: string;
|
|
261
|
+
ohlc_decreasing: string;
|
|
262
|
+
}>): Partial<PlotData>;
|
|
213
263
|
addSourcesToSeriesData(seriesDataParam: Partial<PlotData>, plotStyle: SeriesPlotStyle, sources: SeriesDataSource[], axisTypeMap: AxisTypeMap): void;
|
|
214
|
-
addStylingToSeriesData(seriesDataParam: Partial<PlotData>, plotStyle: SeriesPlotStyle, theme
|
|
264
|
+
addStylingToSeriesData(seriesDataParam: Partial<PlotData>, plotStyle: SeriesPlotStyle, theme?: typeof ChartTheme, lineColor?: string | null, shapeColor?: string | null, shape?: string | null, shapeSize?: number | null, seriesVisibility?: 'legendonly' | boolean | null): void;
|
|
215
265
|
getChartType(plotStyle: SeriesPlotStyle, isBusinessTime: boolean): PlotType | undefined;
|
|
216
266
|
/**
|
|
217
267
|
* Return the plotly axis property name
|
|
@@ -227,12 +277,29 @@ declare class ChartUtils {
|
|
|
227
277
|
* Update the layout with all the axes information for the provided figure
|
|
228
278
|
* @param figure Figure to update the axes for
|
|
229
279
|
* @param layoutParam Layout object to update in place
|
|
230
|
-
* @param theme Theme used for displaying the plot
|
|
231
280
|
* @param chartAxisRangeParser Function to retrieve the axis range parser
|
|
232
281
|
* @param plotWidth Width of the plot in pixels
|
|
233
282
|
* @param plotHeight Height of the plot in pixels
|
|
283
|
+
* @param theme Theme used for displaying the plot
|
|
234
284
|
*/
|
|
235
|
-
updateFigureAxes(layoutParam: Partial<Layout>, figure: Figure,
|
|
285
|
+
updateFigureAxes(layoutParam: Partial<Layout>, figure: Figure, chartAxisRangeParser?: ChartAxisRangeParser, plotWidth?: number, plotHeight?: number, theme?: Readonly<{
|
|
286
|
+
paper_bgcolor: string;
|
|
287
|
+
plot_bgcolor: string;
|
|
288
|
+
title_color: string;
|
|
289
|
+
colorway: string;
|
|
290
|
+
gridcolor: string;
|
|
291
|
+
linecolor: string;
|
|
292
|
+
zerolinecolor: string;
|
|
293
|
+
activecolor: string;
|
|
294
|
+
rangebgcolor: string;
|
|
295
|
+
area_color: string;
|
|
296
|
+
trend_color: string;
|
|
297
|
+
line_color: string;
|
|
298
|
+
error_band_line_color: string;
|
|
299
|
+
error_band_fill_color: string;
|
|
300
|
+
ohlc_increasing: string;
|
|
301
|
+
ohlc_decreasing: string;
|
|
302
|
+
}>): void;
|
|
236
303
|
getChartBounds(figure: Figure, chart: Chart, plotWidth: number, plotHeight: number): ChartBounds;
|
|
237
304
|
getPlotlyDateFormat(formatter: Formatter | null, columnType: string, formatPattern: string): Partial<LayoutAxis>;
|
|
238
305
|
/**
|
|
@@ -249,13 +316,29 @@ declare class ChartUtils {
|
|
|
249
316
|
* @param layoutParam The layout object to update
|
|
250
317
|
* @param chartAxes The chart axes to update the layout with
|
|
251
318
|
* @param figureAxes All figure axes to update the layout with
|
|
252
|
-
* @param theme Theme used for displaying the plot
|
|
253
319
|
* @param plotWidth The width of the plot to calculate the axis sizes for
|
|
254
320
|
* @param plotHeight The height of the plot to calculate the axis sizes for
|
|
255
321
|
* @param bounds The bounds for this set of axes
|
|
256
322
|
* @param axisRangeParser A function to retrieve the range parser for a given axis
|
|
257
323
|
*/
|
|
258
|
-
updateLayoutAxes(layoutParam: Partial<Layout>, chartAxes: Axis[], figureAxes: Axis[],
|
|
324
|
+
updateLayoutAxes(layoutParam: Partial<Layout>, chartAxes: Axis[], figureAxes: Axis[], plotWidth?: number, plotHeight?: number, bounds?: ChartBounds, axisRangeParser?: AxisRangeParser, theme?: Readonly<{
|
|
325
|
+
paper_bgcolor: string;
|
|
326
|
+
plot_bgcolor: string;
|
|
327
|
+
title_color: string;
|
|
328
|
+
colorway: string;
|
|
329
|
+
gridcolor: string;
|
|
330
|
+
linecolor: string;
|
|
331
|
+
zerolinecolor: string;
|
|
332
|
+
activecolor: string;
|
|
333
|
+
rangebgcolor: string;
|
|
334
|
+
area_color: string;
|
|
335
|
+
trend_color: string;
|
|
336
|
+
line_color: string;
|
|
337
|
+
error_band_line_color: string;
|
|
338
|
+
error_band_fill_color: string;
|
|
339
|
+
ohlc_increasing: string;
|
|
340
|
+
ohlc_decreasing: string;
|
|
341
|
+
}>): void;
|
|
259
342
|
/**
|
|
260
343
|
* Remove any axes from the layout param that no longer belong to any series
|
|
261
344
|
* @param layoutParam Layout object to remove stale axes from
|
|
@@ -371,8 +454,42 @@ declare class ChartUtils {
|
|
|
371
454
|
* @param timeZone The time zone if applicable
|
|
372
455
|
*/
|
|
373
456
|
wrapValue(value: unknown, columnType: string, timeZone?: TimeZone | null): unknown;
|
|
374
|
-
makeLayoutAxis(type: AxisType, theme
|
|
375
|
-
|
|
457
|
+
makeLayoutAxis(type: AxisType, theme?: Readonly<{
|
|
458
|
+
paper_bgcolor: string;
|
|
459
|
+
plot_bgcolor: string;
|
|
460
|
+
title_color: string;
|
|
461
|
+
colorway: string;
|
|
462
|
+
gridcolor: string;
|
|
463
|
+
linecolor: string;
|
|
464
|
+
zerolinecolor: string;
|
|
465
|
+
activecolor: string;
|
|
466
|
+
rangebgcolor: string;
|
|
467
|
+
area_color: string;
|
|
468
|
+
trend_color: string;
|
|
469
|
+
line_color: string;
|
|
470
|
+
error_band_line_color: string;
|
|
471
|
+
error_band_fill_color: string;
|
|
472
|
+
ohlc_increasing: string;
|
|
473
|
+
ohlc_decreasing: string;
|
|
474
|
+
}>): Partial<LayoutAxis>;
|
|
475
|
+
makeDefaultLayout(theme?: Readonly<{
|
|
476
|
+
paper_bgcolor: string;
|
|
477
|
+
plot_bgcolor: string;
|
|
478
|
+
title_color: string;
|
|
479
|
+
colorway: string;
|
|
480
|
+
gridcolor: string;
|
|
481
|
+
linecolor: string;
|
|
482
|
+
zerolinecolor: string;
|
|
483
|
+
activecolor: string;
|
|
484
|
+
rangebgcolor: string;
|
|
485
|
+
area_color: string;
|
|
486
|
+
trend_color: string;
|
|
487
|
+
line_color: string;
|
|
488
|
+
error_band_line_color: string;
|
|
489
|
+
error_band_fill_color: string;
|
|
490
|
+
ohlc_increasing: string;
|
|
491
|
+
ohlc_decreasing: string;
|
|
492
|
+
}>): Partial<Layout>;
|
|
376
493
|
/**
|
|
377
494
|
* Hydrate settings from a JSONable object
|
|
378
495
|
* @param settings Dehydrated settings
|
package/dist/ChartUtils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartUtils.d.ts","sourceRoot":"","sources":["../src/ChartUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,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,M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,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;;;;;;;;;;;;;;;;;MAAa,GAAG,OAAO,CAAC,UAAU,CAAC;IAkCvE,iBAAiB,CAAC,KAAK;;;;;;;;;;;;;;;;;MAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAyCtD;;;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"}
|
package/dist/ChartUtils.js
CHANGED
|
@@ -7,6 +7,7 @@ import Log from '@deephaven/log';
|
|
|
7
7
|
import { TableUtils } from '@deephaven/jsapi-utils';
|
|
8
8
|
import set from 'lodash.set';
|
|
9
9
|
import { assertNotNull } from '@deephaven/utils';
|
|
10
|
+
import ChartTheme from "./ChartTheme.js";
|
|
10
11
|
var log = Log.module('ChartUtils');
|
|
11
12
|
var BUSINESS_COLUMN_TYPE = 'io.deephaven.time.DateTime';
|
|
12
13
|
var MILLIS_PER_HOUR = 3600000;
|
|
@@ -30,11 +31,11 @@ class ChartUtils {
|
|
|
30
31
|
* @param x The main data array
|
|
31
32
|
* @param xLow The absolute low values
|
|
32
33
|
* @param xHigh
|
|
33
|
-
* @param theme Theme properties for the chart
|
|
34
34
|
*
|
|
35
35
|
* @returns The error_x object required by plotly, or null if none is required
|
|
36
36
|
*/
|
|
37
|
-
static getPlotlyErrorBars(x, xLow, xHigh
|
|
37
|
+
static getPlotlyErrorBars(x, xLow, xHigh) {
|
|
38
|
+
var theme = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ChartTheme;
|
|
38
39
|
var array = xHigh.map((value, i) => value - x[i]);
|
|
39
40
|
var arrayminus = xLow.map((value, i) => x[i] - value);
|
|
40
41
|
return {
|
|
@@ -290,7 +291,8 @@ class ChartUtils {
|
|
|
290
291
|
* @param theme The theme to get colorway from
|
|
291
292
|
* @returns Colorway array for the theme
|
|
292
293
|
*/
|
|
293
|
-
static getColorwayFromTheme(
|
|
294
|
+
static getColorwayFromTheme() {
|
|
295
|
+
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ChartTheme;
|
|
294
296
|
var colorway = [];
|
|
295
297
|
if (theme.colorway) {
|
|
296
298
|
if (Array.isArray(theme.colorway)) {
|
|
@@ -601,8 +603,9 @@ class ChartUtils {
|
|
|
601
603
|
* @param theme The theme properties for the plot. See ChartTheme.js for an example
|
|
602
604
|
* @returns The series data (trace) object for use with plotly.
|
|
603
605
|
*/
|
|
604
|
-
makeSeriesDataFromSeries(series, axisTypeMap, seriesVisibility
|
|
605
|
-
var showLegend = arguments.length >
|
|
606
|
+
makeSeriesDataFromSeries(series, axisTypeMap, seriesVisibility) {
|
|
607
|
+
var showLegend = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
608
|
+
var theme = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : ChartTheme;
|
|
606
609
|
var {
|
|
607
610
|
name,
|
|
608
611
|
isLinesVisible,
|
|
@@ -647,7 +650,8 @@ class ChartUtils {
|
|
|
647
650
|
}
|
|
648
651
|
}
|
|
649
652
|
}
|
|
650
|
-
addStylingToSeriesData(seriesDataParam, plotStyle
|
|
653
|
+
addStylingToSeriesData(seriesDataParam, plotStyle) {
|
|
654
|
+
var theme = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ChartTheme;
|
|
651
655
|
var lineColor = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
652
656
|
var shapeColor = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
653
657
|
var shape = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
|
|
@@ -799,21 +803,22 @@ class ChartUtils {
|
|
|
799
803
|
* Update the layout with all the axes information for the provided figure
|
|
800
804
|
* @param figure Figure to update the axes for
|
|
801
805
|
* @param layoutParam Layout object to update in place
|
|
802
|
-
* @param theme Theme used for displaying the plot
|
|
803
806
|
* @param chartAxisRangeParser Function to retrieve the axis range parser
|
|
804
807
|
* @param plotWidth Width of the plot in pixels
|
|
805
808
|
* @param plotHeight Height of the plot in pixels
|
|
809
|
+
* @param theme Theme used for displaying the plot
|
|
806
810
|
*/
|
|
807
|
-
updateFigureAxes(layoutParam, figure,
|
|
808
|
-
var plotWidth = arguments.length >
|
|
809
|
-
var plotHeight = arguments.length >
|
|
811
|
+
updateFigureAxes(layoutParam, figure, chartAxisRangeParser) {
|
|
812
|
+
var plotWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
813
|
+
var plotHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
814
|
+
var theme = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : ChartTheme;
|
|
810
815
|
var layout = layoutParam;
|
|
811
816
|
var figureAxes = ChartUtils.getAllAxes(figure);
|
|
812
817
|
for (var i = 0; i < figure.charts.length; i += 1) {
|
|
813
818
|
var _chart3 = figure.charts[i];
|
|
814
819
|
var axisRangeParser = chartAxisRangeParser === null || chartAxisRangeParser === void 0 ? void 0 : chartAxisRangeParser(_chart3);
|
|
815
820
|
var bounds = this.getChartBounds(figure, _chart3, plotWidth, plotHeight);
|
|
816
|
-
this.updateLayoutAxes(layout, _chart3.axes, figureAxes,
|
|
821
|
+
this.updateLayoutAxes(layout, _chart3.axes, figureAxes, plotWidth, plotHeight, bounds, axisRangeParser, theme);
|
|
817
822
|
}
|
|
818
823
|
this.removeStaleAxes(layout, figureAxes);
|
|
819
824
|
}
|
|
@@ -924,22 +929,22 @@ class ChartUtils {
|
|
|
924
929
|
* @param layoutParam The layout object to update
|
|
925
930
|
* @param chartAxes The chart axes to update the layout with
|
|
926
931
|
* @param figureAxes All figure axes to update the layout with
|
|
927
|
-
* @param theme Theme used for displaying the plot
|
|
928
932
|
* @param plotWidth The width of the plot to calculate the axis sizes for
|
|
929
933
|
* @param plotHeight The height of the plot to calculate the axis sizes for
|
|
930
934
|
* @param bounds The bounds for this set of axes
|
|
931
935
|
* @param axisRangeParser A function to retrieve the range parser for a given axis
|
|
932
936
|
*/
|
|
933
|
-
updateLayoutAxes(layoutParam, chartAxes, figureAxes
|
|
934
|
-
var plotWidth = arguments.length >
|
|
935
|
-
var plotHeight = arguments.length >
|
|
936
|
-
var bounds = arguments.length >
|
|
937
|
+
updateLayoutAxes(layoutParam, chartAxes, figureAxes) {
|
|
938
|
+
var plotWidth = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
939
|
+
var plotHeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
940
|
+
var bounds = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {
|
|
937
941
|
left: 0,
|
|
938
942
|
top: 0,
|
|
939
943
|
right: 1,
|
|
940
944
|
bottom: 1
|
|
941
945
|
};
|
|
942
|
-
var axisRangeParser = arguments.length >
|
|
946
|
+
var axisRangeParser = arguments.length > 6 ? arguments[6] : undefined;
|
|
947
|
+
var theme = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : ChartTheme;
|
|
943
948
|
var {
|
|
944
949
|
dh
|
|
945
950
|
} = this;
|
|
@@ -1309,7 +1314,8 @@ class ChartUtils {
|
|
|
1309
1314
|
}
|
|
1310
1315
|
return value;
|
|
1311
1316
|
}
|
|
1312
|
-
makeLayoutAxis(type
|
|
1317
|
+
makeLayoutAxis(type) {
|
|
1318
|
+
var theme = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ChartTheme;
|
|
1313
1319
|
var {
|
|
1314
1320
|
dh
|
|
1315
1321
|
} = this;
|
|
@@ -1346,7 +1352,8 @@ class ChartUtils {
|
|
|
1346
1352
|
}
|
|
1347
1353
|
return axis;
|
|
1348
1354
|
}
|
|
1349
|
-
makeDefaultLayout(
|
|
1355
|
+
makeDefaultLayout() {
|
|
1356
|
+
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ChartTheme;
|
|
1350
1357
|
var {
|
|
1351
1358
|
dh
|
|
1352
1359
|
} = this;
|