@deephaven/chart 0.15.5-vite.12 → 0.15.6-vite.19

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.
Files changed (41) hide show
  1. package/dist/Chart.d.ts +84 -85
  2. package/dist/Chart.d.ts.map +1 -1
  3. package/dist/Chart.js +56 -49
  4. package/dist/Chart.js.map +1 -1
  5. package/dist/ChartModel.d.ts +30 -22
  6. package/dist/ChartModel.d.ts.map +1 -1
  7. package/dist/ChartModel.js +18 -9
  8. package/dist/ChartModel.js.map +1 -1
  9. package/dist/ChartModelFactory.d.ts +67 -43
  10. package/dist/ChartModelFactory.d.ts.map +1 -1
  11. package/dist/ChartModelFactory.js +27 -27
  12. package/dist/ChartModelFactory.js.map +1 -1
  13. package/dist/ChartTestUtils.d.ts +16 -15
  14. package/dist/ChartTestUtils.d.ts.map +1 -1
  15. package/dist/ChartTestUtils.js +5 -0
  16. package/dist/ChartTestUtils.js.map +1 -1
  17. package/dist/ChartTheme.d.ts +17 -17
  18. package/dist/ChartTheme.d.ts.map +1 -1
  19. package/dist/ChartTheme.js.map +1 -1
  20. package/dist/ChartUtils.d.ts +252 -225
  21. package/dist/ChartUtils.d.ts.map +1 -1
  22. package/dist/ChartUtils.js +219 -174
  23. package/dist/ChartUtils.js.map +1 -1
  24. package/dist/FigureChartModel.d.ts +70 -106
  25. package/dist/FigureChartModel.d.ts.map +1 -1
  26. package/dist/FigureChartModel.js +90 -36
  27. package/dist/FigureChartModel.js.map +1 -1
  28. package/dist/MockChartModel.d.ts +11 -209
  29. package/dist/MockChartModel.d.ts.map +1 -1
  30. package/dist/declaration.d.js +2 -0
  31. package/dist/declaration.d.js.map +1 -0
  32. package/dist/index.d.ts +2 -0
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +2 -0
  35. package/dist/index.js.map +1 -1
  36. package/dist/isFigureChartModel.d.ts +4 -0
  37. package/dist/isFigureChartModel.d.ts.map +1 -0
  38. package/dist/isFigureChartModel.js +4 -0
  39. package/dist/isFigureChartModel.js.map +1 -0
  40. package/dist/plotly/Plotly.d.ts +1 -0
  41. package/package.json +11 -8
package/dist/Chart.d.ts CHANGED
@@ -1,32 +1,69 @@
1
- export class Chart extends React.Component<any, any, any> {
1
+ import { Component, ReactElement, RefObject } from 'react';
2
+ import { IconDefinition } from '@deephaven/icons';
3
+ import { DateTimeColumnFormatterOptions, DecimalColumnFormatterOptions, IntegerColumnFormatterOptions, FormattingRule } from '@deephaven/jsapi-utils';
4
+ import { WorkspaceSettings } from '@deephaven/redux';
5
+ import { Layout, Icon, PlotData } from 'plotly.js';
6
+ import Plot from './plotly/Plot';
7
+ import ChartModel from './ChartModel';
8
+ import { ChartModelSettings } from './ChartUtils';
9
+ import './Chart.scss';
10
+ interface ChartProps {
11
+ model: ChartModel;
12
+ settings: Partial<WorkspaceSettings>;
13
+ isActive: boolean;
14
+ onDisconnect: () => void;
15
+ onReconnect: () => void;
16
+ onUpdate: (obj: {
17
+ isLoading: boolean;
18
+ }) => void;
19
+ onError: (error: Error) => void;
20
+ onSettingsChanged: (settings: Partial<ChartModelSettings>) => void;
21
+ }
22
+ interface ChartState {
23
+ data: Partial<PlotData>[] | null;
24
+ downsamplingError: unknown;
25
+ isDownsampleFinished: boolean;
26
+ isDownsampleInProgress: boolean;
27
+ isDownsamplingDisabled: boolean;
28
+ layout: Partial<Layout>;
29
+ revision: number;
30
+ }
31
+ export declare class Chart extends Component<ChartProps, ChartState> {
32
+ static defaultProps: {
33
+ isActive: boolean;
34
+ settings: {
35
+ timeZone: string;
36
+ defaultDateTimeFormat: string;
37
+ showTimeZone: boolean;
38
+ showTSeparator: boolean;
39
+ formatter: never[];
40
+ };
41
+ onDisconnect: () => void;
42
+ onReconnect: () => void;
43
+ onUpdate: () => void;
44
+ onError: () => void;
45
+ onSettingsChanged: () => void;
46
+ };
2
47
  /**
3
48
  * Convert a font awesome icon definition to a plotly icon definition
4
- * @param {FontAwesome.IconDefinition} faIcon The icon to convert
49
+ * @param faIcon The icon to convert
5
50
  */
6
- static convertIcon(faIcon: FontAwesome.IconDefinition): {
7
- width: any;
8
- path: any;
9
- ascent: any;
10
- descent: number;
11
- transform: string;
12
- };
13
- static downsampleButtonTitle(isDownsampleInProgress: any, isDownsamplingDisabled: any): "Downsampling in progress..." | "Downsampling disabled, click to enable" | "Downsampling enabled, click to disable";
14
- static downsampleButtonAttr(isDownsampleInProgress: any, isDownsamplingDisabled: any): "animation-spin" | "fill-active" | undefined;
15
- constructor(props: any);
16
- handleAfterPlot(): void;
17
- handleDownsampleClick(): void;
18
- handleModelEvent(event: any): void;
19
- handlePlotUpdate(figure: any): void;
20
- handleRelayout(changes: any): void;
21
- handleRestyle([changes, seriesIndexes]: [any, any]): void;
22
- plot: React.RefObject<any>;
23
- plotWrapper: React.RefObject<any>;
24
- columnFormats: any[];
25
- dateTimeFormatterOptions: {};
26
- decimalFormatOptions: {};
27
- integerFormatOptions: {};
28
- rect: any;
29
- ranges: object | null;
51
+ static convertIcon(faIcon: IconDefinition): Icon;
52
+ static downsampleButtonTitle(isDownsampleInProgress: boolean, isDownsamplingDisabled: boolean): string;
53
+ static downsampleButtonAttr(isDownsampleInProgress: boolean, isDownsamplingDisabled: boolean): string | undefined;
54
+ constructor(props: ChartProps);
55
+ componentDidMount(): void;
56
+ componentDidUpdate(prevProps: ChartProps): void;
57
+ componentWillUnmount(): void;
58
+ currentSeries: number;
59
+ plot: RefObject<typeof Plot>;
60
+ plotWrapper: RefObject<HTMLDivElement>;
61
+ columnFormats?: FormattingRule[];
62
+ dateTimeFormatterOptions?: DateTimeColumnFormatterOptions;
63
+ decimalFormatOptions: DecimalColumnFormatterOptions;
64
+ integerFormatOptions: IntegerColumnFormatterOptions;
65
+ rect?: DOMRect;
66
+ ranges?: unknown;
30
67
  isSubscribed: boolean;
31
68
  isLoadedFired: boolean;
32
69
  getCachedConfig: (this: any, downsamplingError: any, isDownsampleFinished: any, isDownsampleInProgress: any, isDownsamplingDisabled: any) => {
@@ -34,83 +71,45 @@ export class Chart extends React.Component<any, any, any> {
34
71
  displayModeBar: string | boolean;
35
72
  modeBarButtons: (string[] | {
36
73
  name: string;
37
- icon: {
38
- width: any;
39
- path: any;
40
- ascent: any;
41
- descent: number;
42
- transform: string;
43
- };
74
+ icon: Icon;
44
75
  click: () => void;
45
76
  attr: string | undefined;
46
77
  }[])[];
47
78
  };
48
- getPlotRect(): any;
79
+ getPlotRect(): DOMRect | null;
49
80
  initData(): void;
50
81
  subscribe(): void;
51
82
  unsubscribe(): void;
83
+ handleAfterPlot(): void;
84
+ handleDownsampleClick(): void;
85
+ handleModelEvent(event: CustomEvent): void;
86
+ handlePlotUpdate(figure: {
87
+ layout: Layout;
88
+ }): void;
89
+ handleRelayout(changes: {
90
+ hiddenlabels?: string[];
91
+ }): void;
92
+ handleRestyle([changes, seriesIndexes]: [
93
+ Record<string, unknown>,
94
+ number[]
95
+ ]): void;
52
96
  /**
53
97
  * Update the models dimensions and ranges.
54
98
  * Note that this will update it all whether the plot size changes OR the range
55
99
  * the user is looking at has changed (eg. panning/zooming).
56
100
  * Could update each independently, but doing them at the same time keeps the
57
101
  * ChartModel API a bit cleaner.
58
- * @param {boolean} force Force a change even if the chart dimensions haven't changed (eg. after pan/zoom)
102
+ * @param force Force a change even if the chart dimensions haven't changed (eg. after pan/zoom)
59
103
  */
60
104
  updateModelDimensions(force?: boolean): void;
61
105
  initFormatter(): void;
62
- updateFormatterSettings(settings: any): void;
106
+ updateFormatterSettings(settings: Partial<WorkspaceSettings> & {
107
+ decimalFormatOptions: DecimalColumnFormatterOptions;
108
+ integerFormatOptions: IntegerColumnFormatterOptions;
109
+ }): void;
63
110
  updateFormatter(): void;
64
111
  updateDimensions(): void;
65
- }
66
- export namespace Chart {
67
- namespace propTypes {
68
- const model: PropTypes.Validator<ChartModel>;
69
- const settings: PropTypes.Requireable<PropTypes.InferProps<{
70
- timeZone: PropTypes.Validator<string>;
71
- defaultDateTimeFormat: PropTypes.Validator<string>;
72
- showTimeZone: PropTypes.Validator<boolean>;
73
- showTSeparator: PropTypes.Validator<boolean>;
74
- formatter: PropTypes.Validator<(PropTypes.InferProps<{}> | null | undefined)[]>;
75
- decimalFormatOptions: PropTypes.Requireable<PropTypes.InferProps<{
76
- defaultFormatString: PropTypes.Requireable<string>;
77
- }>>;
78
- integerFormatOptions: PropTypes.Requireable<PropTypes.InferProps<{
79
- defaultFormatString: PropTypes.Requireable<string>;
80
- }>>;
81
- }>>;
82
- const isActive: PropTypes.Requireable<boolean>;
83
- const onDisconnect: PropTypes.Requireable<(...args: any[]) => any>;
84
- const onReconnect: PropTypes.Requireable<(...args: any[]) => any>;
85
- const onUpdate: PropTypes.Requireable<(...args: any[]) => any>;
86
- const onError: PropTypes.Requireable<(...args: any[]) => any>;
87
- const onSettingsChanged: PropTypes.Requireable<(...args: any[]) => any>;
88
- }
89
- namespace defaultProps {
90
- const isActive_1: boolean;
91
- export { isActive_1 as isActive };
92
- export namespace settings_1 {
93
- const timeZone: string;
94
- const defaultDateTimeFormat: string;
95
- const showTimeZone: boolean;
96
- const showTSeparator: boolean;
97
- const formatter: never[];
98
- }
99
- export { settings_1 as settings };
100
- export function onDisconnect_1(): void;
101
- export { onDisconnect_1 as onDisconnect };
102
- export function onReconnect_1(): void;
103
- export { onReconnect_1 as onReconnect };
104
- export function onUpdate_1(): void;
105
- export { onUpdate_1 as onUpdate };
106
- export function onError_1(): void;
107
- export { onError_1 as onError };
108
- export function onSettingsChanged_1(): void;
109
- export { onSettingsChanged_1 as onSettingsChanged };
110
- }
112
+ render(): ReactElement;
111
113
  }
112
114
  export default Chart;
113
- import React from "react";
114
- import ChartModel from "./ChartModel";
115
- import PropTypes from "prop-types";
116
115
  //# sourceMappingURL=Chart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../src/Chart.jsx"],"names":[],"mappings":"AAgBA;IACE;;;OAGG;IACH;;;;;;MAWC;IAED,4MAQC;IAED,oIAMC;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;IAYvB,gBAAgB,IAAI,IAAI;IAkBxB,MAAM,IAAI,YAAY;CAsCvB;AAED,eAAe,KAAK,CAAC"}
package/dist/Chart.js CHANGED
@@ -5,7 +5,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
7
  import React, { Component } from 'react';
8
- import PropTypes from 'prop-types';
9
8
  import deepEqual from 'deep-equal';
10
9
  import memoize from 'memoize-one';
11
10
  import { vsLoading, dhGraphLineDown, dhWarningFilled } from '@deephaven/icons';
@@ -20,15 +19,16 @@ var log = Log.module('Chart');
20
19
  export class Chart extends Component {
21
20
  /**
22
21
  * Convert a font awesome icon definition to a plotly icon definition
23
- * @param {FontAwesome.IconDefinition} faIcon The icon to convert
22
+ * @param faIcon The icon to convert
24
23
  */
25
24
  static convertIcon(faIcon) {
26
25
  var [width,,,, path] = faIcon.icon; // By default the icons are flipped upside down, so we need to add our own transform
27
26
  // https://github.com/plotly/plotly.js/issues/1335
28
27
 
28
+ var stringPath = "".concat(path);
29
29
  return {
30
30
  width,
31
- path,
31
+ path: stringPath,
32
32
  ascent: width,
33
33
  descent: 0,
34
34
  transform: "matrix(1, 0, 0, 1, 0, 0)"
@@ -54,13 +54,35 @@ export class Chart extends Component {
54
54
  constructor(props) {
55
55
  super(props);
56
56
 
57
+ _defineProperty(this, "currentSeries", void 0);
58
+
59
+ _defineProperty(this, "plot", void 0);
60
+
61
+ _defineProperty(this, "plotWrapper", void 0);
62
+
63
+ _defineProperty(this, "columnFormats", void 0);
64
+
65
+ _defineProperty(this, "dateTimeFormatterOptions", void 0);
66
+
67
+ _defineProperty(this, "decimalFormatOptions", void 0);
68
+
69
+ _defineProperty(this, "integerFormatOptions", void 0);
70
+
71
+ _defineProperty(this, "rect", void 0);
72
+
73
+ _defineProperty(this, "ranges", void 0);
74
+
75
+ _defineProperty(this, "isSubscribed", void 0);
76
+
77
+ _defineProperty(this, "isLoadedFired", void 0);
78
+
57
79
  _defineProperty(this, "getCachedConfig", memoize((downsamplingError, isDownsampleFinished, isDownsampleInProgress, isDownsamplingDisabled) => {
58
80
  var customButtons = [];
59
81
 
60
82
  if (downsamplingError) {
61
83
  customButtons.push({
62
84
  name: "Downsampling failed: ".concat(downsamplingError),
63
- click: () => {},
85
+ click: () => undefined,
64
86
  icon: Chart.convertIcon(dhWarningFilled),
65
87
  attr: 'fill-warning'
66
88
  });
@@ -100,10 +122,9 @@ export class Chart extends Component {
100
122
  this.dateTimeFormatterOptions = {};
101
123
  this.decimalFormatOptions = {};
102
124
  this.integerFormatOptions = {};
103
- this.rect = null;
104
- this.ranges = null;
105
125
  this.isSubscribed = false;
106
126
  this.isLoadedFired = false;
127
+ this.currentSeries = 0;
107
128
  this.state = {
108
129
  data: null,
109
130
  downsamplingError: null,
@@ -244,7 +265,11 @@ export class Chart extends Component {
244
265
  layout,
245
266
  revision
246
267
  } = state;
247
- layout.datarevision += 1;
268
+
269
+ if (typeof layout.datarevision === 'number') {
270
+ layout.datarevision += 1;
271
+ }
272
+
248
273
  return {
249
274
  data: detail,
250
275
  layout,
@@ -353,7 +378,7 @@ export class Chart extends Component {
353
378
  handleRelayout(changes) {
354
379
  log.debug('handleRelayout', changes);
355
380
 
356
- if (Object.keys(changes).includes('hiddenlabels')) {
381
+ if (changes.hiddenlabels != null) {
357
382
  var {
358
383
  onSettingsChanged
359
384
  } = this.props; // Pie charts store series visibility in layout.hiddenlabels and trigger relayout on changes
@@ -379,16 +404,19 @@ export class Chart extends Component {
379
404
  var {
380
405
  onSettingsChanged
381
406
  } = this.props;
382
- var hiddenSeries = data.reduce((acc, _ref3) => {
383
- var {
384
- name,
385
- visible
386
- } = _ref3;
387
- return visible === 'legendonly' ? [...acc, name] : acc;
388
- }, []);
389
- onSettingsChanged({
390
- hiddenSeries
391
- });
407
+
408
+ if (data != null) {
409
+ var hiddenSeries = data.reduce((acc, _ref3) => {
410
+ var {
411
+ name,
412
+ visible
413
+ } = _ref3;
414
+ return name != null && visible === 'legendonly' ? [...acc, name] : acc;
415
+ }, []);
416
+ onSettingsChanged({
417
+ hiddenSeries
418
+ });
419
+ }
392
420
  }
393
421
  }
394
422
  /**
@@ -397,7 +425,7 @@ export class Chart extends Component {
397
425
  * the user is looking at has changed (eg. panning/zooming).
398
426
  * Could update each independently, but doing them at the same time keeps the
399
427
  * ChartModel API a bit cleaner.
400
- * @param {boolean} force Force a change even if the chart dimensions haven't changed (eg. after pan/zoom)
428
+ * @param force Force a change even if the chart dimensions haven't changed (eg. after pan/zoom)
401
429
  */
402
430
 
403
431
 
@@ -507,30 +535,8 @@ export class Chart extends Component {
507
535
  }
508
536
 
509
537
  }
510
- Chart.propTypes = {
511
- model: PropTypes.instanceOf(ChartModel).isRequired,
512
- // These settings come from the redux store
513
- settings: PropTypes.shape({
514
- timeZone: PropTypes.string.isRequired,
515
- defaultDateTimeFormat: PropTypes.string.isRequired,
516
- showTimeZone: PropTypes.bool.isRequired,
517
- showTSeparator: PropTypes.bool.isRequired,
518
- formatter: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
519
- decimalFormatOptions: PropTypes.shape({
520
- defaultFormatString: PropTypes.string
521
- }),
522
- integerFormatOptions: PropTypes.shape({
523
- defaultFormatString: PropTypes.string
524
- })
525
- }),
526
- isActive: PropTypes.bool,
527
- onDisconnect: PropTypes.func,
528
- onReconnect: PropTypes.func,
529
- onUpdate: PropTypes.func,
530
- onError: PropTypes.func,
531
- onSettingsChanged: PropTypes.func
532
- };
533
- Chart.defaultProps = {
538
+
539
+ _defineProperty(Chart, "defaultProps", {
534
540
  isActive: true,
535
541
  settings: {
536
542
  timeZone: 'America/New_York',
@@ -539,11 +545,12 @@ Chart.defaultProps = {
539
545
  showTSeparator: true,
540
546
  formatter: []
541
547
  },
542
- onDisconnect: () => {},
543
- onReconnect: () => {},
544
- onUpdate: () => {},
545
- onError: () => {},
546
- onSettingsChanged: () => {}
547
- };
548
+ onDisconnect: () => undefined,
549
+ onReconnect: () => undefined,
550
+ onUpdate: () => undefined,
551
+ onError: () => undefined,
552
+ onSettingsChanged: () => undefined
553
+ });
554
+
548
555
  export default Chart;
549
556
  //# sourceMappingURL=Chart.js.map
package/dist/Chart.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Chart.js","names":["React","Component","PropTypes","deepEqual","memoize","vsLoading","dhGraphLineDown","dhWarningFilled","Formatter","FormatterUtils","DateUtils","Log","Plotly","Plot","ChartModel","ChartUtils","log","module","Chart","convertIcon","faIcon","width","path","icon","ascent","descent","transform","downsampleButtonTitle","isDownsampleInProgress","isDownsamplingDisabled","downsampleButtonAttr","undefined","constructor","props","downsamplingError","isDownsampleFinished","customButtons","push","name","click","attr","handleDownsampleClick","displaylogo","displayModeBar","modeBarButtons","handleAfterPlot","bind","handleModelEvent","handlePlotUpdate","handleRelayout","handleRestyle","plot","createRef","plotWrapper","columnFormats","dateTimeFormatterOptions","decimalFormatOptions","integerFormatOptions","rect","ranges","isSubscribed","isLoadedFired","state","data","layout","datarevision","revision","componentDidMount","updateDimensions","updateModelDimensions","initData","initFormatter","isActive","subscribe","componentDidUpdate","prevProps","settings","updateFormatterSettings","unsubscribe","componentWillUnmount","getPlotRect","current","getBoundingClientRect","model","setState","getData","getLayout","height","debug2","setDownsamplingDisabled","event","type","detail","EVENT_UPDATED","currentSeries","onUpdate","isLoading","EVENT_LOADFINISHED","EVENT_DISCONNECT","onDisconnect","EVENT_RECONNECT","onReconnect","EVENT_DOWNSAMPLESTARTED","EVENT_DOWNSAMPLEFINISHED","EVENT_DOWNSAMPLENEEDED","EVENT_DOWNSAMPLEFAILED","message","onError","Error","debug","figure","getLayoutRanges","isRangesChanged","changes","Object","keys","includes","onSettingsChanged","hiddenSeries","hiddenlabels","seriesIndexes","reduce","acc","visible","force","warn","isRectChanged","setDimensions","getColumnFormats","getDateTimeFormatterOptions","updateFormatter","formatter","setFormatter","relayout","el","autosize","catch","e","render","config","getCachedConfig","isPlotShown","error","propTypes","instanceOf","isRequired","shape","timeZone","string","defaultDateTimeFormat","showTimeZone","bool","showTSeparator","arrayOf","defaultFormatString","func","defaultProps","FULL_DATE_FORMAT"],"sources":["../src/Chart.jsx"],"sourcesContent":["import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport deepEqual from 'deep-equal';\nimport memoize from 'memoize-one';\nimport { vsLoading, dhGraphLineDown, dhWarningFilled } from '@deephaven/icons';\nimport { Formatter, FormatterUtils, DateUtils } from '@deephaven/jsapi-utils';\nimport Log from '@deephaven/log';\nimport Plotly from './plotly/Plotly';\nimport Plot from './plotly/Plot';\n\nimport ChartModel from './ChartModel';\nimport ChartUtils from './ChartUtils';\nimport './Chart.scss';\n\nconst log = Log.module('Chart');\n\nexport class Chart extends Component {\n /**\n * Convert a font awesome icon definition to a plotly icon definition\n * @param {FontAwesome.IconDefinition} faIcon The icon to convert\n */\n static convertIcon(faIcon) {\n const [width, , , , path] = faIcon.icon;\n // By default the icons are flipped upside down, so we need to add our own transform\n // https://github.com/plotly/plotly.js/issues/1335\n return {\n width,\n path,\n ascent: width,\n descent: 0,\n transform: `matrix(1, 0, 0, 1, 0, 0)`,\n };\n }\n\n static downsampleButtonTitle(isDownsampleInProgress, isDownsamplingDisabled) {\n if (isDownsampleInProgress) {\n return 'Downsampling in progress...';\n }\n\n return isDownsamplingDisabled\n ? 'Downsampling disabled, click to enable'\n : 'Downsampling enabled, click to disable';\n }\n\n static downsampleButtonAttr(isDownsampleInProgress, isDownsamplingDisabled) {\n if (isDownsampleInProgress) {\n return 'animation-spin';\n }\n\n return isDownsamplingDisabled ? undefined : 'fill-active';\n }\n\n constructor(props) {\n super(props);\n\n this.handleAfterPlot = this.handleAfterPlot.bind(this);\n this.handleDownsampleClick = this.handleDownsampleClick.bind(this);\n this.handleModelEvent = this.handleModelEvent.bind(this);\n this.handlePlotUpdate = this.handlePlotUpdate.bind(this);\n this.handleRelayout = this.handleRelayout.bind(this);\n this.handleRestyle = this.handleRestyle.bind(this);\n\n this.plot = React.createRef();\n this.plotWrapper = React.createRef();\n this.columnFormats = [];\n this.dateTimeFormatterOptions = {};\n this.decimalFormatOptions = {};\n this.integerFormatOptions = {};\n this.rect = null;\n this.ranges = null;\n this.isSubscribed = false;\n this.isLoadedFired = false;\n\n this.state = {\n data: null,\n downsamplingError: null,\n isDownsampleFinished: false,\n isDownsampleInProgress: false,\n isDownsamplingDisabled: false,\n layout: {\n datarevision: 0,\n },\n revision: 0,\n };\n }\n\n componentDidMount() {\n // Need to make sure the model dimensions are up to date before initializing the data\n this.updateDimensions();\n this.updateModelDimensions();\n\n this.initData();\n this.initFormatter();\n\n const { isActive } = this.props;\n if (isActive) {\n this.subscribe();\n }\n }\n\n componentDidUpdate(prevProps) {\n const { isActive, settings } = this.props;\n this.updateFormatterSettings(settings);\n\n if (isActive !== prevProps.isActive) {\n if (isActive) {\n this.subscribe();\n } else {\n this.unsubscribe();\n }\n }\n }\n\n componentWillUnmount() {\n this.unsubscribe();\n }\n\n getCachedConfig = memoize(\n (\n downsamplingError,\n isDownsampleFinished,\n isDownsampleInProgress,\n isDownsamplingDisabled\n ) => {\n const customButtons = [];\n if (downsamplingError) {\n customButtons.push({\n name: `Downsampling failed: ${downsamplingError}`,\n click: () => {},\n icon: Chart.convertIcon(dhWarningFilled),\n attr: 'fill-warning',\n });\n }\n\n if (\n isDownsampleFinished ||\n isDownsampleInProgress ||\n isDownsamplingDisabled ||\n downsamplingError\n ) {\n const name = Chart.downsampleButtonTitle(\n isDownsampleInProgress,\n isDownsamplingDisabled\n );\n const attr = Chart.downsampleButtonAttr(\n isDownsampleInProgress,\n isDownsamplingDisabled\n );\n\n const icon = isDownsampleInProgress ? vsLoading : dhGraphLineDown;\n customButtons.push({\n name,\n icon: Chart.convertIcon(icon),\n click: this.handleDownsampleClick,\n attr,\n });\n }\n\n return {\n displaylogo: false,\n\n // Display the mode bar if there's an error or downsampling so user can see progress\n // Yes, the value is a boolean or the string 'hover': https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js#L249\n displayModeBar:\n isDownsampleInProgress || downsamplingError ? true : 'hover',\n\n // Each array gets grouped together in the mode bar\n modeBarButtons: [\n customButtons,\n ['toImage'],\n ['zoom2d', 'pan2d'],\n ['zoomIn2d', 'zoomOut2d', 'autoScale2d', 'resetScale2d'],\n ],\n };\n }\n );\n\n getPlotRect() {\n return this.plotWrapper.current?.getBoundingClientRect() ?? null;\n }\n\n initData() {\n const { model } = this.props;\n const { layout } = this.state;\n this.setState({\n data: model.getData(),\n layout: {\n ...layout,\n ...model.getLayout(),\n },\n });\n }\n\n subscribe() {\n if (this.isSubscribed) {\n return;\n }\n\n const { model } = this.props;\n if (!this.rect || this.rect.width === 0 || this.rect.height === 0) {\n log.debug2('Delaying subscription until model dimensions are set');\n return;\n }\n model.subscribe(this.handleModelEvent);\n this.isSubscribed = true;\n }\n\n unsubscribe() {\n if (!this.isSubscribed) {\n return;\n }\n\n const { model } = this.props;\n model.unsubscribe(this.handleModelEvent);\n this.isSubscribed = false;\n }\n\n handleAfterPlot() {\n if (this.plot.current) {\n // TODO: Translate whatever Don was doing in plotting.js in the afterplot here so that area graphs show up properly\n }\n }\n\n handleDownsampleClick() {\n this.setState(\n ({ isDownsamplingDisabled }) => ({\n downsamplingError: null,\n isDownsampleInProgress: false,\n isDownsampleFinished: false,\n isDownsamplingDisabled: !isDownsamplingDisabled,\n }),\n () => {\n const { model } = this.props;\n const { isDownsamplingDisabled } = this.state;\n model.setDownsamplingDisabled(isDownsamplingDisabled);\n }\n );\n }\n\n handleModelEvent(event) {\n const { type, detail } = event;\n log.debug2('Received data update', type, detail);\n\n switch (type) {\n case ChartModel.EVENT_UPDATED: {\n this.currentSeries += 1;\n this.setState(state => {\n const { layout, revision } = state;\n layout.datarevision += 1;\n return {\n data: detail,\n layout,\n revision: revision + 1,\n };\n });\n\n const { onUpdate } = this.props;\n onUpdate({ isLoading: !this.isLoadedFired });\n break;\n }\n case ChartModel.EVENT_LOADFINISHED: {\n const { onUpdate } = this.props;\n this.isLoadedFired = true;\n onUpdate({ isLoading: false });\n break;\n }\n case ChartModel.EVENT_DISCONNECT: {\n const { onDisconnect } = this.props;\n onDisconnect();\n break;\n }\n case ChartModel.EVENT_RECONNECT: {\n const { onReconnect } = this.props;\n onReconnect();\n break;\n }\n case ChartModel.EVENT_DOWNSAMPLESTARTED: {\n this.setState({\n isDownsampleFinished: false,\n isDownsampleInProgress: true,\n downsamplingError: null,\n });\n break;\n }\n case ChartModel.EVENT_DOWNSAMPLEFINISHED: {\n this.setState({\n isDownsampleFinished: true,\n isDownsampleInProgress: false,\n downsamplingError: null,\n });\n break;\n }\n case ChartModel.EVENT_DOWNSAMPLENEEDED:\n case ChartModel.EVENT_DOWNSAMPLEFAILED: {\n const downsamplingError = detail.message ? detail.message : detail;\n this.setState({\n isDownsampleFinished: false,\n isDownsampleInProgress: false,\n isDownsamplingDisabled: false,\n downsamplingError,\n });\n\n const { onError } = this.props;\n onError(new Error(downsamplingError));\n break;\n }\n default:\n log.debug('Unknown event type', type, event);\n }\n }\n\n handlePlotUpdate(figure) {\n // User could have modified zoom/pan here, update the model dimensions\n // We don't need to update the datarevision, as we don't have any data changes\n // until an update comes back from the server anyway\n const { layout } = figure;\n const ranges = ChartUtils.getLayoutRanges(layout);\n\n const isRangesChanged = !deepEqual(ranges, this.ranges);\n\n if (isRangesChanged) {\n this.ranges = ranges;\n\n this.updateModelDimensions(true);\n }\n }\n\n handleRelayout(changes) {\n log.debug('handleRelayout', changes);\n if (Object.keys(changes).includes('hiddenlabels')) {\n const { onSettingsChanged } = this.props;\n // Pie charts store series visibility in layout.hiddenlabels and trigger relayout on changes\n // Series visibility for other types of charts is handled in handleRestyle\n const hiddenSeries = [...changes.hiddenlabels];\n onSettingsChanged({ hiddenSeries });\n }\n\n this.updateModelDimensions();\n }\n\n handleRestyle([changes, seriesIndexes]) {\n log.debug('handleRestyle', changes, seriesIndexes);\n if (Object.keys(changes).includes('visible')) {\n const { data } = this.state;\n const { onSettingsChanged } = this.props;\n const hiddenSeries = data.reduce(\n (acc, { name, visible }) =>\n visible === 'legendonly' ? [...acc, name] : acc,\n []\n );\n onSettingsChanged({ hiddenSeries });\n }\n }\n\n /**\n * Update the models dimensions and ranges.\n * Note that this will update it all whether the plot size changes OR the range\n * the user is looking at has changed (eg. panning/zooming).\n * Could update each independently, but doing them at the same time keeps the\n * ChartModel API a bit cleaner.\n * @param {boolean} force Force a change even if the chart dimensions haven't changed (eg. after pan/zoom)\n */\n updateModelDimensions(force = false) {\n const rect = this.getPlotRect();\n if (!rect) {\n log.warn('Unable to get plotting rect');\n return;\n }\n\n const isRectChanged =\n !this.rect ||\n this.rect.width !== rect.width ||\n this.rect.height !== rect.height;\n\n if (isRectChanged || force) {\n this.rect = rect;\n\n const { isActive, model } = this.props;\n model.setDimensions(rect);\n // We may need to resubscribe if dimensions were too small before\n if (isActive) {\n this.subscribe();\n }\n }\n }\n\n initFormatter() {\n const { settings } = this.props;\n this.updateFormatterSettings(settings);\n }\n\n updateFormatterSettings(settings) {\n const columnFormats = FormatterUtils.getColumnFormats(settings);\n const dateTimeFormatterOptions = FormatterUtils.getDateTimeFormatterOptions(\n settings\n );\n const { decimalFormatOptions = {}, integerFormatOptions = {} } = settings;\n\n if (\n !deepEqual(this.columnFormats, columnFormats) ||\n !deepEqual(this.dateTimeFormatterOptions, dateTimeFormatterOptions) ||\n !deepEqual(this.decimalFormatOptions, decimalFormatOptions) ||\n !deepEqual(this.integerFormatOptions, integerFormatOptions)\n ) {\n this.columnFormats = FormatterUtils.getColumnFormats(settings);\n this.dateTimeFormatterOptions = dateTimeFormatterOptions;\n this.decimalFormatOptions = decimalFormatOptions;\n this.integerFormatOptions = integerFormatOptions;\n this.updateFormatter();\n }\n }\n\n updateFormatter() {\n const formatter = new Formatter(\n this.columnFormats,\n this.dateTimeFormatterOptions,\n this.decimalFormatOptions,\n this.integerFormatOptions\n );\n\n const { model } = this.props;\n model.setFormatter(formatter);\n }\n\n updateDimensions() {\n const rect = this.getPlotRect();\n if (\n this.plot.current != null &&\n rect != null &&\n rect.width > 0 &&\n rect.height > 0\n ) {\n // Call relayout to resize avoiding the debouncing plotly does\n // https://github.com/plotly/plotly.js/issues/2769#issuecomment-402099552\n Plotly.relayout(this.plot.current.el, { autosize: true }).catch(e => {\n log.debug('Unable to resize, promise rejected', e);\n });\n }\n }\n\n render() {\n const {\n data,\n downsamplingError,\n isDownsampleFinished,\n isDownsampleInProgress,\n isDownsamplingDisabled,\n layout,\n revision,\n } = this.state;\n const config = this.getCachedConfig(\n downsamplingError,\n isDownsampleFinished,\n isDownsampleInProgress,\n isDownsamplingDisabled\n );\n const isPlotShown = data != null;\n return (\n <div className=\"h-100 w-100 chart-wrapper\" ref={this.plotWrapper}>\n {isPlotShown && (\n <Plot\n ref={this.plot}\n data={data}\n layout={layout}\n revision={revision}\n config={config}\n onAfterPlot={this.handleAfterPlot}\n onError={log.error}\n onRelayout={this.handleRelayout}\n onUpdate={this.handlePlotUpdate}\n onRestyle={this.handleRestyle}\n useResizeHandler\n style={{ height: '100%', width: '100%' }}\n />\n )}\n </div>\n );\n }\n}\n\nChart.propTypes = {\n model: PropTypes.instanceOf(ChartModel).isRequired,\n // These settings come from the redux store\n settings: PropTypes.shape({\n timeZone: PropTypes.string.isRequired,\n defaultDateTimeFormat: PropTypes.string.isRequired,\n showTimeZone: PropTypes.bool.isRequired,\n showTSeparator: PropTypes.bool.isRequired,\n formatter: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n decimalFormatOptions: PropTypes.shape({\n defaultFormatString: PropTypes.string,\n }),\n integerFormatOptions: PropTypes.shape({\n defaultFormatString: PropTypes.string,\n }),\n }),\n isActive: PropTypes.bool,\n onDisconnect: PropTypes.func,\n onReconnect: PropTypes.func,\n onUpdate: PropTypes.func,\n onError: PropTypes.func,\n onSettingsChanged: PropTypes.func,\n};\n\nChart.defaultProps = {\n isActive: true,\n settings: {\n timeZone: 'America/New_York',\n defaultDateTimeFormat: DateUtils.FULL_DATE_FORMAT,\n showTimeZone: false,\n showTSeparator: true,\n formatter: [],\n },\n onDisconnect: () => {},\n onReconnect: () => {},\n onUpdate: () => {},\n onError: () => {},\n onSettingsChanged: () => {},\n};\n\nexport default Chart;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,OAAP,MAAoB,aAApB;AACA,SAASC,SAAT,EAAoBC,eAApB,EAAqCC,eAArC,QAA4D,kBAA5D;AACA,SAASC,SAAT,EAAoBC,cAApB,EAAoCC,SAApC,QAAqD,wBAArD;AACA,OAAOC,GAAP,MAAgB,gBAAhB;OACOC,M;OACAC,I;OAEAC,U;OACAC,U;;AAGP,IAAMC,GAAG,GAAGL,GAAG,CAACM,MAAJ,CAAW,OAAX,CAAZ;AAEA,OAAO,MAAMC,KAAN,SAAoBjB,SAApB,CAA8B;EACnC;AACF;AACA;AACA;EACoB,OAAXkB,WAAW,CAACC,MAAD,EAAS;IACzB,IAAM,CAACC,KAAD,KAAcC,IAAd,IAAsBF,MAAM,CAACG,IAAnC,CADyB,CAEzB;IACA;;IACA,OAAO;MACLF,KADK;MAELC,IAFK;MAGLE,MAAM,EAAEH,KAHH;MAILI,OAAO,EAAE,CAJJ;MAKLC,SAAS;IALJ,CAAP;EAOD;;EAE2B,OAArBC,qBAAqB,CAACC,sBAAD,EAAyBC,sBAAzB,EAAiD;IAC3E,IAAID,sBAAJ,EAA4B;MAC1B,OAAO,6BAAP;IACD;;IAED,OAAOC,sBAAsB,GACzB,wCADyB,GAEzB,wCAFJ;EAGD;;EAE0B,OAApBC,oBAAoB,CAACF,sBAAD,EAAyBC,sBAAzB,EAAiD;IAC1E,IAAID,sBAAJ,EAA4B;MAC1B,OAAO,gBAAP;IACD;;IAED,OAAOC,sBAAsB,GA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,CAACuJ,OAAV,CAAkBvJ,SAAS,CAACgJ,KAAV,CAAgB,EAAhB,CAAlB,EAAuCD,UAL1B;IAMxBzF,oBAAoB,EAAEtD,SAAS,CAACgJ,KAAV,CAAgB;MACpCQ,mBAAmB,EAAExJ,SAAS,CAACkJ;IADK,CAAhB,CANE;IASxB3F,oBAAoB,EAAEvD,SAAS,CAACgJ,KAAV,CAAgB;MACpCQ,mBAAmB,EAAExJ,SAAS,CAACkJ;IADK,CAAhB;EATE,CAAhB,CAHM;EAgBhB5E,QAAQ,EAAEtE,SAAS,CAACqJ,IAhBJ;EAiBhBpD,YAAY,EAAEjG,SAAS,CAACyJ,IAjBR;EAkBhBtD,WAAW,EAAEnG,SAAS,CAACyJ,IAlBP;EAmBhB5D,QAAQ,EAAE7F,SAAS,CAACyJ,IAnBJ;EAoBhBhD,OAAO,EAAEzG,SAAS,CAACyJ,IApBH;EAqBhBtC,iBAAiB,EAAEnH,SAAS,CAACyJ;AArBb,CAAlB;AAwBAzI,KAAK,CAAC0I,YAAN,GAAqB;EACnBpF,QAAQ,EAAE,IADS;EAEnBI,QAAQ,EAAE;IACRuE,QAAQ,EAAE,kBADF;IAERE,qBAAqB,EAAE3I,SAAS,CAACmJ,gBAFzB;IAGRP,YAAY,EAAE,KAHN;IAIRE,cAAc,EAAE,IAJR;IAKRrB,SAAS,EAAE;EALH,CAFS;EASnBhC,YAAY,EAAE,MAAM,CAAE,CATH;EAUnBE,WAAW,EAAE,MAAM,CAAE,CAVF;EAWnBN,QAAQ,EAAE,MAAM,CAAE,CAXC;EAYnBY,OAAO,EAAE,MAAM,CAAE,CAZE;EAanBU,iBAAiB,EAAE,MAAM,CAAE;AAbR,CAArB;AAgBA,eAAenG,KAAf"}
1
+ {"version":3,"file":"Chart.js","names":["React","Component","deepEqual","memoize","vsLoading","dhGraphLineDown","dhWarningFilled","Formatter","FormatterUtils","DateUtils","Log","Plotly","Plot","ChartModel","ChartUtils","log","module","Chart","convertIcon","faIcon","width","path","icon","stringPath","ascent","descent","transform","downsampleButtonTitle","isDownsampleInProgress","isDownsamplingDisabled","downsampleButtonAttr","undefined","constructor","props","downsamplingError","isDownsampleFinished","customButtons","push","name","click","attr","handleDownsampleClick","displaylogo","displayModeBar","modeBarButtons","handleAfterPlot","bind","handleModelEvent","handlePlotUpdate","handleRelayout","handleRestyle","plot","createRef","plotWrapper","columnFormats","dateTimeFormatterOptions","decimalFormatOptions","integerFormatOptions","isSubscribed","isLoadedFired","currentSeries","state","data","layout","datarevision","revision","componentDidMount","updateDimensions","updateModelDimensions","initData","initFormatter","isActive","subscribe","componentDidUpdate","prevProps","settings","updateFormatterSettings","unsubscribe","componentWillUnmount","getPlotRect","current","getBoundingClientRect","model","setState","getData","getLayout","rect","height","debug2","setDownsamplingDisabled","event","type","detail","EVENT_UPDATED","onUpdate","isLoading","EVENT_LOADFINISHED","EVENT_DISCONNECT","onDisconnect","EVENT_RECONNECT","onReconnect","EVENT_DOWNSAMPLESTARTED","EVENT_DOWNSAMPLEFINISHED","EVENT_DOWNSAMPLENEEDED","EVENT_DOWNSAMPLEFAILED","message","onError","Error","debug","figure","ranges","getLayoutRanges","isRangesChanged","changes","hiddenlabels","onSettingsChanged","hiddenSeries","seriesIndexes","Object","keys","includes","reduce","acc","visible","force","warn","isRectChanged","setDimensions","getColumnFormats","getDateTimeFormatterOptions","updateFormatter","formatter","setFormatter","relayout","el","autosize","catch","e","render","config","getCachedConfig","isPlotShown","error","timeZone","defaultDateTimeFormat","FULL_DATE_FORMAT","showTimeZone","showTSeparator"],"sources":["../src/Chart.tsx"],"sourcesContent":["import React, { Component, ReactElement, RefObject } from 'react';\nimport deepEqual from 'deep-equal';\nimport memoize from 'memoize-one';\nimport {\n vsLoading,\n dhGraphLineDown,\n dhWarningFilled,\n IconDefinition,\n} from '@deephaven/icons';\nimport {\n Formatter,\n FormatterUtils,\n DateUtils,\n DateTimeColumnFormatterOptions,\n DecimalColumnFormatterOptions,\n IntegerColumnFormatterOptions,\n FormattingRule,\n} from '@deephaven/jsapi-utils';\nimport Log from '@deephaven/log';\nimport { WorkspaceSettings } from '@deephaven/redux';\nimport { Layout, Icon, PlotData } from 'plotly.js';\nimport Plotly from './plotly/Plotly';\nimport Plot from './plotly/Plot';\n\nimport ChartModel from './ChartModel';\nimport ChartUtils, { ChartModelSettings } from './ChartUtils';\nimport './Chart.scss';\n\nconst log = Log.module('Chart');\n\ntype FormatterSettings = Partial<WorkspaceSettings> & {\n decimalFormatOptions: DecimalColumnFormatterOptions;\n integerFormatOptions: IntegerColumnFormatterOptions;\n};\n\ninterface ChartProps {\n model: ChartModel;\n // These settings come from the redux store\n settings: Partial<WorkspaceSettings>;\n isActive: boolean;\n onDisconnect: () => void;\n onReconnect: () => void;\n onUpdate: (obj: { isLoading: boolean }) => void;\n onError: (error: Error) => void;\n onSettingsChanged: (settings: Partial<ChartModelSettings>) => void;\n}\n\ninterface ChartState {\n data: Partial<PlotData>[] | null;\n downsamplingError: unknown;\n isDownsampleFinished: boolean;\n isDownsampleInProgress: boolean;\n isDownsamplingDisabled: boolean;\n layout: Partial<Layout>;\n revision: number;\n}\n\nexport class Chart extends Component<ChartProps, ChartState> {\n static defaultProps = {\n isActive: true,\n settings: {\n timeZone: 'America/New_York',\n defaultDateTimeFormat: DateUtils.FULL_DATE_FORMAT,\n showTimeZone: false,\n showTSeparator: true,\n formatter: [],\n },\n onDisconnect: (): void => undefined,\n onReconnect: (): void => undefined,\n onUpdate: (): void => undefined,\n onError: (): void => undefined,\n onSettingsChanged: (): void => undefined,\n };\n\n /**\n * Convert a font awesome icon definition to a plotly icon definition\n * @param faIcon The icon to convert\n */\n static convertIcon(faIcon: IconDefinition): Icon {\n const [width, , , , path] = faIcon.icon;\n // By default the icons are flipped upside down, so we need to add our own transform\n // https://github.com/plotly/plotly.js/issues/1335\n const stringPath = `${path}`;\n return {\n width,\n path: stringPath,\n ascent: width,\n descent: 0,\n transform: `matrix(1, 0, 0, 1, 0, 0)`,\n };\n }\n\n static downsampleButtonTitle(\n isDownsampleInProgress: boolean,\n isDownsamplingDisabled: boolean\n ): string {\n if (isDownsampleInProgress) {\n return 'Downsampling in progress...';\n }\n\n return isDownsamplingDisabled\n ? 'Downsampling disabled, click to enable'\n : 'Downsampling enabled, click to disable';\n }\n\n static downsampleButtonAttr(\n isDownsampleInProgress: boolean,\n isDownsamplingDisabled: boolean\n ): string | undefined {\n if (isDownsampleInProgress) {\n return 'animation-spin';\n }\n\n return isDownsamplingDisabled ? undefined : 'fill-active';\n }\n\n constructor(props: ChartProps) {\n super(props);\n\n this.handleAfterPlot = this.handleAfterPlot.bind(this);\n this.handleDownsampleClick = this.handleDownsampleClick.bind(this);\n this.handleModelEvent = this.handleModelEvent.bind(this);\n this.handlePlotUpdate = this.handlePlotUpdate.bind(this);\n this.handleRelayout = this.handleRelayout.bind(this);\n this.handleRestyle = this.handleRestyle.bind(this);\n\n this.plot = React.createRef();\n this.plotWrapper = React.createRef();\n this.columnFormats = [];\n this.dateTimeFormatterOptions = {};\n this.decimalFormatOptions = {};\n this.integerFormatOptions = {};\n this.isSubscribed = false;\n this.isLoadedFired = false;\n this.currentSeries = 0;\n\n this.state = {\n data: null,\n downsamplingError: null,\n isDownsampleFinished: false,\n isDownsampleInProgress: false,\n isDownsamplingDisabled: false,\n layout: {\n datarevision: 0,\n },\n revision: 0,\n };\n }\n\n componentDidMount(): void {\n // Need to make sure the model dimensions are up to date before initializing the data\n this.updateDimensions();\n this.updateModelDimensions();\n\n this.initData();\n this.initFormatter();\n\n const { isActive } = this.props;\n if (isActive) {\n this.subscribe();\n }\n }\n\n componentDidUpdate(prevProps: ChartProps): void {\n const { isActive, settings } = this.props;\n this.updateFormatterSettings(settings as FormatterSettings);\n\n if (isActive !== prevProps.isActive) {\n if (isActive) {\n this.subscribe();\n } else {\n this.unsubscribe();\n }\n }\n }\n\n componentWillUnmount(): void {\n this.unsubscribe();\n }\n\n currentSeries: number;\n\n plot: RefObject<typeof Plot>;\n\n plotWrapper: RefObject<HTMLDivElement>;\n\n columnFormats?: FormattingRule[];\n\n dateTimeFormatterOptions?: DateTimeColumnFormatterOptions;\n\n decimalFormatOptions: DecimalColumnFormatterOptions;\n\n integerFormatOptions: IntegerColumnFormatterOptions;\n\n rect?: DOMRect;\n\n ranges?: unknown;\n\n isSubscribed: boolean;\n\n isLoadedFired: boolean;\n\n getCachedConfig = memoize(\n (\n downsamplingError,\n isDownsampleFinished,\n isDownsampleInProgress,\n isDownsamplingDisabled\n ) => {\n const customButtons = [];\n if (downsamplingError) {\n customButtons.push({\n name: `Downsampling failed: ${downsamplingError}`,\n click: () => undefined,\n icon: Chart.convertIcon(dhWarningFilled),\n attr: 'fill-warning',\n });\n }\n\n if (\n isDownsampleFinished ||\n isDownsampleInProgress ||\n isDownsamplingDisabled ||\n downsamplingError\n ) {\n const name = Chart.downsampleButtonTitle(\n isDownsampleInProgress,\n isDownsamplingDisabled\n );\n const attr = Chart.downsampleButtonAttr(\n isDownsampleInProgress,\n isDownsamplingDisabled\n );\n\n const icon = isDownsampleInProgress ? vsLoading : dhGraphLineDown;\n customButtons.push({\n name,\n icon: Chart.convertIcon(icon),\n click: this.handleDownsampleClick,\n attr,\n });\n }\n\n return {\n displaylogo: false,\n\n // Display the mode bar if there's an error or downsampling so user can see progress\n // Yes, the value is a boolean or the string 'hover': https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js#L249\n displayModeBar:\n isDownsampleInProgress || downsamplingError ? true : 'hover',\n\n // Each array gets grouped together in the mode bar\n modeBarButtons: [\n customButtons,\n ['toImage'],\n ['zoom2d', 'pan2d'],\n ['zoomIn2d', 'zoomOut2d', 'autoScale2d', 'resetScale2d'],\n ],\n };\n }\n );\n\n getPlotRect(): DOMRect | null {\n return this.plotWrapper.current?.getBoundingClientRect() ?? null;\n }\n\n initData(): void {\n const { model } = this.props;\n const { layout } = this.state;\n this.setState({\n data: model.getData(),\n layout: {\n ...layout,\n ...model.getLayout(),\n },\n });\n }\n\n subscribe(): void {\n if (this.isSubscribed) {\n return;\n }\n\n const { model } = this.props;\n if (!this.rect || this.rect.width === 0 || this.rect.height === 0) {\n log.debug2('Delaying subscription until model dimensions are set');\n return;\n }\n model.subscribe(this.handleModelEvent);\n this.isSubscribed = true;\n }\n\n unsubscribe(): void {\n if (!this.isSubscribed) {\n return;\n }\n\n const { model } = this.props;\n model.unsubscribe(this.handleModelEvent);\n this.isSubscribed = false;\n }\n\n handleAfterPlot(): void {\n if (this.plot.current) {\n // TODO: Translate whatever Don was doing in plotting.js in the afterplot here so that area graphs show up properly\n }\n }\n\n handleDownsampleClick(): void {\n this.setState(\n ({ isDownsamplingDisabled }) => ({\n downsamplingError: null,\n isDownsampleInProgress: false,\n isDownsampleFinished: false,\n isDownsamplingDisabled: !isDownsamplingDisabled,\n }),\n () => {\n const { model } = this.props;\n const { isDownsamplingDisabled } = this.state;\n model.setDownsamplingDisabled(isDownsamplingDisabled);\n }\n );\n }\n\n handleModelEvent(event: CustomEvent): void {\n const { type, detail } = event;\n log.debug2('Received data update', type, detail);\n\n switch (type) {\n case ChartModel.EVENT_UPDATED: {\n this.currentSeries += 1;\n this.setState(state => {\n const { layout, revision } = state;\n if (typeof layout.datarevision === 'number') {\n layout.datarevision += 1;\n }\n return {\n data: detail,\n layout,\n revision: revision + 1,\n };\n });\n\n const { onUpdate } = this.props;\n onUpdate({ isLoading: !this.isLoadedFired });\n break;\n }\n case ChartModel.EVENT_LOADFINISHED: {\n const { onUpdate } = this.props;\n this.isLoadedFired = true;\n onUpdate({ isLoading: false });\n break;\n }\n case ChartModel.EVENT_DISCONNECT: {\n const { onDisconnect } = this.props;\n onDisconnect();\n break;\n }\n case ChartModel.EVENT_RECONNECT: {\n const { onReconnect } = this.props;\n onReconnect();\n break;\n }\n case ChartModel.EVENT_DOWNSAMPLESTARTED: {\n this.setState({\n isDownsampleFinished: false,\n isDownsampleInProgress: true,\n downsamplingError: null,\n });\n break;\n }\n case ChartModel.EVENT_DOWNSAMPLEFINISHED: {\n this.setState({\n isDownsampleFinished: true,\n isDownsampleInProgress: false,\n downsamplingError: null,\n });\n break;\n }\n case ChartModel.EVENT_DOWNSAMPLENEEDED:\n case ChartModel.EVENT_DOWNSAMPLEFAILED: {\n const downsamplingError = detail.message ? detail.message : detail;\n this.setState({\n isDownsampleFinished: false,\n isDownsampleInProgress: false,\n isDownsamplingDisabled: false,\n downsamplingError,\n });\n\n const { onError } = this.props;\n onError(new Error(downsamplingError));\n break;\n }\n default:\n log.debug('Unknown event type', type, event);\n }\n }\n\n handlePlotUpdate(figure: { layout: Layout }): void {\n // User could have modified zoom/pan here, update the model dimensions\n // We don't need to update the datarevision, as we don't have any data changes\n // until an update comes back from the server anyway\n const { layout } = figure;\n const ranges = ChartUtils.getLayoutRanges(layout);\n\n const isRangesChanged = !deepEqual(ranges, this.ranges);\n\n if (isRangesChanged) {\n this.ranges = ranges;\n\n this.updateModelDimensions(true);\n }\n }\n\n handleRelayout(changes: { hiddenlabels?: string[] }): void {\n log.debug('handleRelayout', changes);\n if (changes.hiddenlabels != null) {\n const { onSettingsChanged } = this.props;\n // Pie charts store series visibility in layout.hiddenlabels and trigger relayout on changes\n // Series visibility for other types of charts is handled in handleRestyle\n const hiddenSeries = [...changes.hiddenlabels];\n onSettingsChanged({ hiddenSeries });\n }\n\n this.updateModelDimensions();\n }\n\n handleRestyle([changes, seriesIndexes]: [\n Record<string, unknown>,\n number[]\n ]): void {\n log.debug('handleRestyle', changes, seriesIndexes);\n if (Object.keys(changes).includes('visible')) {\n const { data } = this.state;\n const { onSettingsChanged } = this.props;\n if (data != null) {\n const hiddenSeries = data.reduce(\n (acc: string[], { name, visible }) =>\n name != null && visible === 'legendonly' ? [...acc, name] : acc,\n []\n );\n onSettingsChanged({ hiddenSeries });\n }\n }\n }\n\n /**\n * Update the models dimensions and ranges.\n * Note that this will update it all whether the plot size changes OR the range\n * the user is looking at has changed (eg. panning/zooming).\n * Could update each independently, but doing them at the same time keeps the\n * ChartModel API a bit cleaner.\n * @param force Force a change even if the chart dimensions haven't changed (eg. after pan/zoom)\n */\n updateModelDimensions(force = false): void {\n const rect = this.getPlotRect();\n if (!rect) {\n log.warn('Unable to get plotting rect');\n return;\n }\n\n const isRectChanged =\n !this.rect ||\n this.rect.width !== rect.width ||\n this.rect.height !== rect.height;\n\n if (isRectChanged || force) {\n this.rect = rect;\n\n const { isActive, model } = this.props;\n model.setDimensions(rect);\n // We may need to resubscribe if dimensions were too small before\n if (isActive) {\n this.subscribe();\n }\n }\n }\n\n initFormatter(): void {\n const { settings } = this.props;\n this.updateFormatterSettings(settings as FormatterSettings);\n }\n\n updateFormatterSettings(\n settings: Partial<WorkspaceSettings> & {\n decimalFormatOptions: DecimalColumnFormatterOptions;\n integerFormatOptions: IntegerColumnFormatterOptions;\n }\n ): void {\n const columnFormats = FormatterUtils.getColumnFormats(settings);\n const dateTimeFormatterOptions = FormatterUtils.getDateTimeFormatterOptions(\n settings\n );\n const { decimalFormatOptions = {}, integerFormatOptions = {} } = settings;\n\n if (\n !deepEqual(this.columnFormats, columnFormats) ||\n !deepEqual(this.dateTimeFormatterOptions, dateTimeFormatterOptions) ||\n !deepEqual(this.decimalFormatOptions, decimalFormatOptions) ||\n !deepEqual(this.integerFormatOptions, integerFormatOptions)\n ) {\n this.columnFormats = FormatterUtils.getColumnFormats(settings);\n this.dateTimeFormatterOptions = dateTimeFormatterOptions;\n this.decimalFormatOptions = decimalFormatOptions;\n this.integerFormatOptions = integerFormatOptions;\n this.updateFormatter();\n }\n }\n\n updateFormatter(): void {\n const formatter = new Formatter(\n this.columnFormats,\n this.dateTimeFormatterOptions,\n this.decimalFormatOptions,\n this.integerFormatOptions\n );\n\n const { model } = this.props;\n model.setFormatter(formatter);\n }\n\n updateDimensions(): void {\n const rect = this.getPlotRect();\n if (\n this.plot.current != null &&\n rect != null &&\n rect.width > 0 &&\n rect.height > 0\n ) {\n // Call relayout to resize avoiding the debouncing plotly does\n // https://github.com/plotly/plotly.js/issues/2769#issuecomment-402099552\n Plotly.relayout(this.plot.current.el, { autosize: true }).catch(\n (e: unknown) => {\n log.debug('Unable to resize, promise rejected', e);\n }\n );\n }\n }\n\n render(): ReactElement {\n const {\n data,\n downsamplingError,\n isDownsampleFinished,\n isDownsampleInProgress,\n isDownsamplingDisabled,\n layout,\n revision,\n } = this.state;\n const config = this.getCachedConfig(\n downsamplingError,\n isDownsampleFinished,\n isDownsampleInProgress,\n isDownsamplingDisabled\n );\n const isPlotShown = data != null;\n return (\n <div className=\"h-100 w-100 chart-wrapper\" ref={this.plotWrapper}>\n {isPlotShown && (\n <Plot\n ref={this.plot}\n data={data}\n layout={layout}\n revision={revision}\n config={config}\n onAfterPlot={this.handleAfterPlot}\n onError={log.error}\n onRelayout={this.handleRelayout}\n onUpdate={this.handlePlotUpdate}\n onRestyle={this.handleRestyle}\n useResizeHandler\n style={{ height: '100%', width: '100%' }}\n />\n )}\n </div>\n );\n }\n}\n\nexport default Chart;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAA0D,OAA1D;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,OAAP,MAAoB,aAApB;AACA,SACEC,SADF,EAEEC,eAFF,EAGEC,eAHF,QAKO,kBALP;AAMA,SACEC,SADF,EAEEC,cAFF,EAGEC,SAHF,QAQO,wBARP;AASA,OAAOC,GAAP,MAAgB,gBAAhB;OAGOC,M;OACAC,I;OAEAC,U;OACAC,U;;AAGP,IAAMC,GAAG,GAAGL,GAAG,CAACM,MAAJ,CAAW,OAAX,CAAZ;AA6BA,OAAO,MAAMC,KAAN,SAAoBhB,SAApB,CAAsD;EAiB3D;AACF;AACA;AACA;EACoB,OAAXiB,WAAW,CAACC,MAAD,EAA+B;IAC/C,IAAM,CAACC,KAAD,KAAcC,IAAd,IAAsBF,MAAM,CAACG,IAAnC,CAD+C,CAE/C;IACA;;IACA,IAAMC,UAAU,aAAMF,IAAN,CAAhB;IACA,OAAO;MACLD,KADK;MAELC,IAAI,EAAEE,UAFD;M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BAAgB,MAXlB;MAYE,KAAK,EAAE;QAAEqC,MAAM,EAAE,MAAV;QAAkBnE,KAAK,EAAE;MAAzB;IAZT,EAFJ,CADF;EAoBD;;AAvgB0D;;gBAAhDH,K,kBACW;EACpBsD,QAAQ,EAAE,IADU;EAEpBI,QAAQ,EAAE;IACRoE,QAAQ,EAAE,kBADF;IAERC,qBAAqB,EAAEvI,SAAS,CAACwI,gBAFzB;IAGRC,YAAY,EAAE,KAHN;IAIRC,cAAc,EAAE,IAJR;IAKRhB,SAAS,EAAE;EALH,CAFU;EASpBjC,YAAY,EAAE,MAAYnE,SATN;EAUpBqE,WAAW,EAAE,MAAYrE,SAVL;EAWpB+D,QAAQ,EAAE,MAAY/D,SAXF;EAYpB2E,OAAO,EAAE,MAAY3E,SAZD;EAapBoF,iBAAiB,EAAE,MAAYpF;AAbX,C;;AAygBxB,eAAed,KAAf"}
@@ -1,4 +1,10 @@
1
- export default ChartModel;
1
+ import { Formatter } from '@deephaven/jsapi-utils';
2
+ import { Layout, PlotData } from 'plotly.js';
3
+ export declare type FilterColumnMap = Map<string, {
4
+ name: string;
5
+ type: string;
6
+ }>;
7
+ export declare type ChartEvent = CustomEvent;
2
8
  /**
3
9
  * Model for a Chart
4
10
  * All of these methods should return very quickly.
@@ -13,51 +19,53 @@ declare class ChartModel {
13
19
  static EVENT_DOWNSAMPLEFAILED: string;
14
20
  static EVENT_DOWNSAMPLENEEDED: string;
15
21
  static EVENT_LOADFINISHED: string;
16
- listeners: any[];
17
- formatter: any;
18
- rect: DOMRect | null;
22
+ constructor();
23
+ listeners: ((event: ChartEvent) => void)[];
24
+ formatter?: Formatter;
25
+ rect?: DOMRect;
19
26
  isDownsamplingDisabled: boolean;
20
- title: any;
21
- getData(): never[];
27
+ title?: string;
28
+ getData(): Partial<PlotData>[];
22
29
  getDefaultTitle(): string;
23
- getLayout(): {};
24
- getFilterColumnMap(): Map<any, any>;
30
+ getLayout(): Partial<Layout>;
31
+ getFilterColumnMap(): FilterColumnMap;
25
32
  isFilterRequired(): boolean;
26
- setFilter(): void;
33
+ setFilter(filter: Map<string, string>): void;
27
34
  /**
28
35
  * Close this model, clean up any underlying subscriptions
29
36
  */
30
37
  close(): void;
31
38
  /**
32
39
  * Set the formatter to use when charting the data.
33
- * @param {Formatter} formatter The formatter to use to format the charting data
40
+ * @param formatter The formatter to use to format the charting data
34
41
  */
35
42
  setFormatter(formatter: Formatter): void;
36
43
  /**
37
44
  * Disable downsampling
38
- * @param {boolean} isDownsamplingDisabled True if downsampling should be disabled
45
+ * @param isDownsamplingDisabled True if downsampling should be disabled
39
46
  */
40
47
  setDownsamplingDisabled(isDownsamplingDisabled: boolean): void;
41
48
  /**
42
49
  * Set the dimensions of the plot. May be needed to evaluate some of the percents
43
- * @param {DOMRect} rect The bounding rectangle of the plot
50
+ * @param rect The bounding rectangle of the plot
44
51
  */
45
52
  setDimensions(rect: DOMRect): void;
46
- setTitle(title: any): void;
53
+ setTitle(title: string): void;
47
54
  /**
48
55
  * Subscribe to this ChartModel and start listening for all events.
49
- * @param {Function<Event>} callback Callback when an event occurs
56
+ * @param callback Callback when an event occurs
50
57
  */
51
- subscribe(callback: Function): void;
52
- unsubscribe(callback: any): void;
53
- fireEvent(event: any): void;
54
- fireUpdate(data: any): void;
58
+ subscribe(callback: (event: ChartEvent) => void): void;
59
+ unsubscribe(callback: (event: ChartEvent) => void): void;
60
+ fireEvent(event: ChartEvent): void;
61
+ fireUpdate(data: unknown): void;
55
62
  fireDisconnect(): void;
56
63
  fireReconnect(): void;
57
- fireDownsampleStart(detail: any): void;
58
- fireDownsampleFinish(detail: any): void;
59
- fireDownsampleFail(detail: any): void;
60
- fireDownsampleNeeded(detail: any): void;
64
+ fireDownsampleStart(detail: unknown): void;
65
+ fireDownsampleFinish(detail: unknown): void;
66
+ fireDownsampleFail(detail: unknown): void;
67
+ fireDownsampleNeeded(detail: unknown): void;
61
68
  fireLoadFinished(): void;
62
69
  }
70
+ export default ChartModel;
63
71
  //# sourceMappingURL=ChartModel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChartModel.d.ts","sourceRoot":"","sources":["../src/ChartModel.js"],"names":[],"mappings":";AAEA;;;;GAIG;AACH;IACE,6BAAkD;IAElD,gCAAwD;IAExD,+BAAsD;IAEtD,uCAAsE;IAEtE,wCAAwE;IAExE,sCAAoE;IAEpE,sCAAoE;IAEpE,kCAA4D;IAG1D,iBAAmB;IACnB,eAAqB;IACrB,qBAAgB;IAChB,gCAAmC;IACnC,WAAiB;IAGnB,mBAEC;IAED,0BAEC;IAED,gBAEC;IAED,oCAEC;IAED,4BAEC;IAED,kBAAc;IAEd;;OAEG;IACH,cAAU;IAEV;;;OAGG;IACH,yCAEC;IAED;;;OAGG;IACH,gDAFW,OAAO,QAIjB;IAED;;;OAGG;IACH,oBAFW,OAAO,QAIjB;IAED,2BAEC;IAED;;;OAGG;IACH,oCAEC;IAED,iCAEC;IAED,4BAIC;IAED,4BAEC;IAED,uBAEC;IAED,sBAEC;IAED,uCAIC;IAED,wCAIC;IAED,sCAIC;IAED,wCAIC;IAED,yBAEC;CACF"}
1
+ {"version":3,"file":"ChartModel.d.ts","sourceRoot":"","sources":["../src/ChartModel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE7C,oBAAY,eAAe,GAAG,GAAG,CAC/B,MAAM,EACN;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CACF,CAAC;AAEF,oBAAY,UAAU,GAAG,WAAW,CAAC;AACrC;;;;GAIG;AACH,cAAM,UAAU;IACd,MAAM,CAAC,aAAa,SAA8B;IAElD,MAAM,CAAC,gBAAgB,SAAiC;IAExD,MAAM,CAAC,eAAe,SAAgC;IAEtD,MAAM,CAAC,uBAAuB,SAAwC;IAEtE,MAAM,CAAC,wBAAwB,SAAyC;IA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