@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.
Files changed (46) hide show
  1. package/dist/Chart.d.ts +0 -2
  2. package/dist/Chart.d.ts.map +1 -1
  3. package/dist/Chart.js +1 -15
  4. package/dist/Chart.js.map +1 -1
  5. package/dist/ChartModelFactory.d.ts +38 -5
  6. package/dist/ChartModelFactory.d.ts.map +1 -1
  7. package/dist/ChartModelFactory.js +11 -6
  8. package/dist/ChartModelFactory.js.map +1 -1
  9. package/dist/ChartTheme.d.ts +3 -4
  10. package/dist/ChartTheme.d.ts.map +1 -1
  11. package/dist/ChartTheme.js +19 -38
  12. package/dist/ChartTheme.js.map +1 -1
  13. package/dist/ChartTheme.module.css +16 -16
  14. package/dist/ChartTheme.module.css.map +1 -1
  15. package/dist/ChartUtils.d.ts +129 -12
  16. package/dist/ChartUtils.d.ts.map +1 -1
  17. package/dist/ChartUtils.js +26 -19
  18. package/dist/ChartUtils.js.map +1 -1
  19. package/dist/FigureChartModel.d.ts +3 -4
  20. package/dist/FigureChartModel.d.ts.map +1 -1
  21. package/dist/FigureChartModel.js +8 -7
  22. package/dist/FigureChartModel.js.map +1 -1
  23. package/dist/MockChartModel.d.ts +0 -3
  24. package/dist/MockChartModel.d.ts.map +1 -1
  25. package/dist/MockChartModel.js +11 -21
  26. package/dist/MockChartModel.js.map +1 -1
  27. package/dist/index.d.ts +1 -3
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +1 -3
  30. package/dist/index.js.map +1 -1
  31. package/dist/plotly/Plot.d.ts.map +1 -1
  32. package/dist/plotly/Plot.js +8 -3
  33. package/dist/plotly/Plot.js.map +1 -1
  34. package/package.json +9 -11
  35. package/dist/ChartThemeProvider.d.ts +0 -9
  36. package/dist/ChartThemeProvider.d.ts.map +0 -1
  37. package/dist/ChartThemeProvider.js +0 -35
  38. package/dist/ChartThemeProvider.js.map +0 -1
  39. package/dist/plotly/createPlotlyComponent.d.ts +0 -4
  40. package/dist/plotly/createPlotlyComponent.d.ts.map +0 -1
  41. package/dist/plotly/createPlotlyComponent.js +0 -13
  42. package/dist/plotly/createPlotlyComponent.js.map +0 -1
  43. package/dist/useChartTheme.d.ts +0 -7
  44. package/dist/useChartTheme.d.ts.map +0 -1
  45. package/dist/useChartTheme.js +0 -10
  46. package/dist/useChartTheme.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FigureChartModel.d.ts","sourceRoot":"","sources":["../src/FigureChartModel.ts"],"names":[],"mappings":";AACA,OAAO,OAAO,MAAM,UAAU,CAAC;AAG/B,OAAO,KAAK,EACV,IAAI,EACJ,KAAK,EACL,EAAE,IAAI,MAAM,EACZ,MAAM,EACN,QAAQ,EACR,MAAM,EACN,UAAU,EACX,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAEV,SAAS,EACV,MAAM,wBAAwB,CAAC;AAChC,OAAO,UAAU,EAAE,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,UAAU,EAAE,EAEjB,kBAAkB,EAClB,eAAe,EACf,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAI1C;;GAEG;AACH,cAAM,gBAAiB,SAAQ,UAAU;IACvC,MAAM,CAAC,mBAAmB,SAAM;IAEhC;;;;;OAKG;gBAED,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,UAAU,EACjB,QAAQ,GAAE,OAAO,CAAC,kBAAkB,CAAM;IA8C5C,UAAU,EAAE,UAAU,CAAC;IAEvB,EAAE,EAAE,MAAM,CAAC;IAEX,MAAM,EAAE,MAAM,CAAC;IA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EAAE,WAAW,GAAG,IAAI;IAYlD,uBAAuB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAejD,uBAAuB,CAAC,KAAK,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAQxD,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAMlC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IA4B7B,YAAY,IAAI,MAAM;IAatB,aAAa,IAAI,MAAM;IAavB,mBAAmB,IAAI,IAAI;IAa3B;;OAEG;IACH,mBAAmB,IAAI,IAAI;IAyB3B;;;;;OAKG;IACH,qBAAqB,CACnB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,OAAO,EAAE,GACnB,IAAI;IAWP;;;;;OAKG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IA8CjC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;IAI1B,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAI5B,kBAAkB,IAAI,eAAe;IAIrC,gBAAgB,IAAI,OAAO;IAO3B;;;OAGG;IACH,SAAS,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IA2BrC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAc/B,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,IAAI;CAG5D;AAED,eAAe,gBAAgB,CAAC"}
@@ -10,6 +10,7 @@ import set from 'lodash.set';
10
10
  import Log from '@deephaven/log';
11
11
  import ChartModel from "./ChartModel.js";
12
12
  import ChartUtils from "./ChartUtils.js";
13
+ import ChartTheme from "./ChartTheme.js";
13
14
  var log = Log.module('FigureChartModel');
14
15
 
15
16
  /**
@@ -19,12 +20,12 @@ class FigureChartModel extends ChartModel {
19
20
  /**
20
21
  * @param dh JSAPI instance
21
22
  * @param figure The figure object created by the API
22
- * @param theme The theme for the figure
23
23
  * @param settings Chart settings
24
24
  */
25
- constructor(dh, figure, theme) {
25
+ constructor(dh, figure) {
26
26
  var _this;
27
- var settings = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
27
+ var settings = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
28
+ var theme = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ChartTheme;
28
29
  super(dh);
29
30
  _this = this;
30
31
  _defineProperty(this, "chartUtils", void 0);
@@ -182,7 +183,7 @@ class FigureChartModel extends ChartModel {
182
183
  dh
183
184
  } = this;
184
185
  var axisTypeMap = ChartUtils.groupArray(axes, 'type');
185
- var seriesData = this.chartUtils.makeSeriesDataFromSeries(series, axisTypeMap, ChartUtils.getSeriesVisibility(series.name, this.settings), this.theme, showLegend);
186
+ var seriesData = this.chartUtils.makeSeriesDataFromSeries(series, axisTypeMap, ChartUtils.getSeriesVisibility(series.name, this.settings), showLegend, this.theme);
186
187
  this.seriesDataMap.set(series.name, seriesData);
187
188
  this.data = [...this.seriesDataMap.values()];
188
189
  if (series.plotStyle === dh.plot.SeriesPlotStyle.STACKED_BAR) {
@@ -423,7 +424,7 @@ class FigureChartModel extends ChartModel {
423
424
  updateAxisPositions() {
424
425
  var plotWidth = this.getPlotWidth();
425
426
  var plotHeight = this.getPlotHeight();
426
- this.chartUtils.updateFigureAxes(this.layout, this.figure, this.theme, chart => this.getAxisRangeParser(chart, this.formatter), plotWidth, plotHeight);
427
+ this.chartUtils.updateFigureAxes(this.layout, this.figure, chart => this.getAxisRangeParser(chart, this.formatter), plotWidth, plotHeight, this.theme);
427
428
  }
428
429
 
429
430
  /**
@@ -503,10 +504,10 @@ class FigureChartModel extends ChartModel {
503
504
  yHigh
504
505
  } = seriesData;
505
506
  if (_xLow && _xHigh && _xLow !== x) {
506
- seriesData.error_x = ChartUtils.getPlotlyErrorBars(x, _xLow, _xHigh, this.theme);
507
+ seriesData.error_x = ChartUtils.getPlotlyErrorBars(x, _xLow, _xHigh);
507
508
  }
508
509
  if (yLow && yHigh && yLow !== y) {
509
- seriesData.error_y = ChartUtils.getPlotlyErrorBars(y, yLow, yHigh, this.theme);
510
+ seriesData.error_y = ChartUtils.getPlotlyErrorBars(y, yLow, yHigh);
510
511
  }
511
512
  } else if (plotStyle === dh.plot.SeriesPlotStyle.TREEMAP) {
512
513
  var {
@@ -1 +1 @@
1
- {"version":3,"file":"FigureChartModel.js","names":["memoize","debounce","set","Log","ChartModel","ChartUtils","log","module","FigureChartModel","constructor","dh","figure","theme","_this","settings","arguments","length","undefined","this","_defineProperty","axes","getAllAxes","pendingSeries","_loop","_chart$showLegend","series","i","chart","charts","find","c","includes","addSeries","showLegend","subscribe","ADD_SERIES_DEBOUNCE","columnType","formatter","dataFormatter","getColumnTypeFormatter","dhTimeZone","timeZone","getTimeZone","value","chartUtils","unwrapValue","wrapValue","range","rangeStart","rangeEnd","valueParser","getValueParser","axis","source","getSourceForAxis","getRangeParser","handleFigureUpdated","bind","handleFigureDisconnected","handleFigureReconnected","handleFigureSeriesAdded","handleDownsampleStart","handleDownsampleFinish","handleDownsampleFail","handleDownsampleNeeded","handleRequestFailed","data","template","layout","makeDefaultLayout","grid","rows","columns","cols","pattern","seriesDataMap","Map","oneClicks","filterColumnMap","lastFilter","isConnected","seriesToProcess","Set","setTitle","getDefaultTitle","initAllSeries","updateAxisPositions","startListeningFigure","close","addPendingSeries","cancel","stopListeningFigure","title","clear","activeSeriesNames","j","push","name","allSeriesNames","keys","inactiveSeriesNames","filter","seriesName","indexOf","delete","axisTypeMap","groupArray","seriesData","makeSeriesDataFromSeries","getSeriesVisibility","values","plotStyle","plot","SeriesPlotStyle","STACKED_BAR","barmode","PIE","hiddenlabels","getHiddenLabels","showlegend","oneClick","updateLayoutFormats","callback","listeners","subscribeFigure","unsubscribe","unsubscribeFigure","debug","isDownsamplingDisabled","DownsampleOptions","DISABLE","DEFAULT","addEventListener","Figure","EVENT_UPDATED","EVENT_SERIES_ADDED","EVENT_DISCONNECT","EVENT_RECONNECT","EVENT_DOWNSAMPLESTARTED","EVENT_DOWNSAMPLEFINISHED","EVENT_DOWNSAMPLEFAILED","EVENT_DOWNSAMPLENEEDED","Client","EVENT_REQUEST_FAILED","removeEventListener","event","fireDownsampleStart","detail","fireDownsampleFinish","error","fireDownsampleFail","info","fireDownsampleNeeded","figureUpdateEvent","seriesArray","debug2","sources","type","valueTranslator","getValueTranslator","dataArray","getArray","setDataArrayForSeries","size","fireLoadFinished","cleanSeries","fireUpdate","resubscribe","setFormatter","setDownsamplingDisabled","fireDisconnect","fireReconnect","setDimensions","rect","_match$length","_match","subtitleCount","match","margin","DEFAULT_MARGIN","t","SUBTITLE_LINE_HEIGHT","_objectSpread","text","pad","DEFAULT_TITLE_PADDING","getPlotWidth","_this$layout$margin$l","_this$layout$margin","_this$layout$margin$r","_this$layout$margin2","width","Math","max","l","r","getPlotHeight","_this$layout$margin$t","_this$layout$margin3","_this$layout$margin$b","_this$layout$margin4","height","b","plotWidth","plotHeight","updateFigureAxes","getAxisRangeParser","axisFormats","getAxisFormats","forEach","axisFormat","axisLayoutProperty","concat","props","Object","assign","sourceType","get","property","getPlotlyProperty","HISTOGRAM","xLow","xHigh","LINE","ERROR_BAR","BAR","x","y","yLow","yHigh","error_x","getPlotlyErrorBars","error_y","TREEMAP","ids","labels","getData","getLayout","getFilterColumnMap","isFilterRequired","requireAllFiltersToDisplay","setFilter","filterMap","_this2","warn","_loop2","key","column","setValueForColumn","setFigure","updateSettings"],"sources":["../src/FigureChartModel.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport memoize from 'memoizee';\nimport debounce from 'lodash.debounce';\nimport set from 'lodash.set';\nimport type {\n Axis,\n Chart,\n dh as DhType,\n Figure,\n OneClick,\n Series,\n SourceType,\n} from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport { Range } from '@deephaven/utils';\nimport type { Layout, Data, PlotData } from 'plotly.js';\nimport type {\n DateTimeColumnFormatter,\n Formatter,\n} from '@deephaven/jsapi-utils';\nimport ChartModel, { ChartEvent } from './ChartModel';\nimport ChartUtils, {\n AxisTypeMap,\n ChartModelSettings,\n FilterColumnMap,\n FilterMap,\n} from './ChartUtils';\nimport { ChartTheme } from './ChartTheme';\n\nconst log = Log.module('FigureChartModel');\n\n/**\n * Takes a Figure object from a widget to make a model for a chart\n */\nclass FigureChartModel extends ChartModel {\n static ADD_SERIES_DEBOUNCE = 50;\n\n /**\n * @param dh JSAPI instance\n * @param figure The figure object created by the API\n * @param theme The theme for the figure\n * @param settings Chart settings\n */\n constructor(\n dh: DhType,\n figure: Figure,\n theme: ChartTheme,\n settings: Partial<ChartModelSettings> = {}\n ) {\n super(dh);\n\n this.handleFigureUpdated = this.handleFigureUpdated.bind(this);\n this.handleFigureDisconnected = this.handleFigureDisconnected.bind(this);\n this.handleFigureReconnected = this.handleFigureReconnected.bind(this);\n this.handleFigureSeriesAdded = this.handleFigureSeriesAdded.bind(this);\n this.handleDownsampleStart = this.handleDownsampleStart.bind(this);\n this.handleDownsampleFinish = this.handleDownsampleFinish.bind(this);\n this.handleDownsampleFail = this.handleDownsampleFail.bind(this);\n this.handleDownsampleNeeded = this.handleDownsampleNeeded.bind(this);\n this.handleRequestFailed = this.handleRequestFailed.bind(this);\n\n this.dh = dh;\n this.chartUtils = new ChartUtils(dh);\n this.figure = figure;\n this.settings = settings;\n this.theme = theme;\n this.data = [];\n const template = {\n data: {},\n layout: this.chartUtils.makeDefaultLayout(theme),\n };\n this.layout = {\n grid: {\n rows: figure.rows,\n columns: figure.cols,\n pattern: 'independent',\n },\n template,\n };\n this.seriesDataMap = new Map();\n this.pendingSeries = [];\n this.oneClicks = [];\n this.filterColumnMap = new Map();\n this.lastFilter = new Map();\n this.isConnected = true; // Assume figure is connected to start\n this.seriesToProcess = new Set();\n\n this.setTitle(this.getDefaultTitle());\n this.initAllSeries();\n this.updateAxisPositions();\n this.startListeningFigure();\n }\n\n chartUtils: ChartUtils;\n\n dh: DhType;\n\n figure: Figure;\n\n settings: Partial<ChartModelSettings>;\n\n theme: ChartTheme;\n\n data: Partial<Data>[];\n\n layout: Partial<Layout>;\n\n seriesDataMap: Map<\n string,\n Partial<PlotData> & {\n xLow?: number[];\n xHigh?: number[];\n yLow?: number[];\n yHigh?: number[];\n }\n >;\n\n pendingSeries: Series[];\n\n oneClicks: OneClick[];\n\n filterColumnMap: FilterColumnMap;\n\n lastFilter: FilterMap;\n\n isConnected: boolean; // Assume figure is connected to start\n\n seriesToProcess;\n\n close(): void {\n this.figure.close();\n this.addPendingSeries.cancel();\n this.stopListeningFigure();\n }\n\n getDefaultTitle(): string {\n if (this.figure.charts.length > 0) {\n const chart = this.figure.charts[0];\n return chart.title;\n }\n\n return '';\n }\n\n initAllSeries(): void {\n this.oneClicks = [];\n this.filterColumnMap.clear();\n\n const { charts } = this.figure;\n const axes = ChartUtils.getAllAxes(this.figure);\n const activeSeriesNames: string[] = [];\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 activeSeriesNames.push(series.name);\n this.addSeries(series, axes, chart.showLegend);\n }\n }\n\n // Remove any series that no longer exist\n const allSeriesNames = [...this.seriesDataMap.keys()];\n const inactiveSeriesNames = allSeriesNames.filter(\n seriesName => activeSeriesNames.indexOf(seriesName) < 0\n );\n for (let i = 0; i < inactiveSeriesNames.length; i += 1) {\n const seriesName = inactiveSeriesNames[i];\n this.seriesDataMap.delete(seriesName);\n }\n this.seriesToProcess = new Set([...this.seriesDataMap.keys()]);\n }\n\n /**\n * Add a series to the model\n * @param series Series object to add\n * @param axes All the axis in this figure\n * @param showLegend Whether this series should show the legend or not\n */\n addSeries(series: Series, axes: Axis[], showLegend: boolean | null): void {\n const { dh } = this;\n const axisTypeMap: AxisTypeMap = ChartUtils.groupArray(axes, 'type');\n\n const seriesData = this.chartUtils.makeSeriesDataFromSeries(\n series,\n axisTypeMap,\n ChartUtils.getSeriesVisibility(series.name, this.settings),\n this.theme,\n showLegend\n );\n\n this.seriesDataMap.set(series.name, seriesData);\n\n this.data = [...this.seriesDataMap.values()];\n\n if (series.plotStyle === dh.plot.SeriesPlotStyle.STACKED_BAR) {\n this.layout.barmode = 'stack';\n } else if (series.plotStyle === dh.plot.SeriesPlotStyle.PIE) {\n this.layout.hiddenlabels = ChartUtils.getHiddenLabels(this.settings);\n }\n\n // We only want to force hide the legend if there is only one series that is not a PIE\n // Right now this means that if the user only has one series, they cannot explicitly show the legend until deephaven-core#3254 is implemented\n // TODO: deephaven-core#3254, once done, this can be removed.\n this.layout.showlegend =\n this.data.length > 1 || series.plotStyle === dh.plot.SeriesPlotStyle.PIE\n ? showLegend ?? undefined\n : false;\n\n if (series.oneClick != null) {\n const { oneClick } = series;\n const { columns } = oneClick;\n for (let i = 0; i < columns.length; i += 1) {\n this.filterColumnMap.set(columns[i].name, columns[i]);\n }\n\n this.oneClicks.push(oneClick);\n }\n\n this.updateLayoutFormats();\n }\n\n // We need to debounce adding series so we subscribe to them all in the same tick\n // This should no longer be necessary after IDS-5049 lands\n addPendingSeries = debounce(() => {\n const axes = ChartUtils.getAllAxes(this.figure);\n const { pendingSeries } = this;\n for (let i = 0; i < pendingSeries.length; i += 1) {\n const series = pendingSeries[i];\n const chart = this.figure.charts.find(c => c.series.includes(series));\n this.addSeries(series, axes, chart?.showLegend ?? null);\n\n series.subscribe();\n // We'll get an update with the data after subscribing\n }\n\n this.pendingSeries = [];\n }, FigureChartModel.ADD_SERIES_DEBOUNCE);\n\n subscribe(callback: (event: ChartEvent) => void): void {\n super.subscribe(callback);\n\n if (this.listeners.length === 1) {\n // Need to initialize the series here as we may have missed some series when not subscribed\n this.initAllSeries();\n this.subscribeFigure();\n }\n }\n\n unsubscribe(callback: (event: ChartEvent) => void): void {\n super.unsubscribe(callback);\n\n if (this.listeners.length === 0) {\n this.unsubscribeFigure();\n }\n }\n\n subscribeFigure(): void {\n if (!this.isConnected) {\n log.debug('Ignoring subscribe when figure in disconnected state');\n return;\n }\n\n this.figure.subscribe(\n this.isDownsamplingDisabled\n ? this.dh.plot.DownsampleOptions.DISABLE\n : this.dh.plot.DownsampleOptions.DEFAULT\n );\n }\n\n unsubscribeFigure(): void {\n this.figure.unsubscribe();\n }\n\n startListeningFigure(): void {\n const { dh } = this;\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_UPDATED,\n this.handleFigureUpdated\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_SERIES_ADDED,\n this.handleFigureSeriesAdded\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_DISCONNECT,\n this.handleFigureDisconnected\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_RECONNECT,\n this.handleFigureReconnected\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLESTARTED,\n this.handleDownsampleStart\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLEFINISHED,\n this.handleDownsampleFinish\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLEFAILED,\n this.handleDownsampleFail\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLENEEDED,\n this.handleDownsampleNeeded\n );\n this.figure.addEventListener(\n dh.Client.EVENT_REQUEST_FAILED,\n this.handleRequestFailed\n );\n }\n\n stopListeningFigure(): void {\n const { dh } = this;\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_UPDATED,\n this.handleFigureUpdated\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_SERIES_ADDED,\n this.handleFigureSeriesAdded\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_DISCONNECT,\n this.handleFigureDisconnected\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_RECONNECT,\n this.handleFigureReconnected\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLESTARTED,\n this.handleDownsampleStart\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLEFINISHED,\n this.handleDownsampleFinish\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLEFAILED,\n this.handleDownsampleFail\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLENEEDED,\n this.handleDownsampleNeeded\n );\n this.figure.removeEventListener(\n dh.Client.EVENT_REQUEST_FAILED,\n this.handleRequestFailed\n );\n }\n\n getTimeZone = memoize(\n (columnType: string, formatter: Formatter | undefined) => {\n if (formatter != null) {\n const dataFormatter = formatter.getColumnTypeFormatter(columnType);\n if (dataFormatter != null) {\n return (dataFormatter as DateTimeColumnFormatter).dhTimeZone;\n }\n }\n return undefined;\n }\n );\n\n getValueTranslator = memoize(\n (columnType: string, formatter: Formatter | undefined) => {\n const timeZone = this.getTimeZone(columnType, formatter);\n return (value: unknown) => this.chartUtils.unwrapValue(value, timeZone);\n }\n );\n\n /** Gets the parser for a value with the provided column type */\n getValueParser = memoize(\n (columnType: string, formatter: Formatter | undefined) => {\n const timeZone = this.getTimeZone(columnType, formatter);\n return (value: unknown) =>\n this.chartUtils.wrapValue(value, columnType, timeZone);\n }\n );\n\n /**\n * Gets the range parser for a particular column type\n */\n getRangeParser = memoize(\n (columnType: string, formatter?: Formatter) => (range: Range) => {\n let [rangeStart, rangeEnd]: [unknown, unknown] = range;\n const valueParser = this.getValueParser(columnType, formatter);\n rangeStart = valueParser(rangeStart);\n rangeEnd = valueParser(rangeEnd);\n return [rangeStart, rangeEnd];\n }\n );\n\n /**\n * Gets the parser for parsing the range from an axis within the given chart\n */\n getAxisRangeParser = memoize(\n (chart: Chart, formatter?: Formatter) => (axis: Axis) => {\n const source = ChartUtils.getSourceForAxis(chart, axis);\n if (source != null) {\n return this.getRangeParser(source.columnType, formatter);\n }\n\n return (range: [unknown, unknown]) => range;\n }\n );\n\n handleDownsampleStart(event: ChartEvent): void {\n log.debug('Downsample started', event);\n\n this.fireDownsampleStart(event.detail);\n }\n\n handleDownsampleFinish(event: ChartEvent): void {\n log.debug('Downsample finished', event);\n\n this.fireDownsampleFinish(event.detail);\n }\n\n handleDownsampleFail(event: ChartEvent): void {\n log.error('Downsample failed', event);\n\n this.fireDownsampleFail(event.detail);\n }\n\n handleDownsampleNeeded(event: ChartEvent): void {\n log.info('Downsample needed', event);\n\n this.fireDownsampleNeeded(event.detail);\n }\n\n handleFigureUpdated(event: ChartEvent): void {\n const { detail: figureUpdateEvent } = event;\n const { series: seriesArray } = figureUpdateEvent;\n\n log.debug2('handleFigureUpdated', seriesArray);\n\n for (let i = 0; i < seriesArray.length; i += 1) {\n const series = seriesArray[i];\n\n log.debug2('handleFigureUpdated updating series', series.name);\n\n const { sources } = series;\n for (let j = 0; j < sources.length; j += 1) {\n const source = sources[j];\n const { columnType, type } = source;\n const valueTranslator = this.getValueTranslator(\n columnType,\n this.formatter\n );\n const dataArray = figureUpdateEvent.getArray(\n series,\n type,\n valueTranslator\n );\n this.setDataArrayForSeries(series, type, dataArray);\n }\n\n this.seriesToProcess.delete(series.name);\n if (this.seriesToProcess.size === 0) {\n this.fireLoadFinished();\n }\n\n this.cleanSeries(series);\n }\n\n const { data } = this;\n this.fireUpdate(data);\n }\n\n handleRequestFailed(event: ChartEvent): void {\n log.error('Request failed', event);\n }\n\n /**\n * Resubscribe to the figure, should be done if settings change\n */\n resubscribe(): void {\n if (this.listeners.length > 0) {\n this.unsubscribeFigure();\n this.subscribeFigure();\n }\n }\n\n setFormatter(formatter: Formatter): void {\n super.setFormatter(formatter);\n\n this.updateLayoutFormats();\n\n // Unsubscribe and resubscribe to trigger a data update\n // Data may need to be translated again because of the new formatter\n this.resubscribe();\n }\n\n setDownsamplingDisabled(isDownsamplingDisabled: boolean): void {\n super.setDownsamplingDisabled(isDownsamplingDisabled);\n\n this.resubscribe();\n }\n\n handleFigureDisconnected(event: CustomEvent): void {\n log.debug('Figure disconnected', event);\n\n this.isConnected = false;\n\n if (this.listeners.length > 0) {\n this.unsubscribeFigure();\n }\n\n this.fireDisconnect();\n }\n\n handleFigureReconnected(event: CustomEvent): void {\n log.debug('Figure reconnected', event);\n\n this.isConnected = true;\n\n // It's possible the series have changed completely, as the query could have been changed\n this.initAllSeries();\n\n this.fireReconnect();\n\n if (this.listeners.length > 0) {\n this.subscribeFigure();\n }\n }\n\n handleFigureSeriesAdded(event: { detail: Series }): void {\n const { detail: series } = event;\n log.debug('handleFigureSeriesAdded', series);\n\n this.pendingSeries.push(series);\n this.addPendingSeries();\n }\n\n setDimensions(rect: DOMRect): void {\n super.setDimensions(rect);\n\n this.updateAxisPositions();\n }\n\n setTitle(title: string): void {\n super.setTitle(title);\n\n // Need to recalculate the padding based on how many lines of text the title is\n // Plotly doesn't handle positioning it correctly, and it's an undocumented feature\n const subtitleCount = (title ?? '').match(/<br>/g)?.length ?? 0;\n const margin =\n ChartUtils.DEFAULT_MARGIN.t +\n subtitleCount * ChartUtils.SUBTITLE_LINE_HEIGHT;\n\n if (this.layout.margin) {\n this.layout.margin.t = margin;\n } else {\n this.layout.margin = { t: margin };\n }\n\n if (typeof this.layout.title === 'string') {\n this.layout.title = title;\n } else {\n this.layout.title = { ...this.layout.title };\n this.layout.title.text = title;\n this.layout.title.pad = { ...this.layout.title.pad };\n this.layout.title.pad.t =\n ChartUtils.DEFAULT_TITLE_PADDING.t +\n subtitleCount * ChartUtils.SUBTITLE_LINE_HEIGHT * 0.5;\n }\n }\n\n getPlotWidth(): number {\n if (!this.rect || !this.rect.width) {\n return 0;\n }\n\n return Math.max(\n this.rect.width -\n (this.layout.margin?.l ?? 0) -\n (this.layout.margin?.r ?? 0),\n 0\n );\n }\n\n getPlotHeight(): number {\n if (!this.rect || !this.rect.height) {\n return 0;\n }\n\n return Math.max(\n this.rect.height -\n (this.layout.margin?.t ?? 0) -\n (this.layout.margin?.b ?? 0),\n 0\n );\n }\n\n updateAxisPositions(): void {\n const plotWidth = this.getPlotWidth();\n const plotHeight = this.getPlotHeight();\n this.chartUtils.updateFigureAxes(\n this.layout,\n this.figure,\n this.theme,\n chart => this.getAxisRangeParser(chart, this.formatter),\n plotWidth,\n plotHeight\n );\n }\n\n /**\n * Updates the format patterns used\n */\n updateLayoutFormats(): void {\n if (!this.formatter) {\n return;\n }\n\n const axisFormats = this.chartUtils.getAxisFormats(\n this.figure,\n this.formatter\n );\n axisFormats.forEach((axisFormat, axisLayoutProperty) => {\n log.debug(\n `Assigning ${axisLayoutProperty}`,\n this.layout[axisLayoutProperty],\n axisFormat\n );\n\n const props = this.layout[axisLayoutProperty];\n if (props != null) {\n Object.assign(props, axisFormat);\n } else {\n log.debug(`Ignoring null layout.${axisLayoutProperty}`);\n }\n });\n }\n\n /**\n * Set a specific array for the array of series properties specified.\n * @param series The series to set the data array for.\n * @param sourceType The source type within that series to set the data for.\n * @param dataArray The array to use for the data for this series source.\n */\n setDataArrayForSeries(\n series: Series,\n sourceType: SourceType,\n dataArray: unknown[]\n ): void {\n const { name, plotStyle } = series;\n\n const seriesData = this.seriesDataMap.get(name);\n const property = this.chartUtils.getPlotlyProperty(plotStyle, sourceType);\n\n if (seriesData) {\n set(seriesData, property, dataArray);\n }\n }\n\n /**\n * After setting all the data in the series data, we may need to adjust some other properties\n * Eg. Calculating the width from the xLow/xHigh values; Plot.ly uses `width` instead of a low/high\n * value for x.\n * @param series The series to clean the data for\n */\n cleanSeries(series: Series): void {\n const { dh } = this;\n const { name, plotStyle } = series;\n const seriesData = this.seriesDataMap.get(name);\n if (seriesData == null) {\n return;\n }\n if (plotStyle === dh.plot.SeriesPlotStyle.HISTOGRAM) {\n const { xLow, xHigh } = seriesData;\n if (xLow && xHigh && xLow.length === xHigh.length) {\n const width = [];\n for (let i = 0; i < xLow.length; i += 1) {\n width.push(xHigh[i] - xLow[i]);\n }\n seriesData.width = width;\n }\n } else if (\n plotStyle === dh.plot.SeriesPlotStyle.LINE ||\n plotStyle === dh.plot.SeriesPlotStyle.ERROR_BAR ||\n plotStyle === dh.plot.SeriesPlotStyle.BAR\n ) {\n const { x, xLow, xHigh, y, yLow, yHigh } = seriesData;\n if (xLow && xHigh && xLow !== x) {\n seriesData.error_x = ChartUtils.getPlotlyErrorBars(\n x as number[],\n xLow,\n xHigh,\n this.theme\n );\n }\n if (yLow && yHigh && yLow !== y) {\n seriesData.error_y = ChartUtils.getPlotlyErrorBars(\n y as number[],\n yLow,\n yHigh,\n this.theme\n );\n }\n } else if (plotStyle === dh.plot.SeriesPlotStyle.TREEMAP) {\n const { ids, labels } = seriesData;\n if (ids !== undefined && labels === undefined) {\n // If the user only provided IDs, we assign the IDs to the labels property as well automatically\n // Plotly uses the labels primarily, which from our API perspective seems kind of backwards\n seriesData.labels = ids;\n }\n }\n }\n\n getData(): Partial<Data>[] {\n return this.data;\n }\n\n getLayout(): Partial<Layout> {\n return this.layout;\n }\n\n getFilterColumnMap(): FilterColumnMap {\n return new Map(this.filterColumnMap);\n }\n\n isFilterRequired(): boolean {\n return (\n this.oneClicks.find(oneClick => oneClick.requireAllFiltersToDisplay) !=\n null\n );\n }\n\n /**\n * Sets the filter on the model. Will only set the values that have changed.\n * @param filterMap Map of filter column names to values\n */\n setFilter(filterMap: FilterMap): void {\n if (this.oneClicks.length === 0) {\n log.warn('Trying to set a filter, but no one click!');\n return;\n }\n\n log.debug('setFilter', filterMap);\n\n for (let i = 0; i < this.oneClicks.length; i += 1) {\n const oneClick = this.oneClicks[i];\n const { columns } = oneClick;\n // Need to get all the keys in case a filter was removed\n const keys = new Set([...filterMap.keys(), ...this.lastFilter.keys()]);\n keys.forEach(key => {\n const value = filterMap.get(key);\n if (\n this.lastFilter.get(key) !== value &&\n columns.find(column => column.name === key) != null\n ) {\n oneClick.setValueForColumn(key, value);\n }\n });\n }\n\n this.lastFilter = new Map(filterMap);\n }\n\n setFigure(figure: Figure): void {\n this.close();\n\n this.figure = figure;\n\n this.setTitle(this.getDefaultTitle());\n this.initAllSeries();\n this.updateAxisPositions();\n this.startListeningFigure();\n if (this.listeners.length > 0) {\n this.subscribeFigure();\n }\n }\n\n updateSettings(settings: Partial<ChartModelSettings>): void {\n this.settings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MAAM,GAAG,CAAC,EAAE;MAC7B,IAAI,CAAC4G,eAAe,CAAC,CAAC;IACxB;EACF;EAEA8H,cAAcA,CAAC5O,QAAqC,EAAQ;IAC1D,IAAI,CAACA,QAAQ,GAAGA,QAAQ;EAC1B;AACF;AAACK,eAAA,CA1uBKX,gBAAgB,yBACS,EAAE;AA2uBjC,eAAeA,gBAAgB"}
1
+ {"version":3,"file":"FigureChartModel.js","names":["memoize","debounce","set","Log","ChartModel","ChartUtils","ChartTheme","log","module","FigureChartModel","constructor","dh","figure","_this","settings","arguments","length","undefined","theme","this","_defineProperty","axes","getAllAxes","pendingSeries","_loop","_chart$showLegend","series","i","chart","charts","find","c","includes","addSeries","showLegend","subscribe","ADD_SERIES_DEBOUNCE","columnType","formatter","dataFormatter","getColumnTypeFormatter","dhTimeZone","timeZone","getTimeZone","value","chartUtils","unwrapValue","wrapValue","range","rangeStart","rangeEnd","valueParser","getValueParser","axis","source","getSourceForAxis","getRangeParser","handleFigureUpdated","bind","handleFigureDisconnected","handleFigureReconnected","handleFigureSeriesAdded","handleDownsampleStart","handleDownsampleFinish","handleDownsampleFail","handleDownsampleNeeded","handleRequestFailed","data","template","layout","makeDefaultLayout","grid","rows","columns","cols","pattern","seriesDataMap","Map","oneClicks","filterColumnMap","lastFilter","isConnected","seriesToProcess","Set","setTitle","getDefaultTitle","initAllSeries","updateAxisPositions","startListeningFigure","close","addPendingSeries","cancel","stopListeningFigure","title","clear","activeSeriesNames","j","push","name","allSeriesNames","keys","inactiveSeriesNames","filter","seriesName","indexOf","delete","axisTypeMap","groupArray","seriesData","makeSeriesDataFromSeries","getSeriesVisibility","values","plotStyle","plot","SeriesPlotStyle","STACKED_BAR","barmode","PIE","hiddenlabels","getHiddenLabels","showlegend","oneClick","updateLayoutFormats","callback","listeners","subscribeFigure","unsubscribe","unsubscribeFigure","debug","isDownsamplingDisabled","DownsampleOptions","DISABLE","DEFAULT","addEventListener","Figure","EVENT_UPDATED","EVENT_SERIES_ADDED","EVENT_DISCONNECT","EVENT_RECONNECT","EVENT_DOWNSAMPLESTARTED","EVENT_DOWNSAMPLEFINISHED","EVENT_DOWNSAMPLEFAILED","EVENT_DOWNSAMPLENEEDED","Client","EVENT_REQUEST_FAILED","removeEventListener","event","fireDownsampleStart","detail","fireDownsampleFinish","error","fireDownsampleFail","info","fireDownsampleNeeded","figureUpdateEvent","seriesArray","debug2","sources","type","valueTranslator","getValueTranslator","dataArray","getArray","setDataArrayForSeries","size","fireLoadFinished","cleanSeries","fireUpdate","resubscribe","setFormatter","setDownsamplingDisabled","fireDisconnect","fireReconnect","setDimensions","rect","_match$length","_match","subtitleCount","match","margin","DEFAULT_MARGIN","t","SUBTITLE_LINE_HEIGHT","_objectSpread","text","pad","DEFAULT_TITLE_PADDING","getPlotWidth","_this$layout$margin$l","_this$layout$margin","_this$layout$margin$r","_this$layout$margin2","width","Math","max","l","r","getPlotHeight","_this$layout$margin$t","_this$layout$margin3","_this$layout$margin$b","_this$layout$margin4","height","b","plotWidth","plotHeight","updateFigureAxes","getAxisRangeParser","axisFormats","getAxisFormats","forEach","axisFormat","axisLayoutProperty","concat","props","Object","assign","sourceType","get","property","getPlotlyProperty","HISTOGRAM","xLow","xHigh","LINE","ERROR_BAR","BAR","x","y","yLow","yHigh","error_x","getPlotlyErrorBars","error_y","TREEMAP","ids","labels","getData","getLayout","getFilterColumnMap","isFilterRequired","requireAllFiltersToDisplay","setFilter","filterMap","_this2","warn","_loop2","key","column","setValueForColumn","setFigure","updateSettings"],"sources":["../src/FigureChartModel.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\nimport memoize from 'memoizee';\nimport debounce from 'lodash.debounce';\nimport set from 'lodash.set';\nimport type {\n Axis,\n Chart,\n dh as DhType,\n Figure,\n OneClick,\n Series,\n SourceType,\n} from '@deephaven/jsapi-types';\nimport Log from '@deephaven/log';\nimport { Range } from '@deephaven/utils';\nimport type { Layout, Data, PlotData } from 'plotly.js';\nimport type {\n DateTimeColumnFormatter,\n Formatter,\n} from '@deephaven/jsapi-utils';\nimport ChartModel, { ChartEvent } from './ChartModel';\nimport ChartUtils, {\n AxisTypeMap,\n ChartModelSettings,\n FilterColumnMap,\n FilterMap,\n} from './ChartUtils';\nimport ChartTheme from './ChartTheme';\n\nconst log = Log.module('FigureChartModel');\n\n/**\n * Takes a Figure object from a widget to make a model for a chart\n */\nclass FigureChartModel extends ChartModel {\n static ADD_SERIES_DEBOUNCE = 50;\n\n /**\n * @param dh JSAPI instance\n * @param figure The figure object created by the API\n * @param settings Chart settings\n */\n constructor(\n dh: DhType,\n figure: Figure,\n settings: Partial<ChartModelSettings> = {},\n theme: typeof ChartTheme = ChartTheme\n ) {\n super(dh);\n\n this.handleFigureUpdated = this.handleFigureUpdated.bind(this);\n this.handleFigureDisconnected = this.handleFigureDisconnected.bind(this);\n this.handleFigureReconnected = this.handleFigureReconnected.bind(this);\n this.handleFigureSeriesAdded = this.handleFigureSeriesAdded.bind(this);\n this.handleDownsampleStart = this.handleDownsampleStart.bind(this);\n this.handleDownsampleFinish = this.handleDownsampleFinish.bind(this);\n this.handleDownsampleFail = this.handleDownsampleFail.bind(this);\n this.handleDownsampleNeeded = this.handleDownsampleNeeded.bind(this);\n this.handleRequestFailed = this.handleRequestFailed.bind(this);\n\n this.dh = dh;\n this.chartUtils = new ChartUtils(dh);\n this.figure = figure;\n this.settings = settings;\n this.theme = theme;\n this.data = [];\n const template = {\n data: {},\n layout: this.chartUtils.makeDefaultLayout(theme),\n };\n this.layout = {\n grid: {\n rows: figure.rows,\n columns: figure.cols,\n pattern: 'independent',\n },\n template,\n };\n this.seriesDataMap = new Map();\n this.pendingSeries = [];\n this.oneClicks = [];\n this.filterColumnMap = new Map();\n this.lastFilter = new Map();\n this.isConnected = true; // Assume figure is connected to start\n this.seriesToProcess = new Set();\n\n this.setTitle(this.getDefaultTitle());\n this.initAllSeries();\n this.updateAxisPositions();\n this.startListeningFigure();\n }\n\n chartUtils: ChartUtils;\n\n dh: DhType;\n\n figure: Figure;\n\n settings: Partial<ChartModelSettings>;\n\n theme: typeof ChartTheme;\n\n data: Partial<Data>[];\n\n layout: Partial<Layout>;\n\n seriesDataMap: Map<\n string,\n Partial<PlotData> & {\n xLow?: number[];\n xHigh?: number[];\n yLow?: number[];\n yHigh?: number[];\n }\n >;\n\n pendingSeries: Series[];\n\n oneClicks: OneClick[];\n\n filterColumnMap: FilterColumnMap;\n\n lastFilter: FilterMap;\n\n isConnected: boolean; // Assume figure is connected to start\n\n seriesToProcess;\n\n close(): void {\n this.figure.close();\n this.addPendingSeries.cancel();\n this.stopListeningFigure();\n }\n\n getDefaultTitle(): string {\n if (this.figure.charts.length > 0) {\n const chart = this.figure.charts[0];\n return chart.title;\n }\n\n return '';\n }\n\n initAllSeries(): void {\n this.oneClicks = [];\n this.filterColumnMap.clear();\n\n const { charts } = this.figure;\n const axes = ChartUtils.getAllAxes(this.figure);\n const activeSeriesNames: string[] = [];\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 activeSeriesNames.push(series.name);\n this.addSeries(series, axes, chart.showLegend);\n }\n }\n\n // Remove any series that no longer exist\n const allSeriesNames = [...this.seriesDataMap.keys()];\n const inactiveSeriesNames = allSeriesNames.filter(\n seriesName => activeSeriesNames.indexOf(seriesName) < 0\n );\n for (let i = 0; i < inactiveSeriesNames.length; i += 1) {\n const seriesName = inactiveSeriesNames[i];\n this.seriesDataMap.delete(seriesName);\n }\n this.seriesToProcess = new Set([...this.seriesDataMap.keys()]);\n }\n\n /**\n * Add a series to the model\n * @param series Series object to add\n * @param axes All the axis in this figure\n * @param showLegend Whether this series should show the legend or not\n */\n addSeries(series: Series, axes: Axis[], showLegend: boolean | null): void {\n const { dh } = this;\n const axisTypeMap: AxisTypeMap = ChartUtils.groupArray(axes, 'type');\n\n const seriesData = this.chartUtils.makeSeriesDataFromSeries(\n series,\n axisTypeMap,\n ChartUtils.getSeriesVisibility(series.name, this.settings),\n showLegend,\n this.theme\n );\n\n this.seriesDataMap.set(series.name, seriesData);\n\n this.data = [...this.seriesDataMap.values()];\n\n if (series.plotStyle === dh.plot.SeriesPlotStyle.STACKED_BAR) {\n this.layout.barmode = 'stack';\n } else if (series.plotStyle === dh.plot.SeriesPlotStyle.PIE) {\n this.layout.hiddenlabels = ChartUtils.getHiddenLabels(this.settings);\n }\n\n // We only want to force hide the legend if there is only one series that is not a PIE\n // Right now this means that if the user only has one series, they cannot explicitly show the legend until deephaven-core#3254 is implemented\n // TODO: deephaven-core#3254, once done, this can be removed.\n this.layout.showlegend =\n this.data.length > 1 || series.plotStyle === dh.plot.SeriesPlotStyle.PIE\n ? showLegend ?? undefined\n : false;\n\n if (series.oneClick != null) {\n const { oneClick } = series;\n const { columns } = oneClick;\n for (let i = 0; i < columns.length; i += 1) {\n this.filterColumnMap.set(columns[i].name, columns[i]);\n }\n\n this.oneClicks.push(oneClick);\n }\n\n this.updateLayoutFormats();\n }\n\n // We need to debounce adding series so we subscribe to them all in the same tick\n // This should no longer be necessary after IDS-5049 lands\n addPendingSeries = debounce(() => {\n const axes = ChartUtils.getAllAxes(this.figure);\n const { pendingSeries } = this;\n for (let i = 0; i < pendingSeries.length; i += 1) {\n const series = pendingSeries[i];\n const chart = this.figure.charts.find(c => c.series.includes(series));\n this.addSeries(series, axes, chart?.showLegend ?? null);\n\n series.subscribe();\n // We'll get an update with the data after subscribing\n }\n\n this.pendingSeries = [];\n }, FigureChartModel.ADD_SERIES_DEBOUNCE);\n\n subscribe(callback: (event: ChartEvent) => void): void {\n super.subscribe(callback);\n\n if (this.listeners.length === 1) {\n // Need to initialize the series here as we may have missed some series when not subscribed\n this.initAllSeries();\n this.subscribeFigure();\n }\n }\n\n unsubscribe(callback: (event: ChartEvent) => void): void {\n super.unsubscribe(callback);\n\n if (this.listeners.length === 0) {\n this.unsubscribeFigure();\n }\n }\n\n subscribeFigure(): void {\n if (!this.isConnected) {\n log.debug('Ignoring subscribe when figure in disconnected state');\n return;\n }\n\n this.figure.subscribe(\n this.isDownsamplingDisabled\n ? this.dh.plot.DownsampleOptions.DISABLE\n : this.dh.plot.DownsampleOptions.DEFAULT\n );\n }\n\n unsubscribeFigure(): void {\n this.figure.unsubscribe();\n }\n\n startListeningFigure(): void {\n const { dh } = this;\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_UPDATED,\n this.handleFigureUpdated\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_SERIES_ADDED,\n this.handleFigureSeriesAdded\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_DISCONNECT,\n this.handleFigureDisconnected\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_RECONNECT,\n this.handleFigureReconnected\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLESTARTED,\n this.handleDownsampleStart\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLEFINISHED,\n this.handleDownsampleFinish\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLEFAILED,\n this.handleDownsampleFail\n );\n this.figure.addEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLENEEDED,\n this.handleDownsampleNeeded\n );\n this.figure.addEventListener(\n dh.Client.EVENT_REQUEST_FAILED,\n this.handleRequestFailed\n );\n }\n\n stopListeningFigure(): void {\n const { dh } = this;\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_UPDATED,\n this.handleFigureUpdated\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_SERIES_ADDED,\n this.handleFigureSeriesAdded\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_DISCONNECT,\n this.handleFigureDisconnected\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_RECONNECT,\n this.handleFigureReconnected\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLESTARTED,\n this.handleDownsampleStart\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLEFINISHED,\n this.handleDownsampleFinish\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLEFAILED,\n this.handleDownsampleFail\n );\n this.figure.removeEventListener(\n dh.plot.Figure.EVENT_DOWNSAMPLENEEDED,\n this.handleDownsampleNeeded\n );\n this.figure.removeEventListener(\n dh.Client.EVENT_REQUEST_FAILED,\n this.handleRequestFailed\n );\n }\n\n getTimeZone = memoize(\n (columnType: string, formatter: Formatter | undefined) => {\n if (formatter != null) {\n const dataFormatter = formatter.getColumnTypeFormatter(columnType);\n if (dataFormatter != null) {\n return (dataFormatter as DateTimeColumnFormatter).dhTimeZone;\n }\n }\n return undefined;\n }\n );\n\n getValueTranslator = memoize(\n (columnType: string, formatter: Formatter | undefined) => {\n const timeZone = this.getTimeZone(columnType, formatter);\n return (value: unknown) => this.chartUtils.unwrapValue(value, timeZone);\n }\n );\n\n /** Gets the parser for a value with the provided column type */\n getValueParser = memoize(\n (columnType: string, formatter: Formatter | undefined) => {\n const timeZone = this.getTimeZone(columnType, formatter);\n return (value: unknown) =>\n this.chartUtils.wrapValue(value, columnType, timeZone);\n }\n );\n\n /**\n * Gets the range parser for a particular column type\n */\n getRangeParser = memoize(\n (columnType: string, formatter?: Formatter) => (range: Range) => {\n let [rangeStart, rangeEnd]: [unknown, unknown] = range;\n const valueParser = this.getValueParser(columnType, formatter);\n rangeStart = valueParser(rangeStart);\n rangeEnd = valueParser(rangeEnd);\n return [rangeStart, rangeEnd];\n }\n );\n\n /**\n * Gets the parser for parsing the range from an axis within the given chart\n */\n getAxisRangeParser = memoize(\n (chart: Chart, formatter?: Formatter) => (axis: Axis) => {\n const source = ChartUtils.getSourceForAxis(chart, axis);\n if (source != null) {\n return this.getRangeParser(source.columnType, formatter);\n }\n\n return (range: [unknown, unknown]) => range;\n }\n );\n\n handleDownsampleStart(event: ChartEvent): void {\n log.debug('Downsample started', event);\n\n this.fireDownsampleStart(event.detail);\n }\n\n handleDownsampleFinish(event: ChartEvent): void {\n log.debug('Downsample finished', event);\n\n this.fireDownsampleFinish(event.detail);\n }\n\n handleDownsampleFail(event: ChartEvent): void {\n log.error('Downsample failed', event);\n\n this.fireDownsampleFail(event.detail);\n }\n\n handleDownsampleNeeded(event: ChartEvent): void {\n log.info('Downsample needed', event);\n\n this.fireDownsampleNeeded(event.detail);\n }\n\n handleFigureUpdated(event: ChartEvent): void {\n const { detail: figureUpdateEvent } = event;\n const { series: seriesArray } = figureUpdateEvent;\n\n log.debug2('handleFigureUpdated', seriesArray);\n\n for (let i = 0; i < seriesArray.length; i += 1) {\n const series = seriesArray[i];\n\n log.debug2('handleFigureUpdated updating series', series.name);\n\n const { sources } = series;\n for (let j = 0; j < sources.length; j += 1) {\n const source = sources[j];\n const { columnType, type } = source;\n const valueTranslator = this.getValueTranslator(\n columnType,\n this.formatter\n );\n const dataArray = figureUpdateEvent.getArray(\n series,\n type,\n valueTranslator\n );\n this.setDataArrayForSeries(series, type, dataArray);\n }\n\n this.seriesToProcess.delete(series.name);\n if (this.seriesToProcess.size === 0) {\n this.fireLoadFinished();\n }\n\n this.cleanSeries(series);\n }\n\n const { data } = this;\n this.fireUpdate(data);\n }\n\n handleRequestFailed(event: ChartEvent): void {\n log.error('Request failed', event);\n }\n\n /**\n * Resubscribe to the figure, should be done if settings change\n */\n resubscribe(): void {\n if (this.listeners.length > 0) {\n this.unsubscribeFigure();\n this.subscribeFigure();\n }\n }\n\n setFormatter(formatter: Formatter): void {\n super.setFormatter(formatter);\n\n this.updateLayoutFormats();\n\n // Unsubscribe and resubscribe to trigger a data update\n // Data may need to be translated again because of the new formatter\n this.resubscribe();\n }\n\n setDownsamplingDisabled(isDownsamplingDisabled: boolean): void {\n super.setDownsamplingDisabled(isDownsamplingDisabled);\n\n this.resubscribe();\n }\n\n handleFigureDisconnected(event: CustomEvent): void {\n log.debug('Figure disconnected', event);\n\n this.isConnected = false;\n\n if (this.listeners.length > 0) {\n this.unsubscribeFigure();\n }\n\n this.fireDisconnect();\n }\n\n handleFigureReconnected(event: CustomEvent): void {\n log.debug('Figure reconnected', event);\n\n this.isConnected = true;\n\n // It's possible the series have changed completely, as the query could have been changed\n this.initAllSeries();\n\n this.fireReconnect();\n\n if (this.listeners.length > 0) {\n this.subscribeFigure();\n }\n }\n\n handleFigureSeriesAdded(event: { detail: Series }): void {\n const { detail: series } = event;\n log.debug('handleFigureSeriesAdded', series);\n\n this.pendingSeries.push(series);\n this.addPendingSeries();\n }\n\n setDimensions(rect: DOMRect): void {\n super.setDimensions(rect);\n\n this.updateAxisPositions();\n }\n\n setTitle(title: string): void {\n super.setTitle(title);\n\n // Need to recalculate the padding based on how many lines of text the title is\n // Plotly doesn't handle positioning it correctly, and it's an undocumented feature\n const subtitleCount = (title ?? '').match(/<br>/g)?.length ?? 0;\n const margin =\n ChartUtils.DEFAULT_MARGIN.t +\n subtitleCount * ChartUtils.SUBTITLE_LINE_HEIGHT;\n\n if (this.layout.margin) {\n this.layout.margin.t = margin;\n } else {\n this.layout.margin = { t: margin };\n }\n\n if (typeof this.layout.title === 'string') {\n this.layout.title = title;\n } else {\n this.layout.title = { ...this.layout.title };\n this.layout.title.text = title;\n this.layout.title.pad = { ...this.layout.title.pad };\n this.layout.title.pad.t =\n ChartUtils.DEFAULT_TITLE_PADDING.t +\n subtitleCount * ChartUtils.SUBTITLE_LINE_HEIGHT * 0.5;\n }\n }\n\n getPlotWidth(): number {\n if (!this.rect || !this.rect.width) {\n return 0;\n }\n\n return Math.max(\n this.rect.width -\n (this.layout.margin?.l ?? 0) -\n (this.layout.margin?.r ?? 0),\n 0\n );\n }\n\n getPlotHeight(): number {\n if (!this.rect || !this.rect.height) {\n return 0;\n }\n\n return Math.max(\n this.rect.height -\n (this.layout.margin?.t ?? 0) -\n (this.layout.margin?.b ?? 0),\n 0\n );\n }\n\n updateAxisPositions(): void {\n const plotWidth = this.getPlotWidth();\n const plotHeight = this.getPlotHeight();\n this.chartUtils.updateFigureAxes(\n this.layout,\n this.figure,\n chart => this.getAxisRangeParser(chart, this.formatter),\n plotWidth,\n plotHeight,\n this.theme\n );\n }\n\n /**\n * Updates the format patterns used\n */\n updateLayoutFormats(): void {\n if (!this.formatter) {\n return;\n }\n\n const axisFormats = this.chartUtils.getAxisFormats(\n this.figure,\n this.formatter\n );\n axisFormats.forEach((axisFormat, axisLayoutProperty) => {\n log.debug(\n `Assigning ${axisLayoutProperty}`,\n this.layout[axisLayoutProperty],\n axisFormat\n );\n\n const props = this.layout[axisLayoutProperty];\n if (props != null) {\n Object.assign(props, axisFormat);\n } else {\n log.debug(`Ignoring null layout.${axisLayoutProperty}`);\n }\n });\n }\n\n /**\n * Set a specific array for the array of series properties specified.\n * @param series The series to set the data array for.\n * @param sourceType The source type within that series to set the data for.\n * @param dataArray The array to use for the data for this series source.\n */\n setDataArrayForSeries(\n series: Series,\n sourceType: SourceType,\n dataArray: unknown[]\n ): void {\n const { name, plotStyle } = series;\n\n const seriesData = this.seriesDataMap.get(name);\n const property = this.chartUtils.getPlotlyProperty(plotStyle, sourceType);\n\n if (seriesData) {\n set(seriesData, property, dataArray);\n }\n }\n\n /**\n * After setting all the data in the series data, we may need to adjust some other properties\n * Eg. Calculating the width from the xLow/xHigh values; Plot.ly uses `width` instead of a low/high\n * value for x.\n * @param series The series to clean the data for\n */\n cleanSeries(series: Series): void {\n const { dh } = this;\n const { name, plotStyle } = series;\n const seriesData = this.seriesDataMap.get(name);\n if (seriesData == null) {\n return;\n }\n if (plotStyle === dh.plot.SeriesPlotStyle.HISTOGRAM) {\n const { xLow, xHigh } = seriesData;\n if (xLow && xHigh && xLow.length === xHigh.length) {\n const width = [];\n for (let i = 0; i < xLow.length; i += 1) {\n width.push(xHigh[i] - xLow[i]);\n }\n seriesData.width = width;\n }\n } else if (\n plotStyle === dh.plot.SeriesPlotStyle.LINE ||\n plotStyle === dh.plot.SeriesPlotStyle.ERROR_BAR ||\n plotStyle === dh.plot.SeriesPlotStyle.BAR\n ) {\n const { x, xLow, xHigh, y, yLow, yHigh } = seriesData;\n if (xLow && xHigh && xLow !== x) {\n seriesData.error_x = ChartUtils.getPlotlyErrorBars(\n x as number[],\n xLow,\n xHigh\n );\n }\n if (yLow && yHigh && yLow !== y) {\n seriesData.error_y = ChartUtils.getPlotlyErrorBars(\n y as number[],\n yLow,\n yHigh\n );\n }\n } else if (plotStyle === dh.plot.SeriesPlotStyle.TREEMAP) {\n const { ids, labels } = seriesData;\n if (ids !== undefined && labels === undefined) {\n // If the user only provided IDs, we assign the IDs to the labels property as well automatically\n // Plotly uses the labels primarily, which from our API perspective seems kind of backwards\n seriesData.labels = ids;\n }\n }\n }\n\n getData(): Partial<Data>[] {\n return this.data;\n }\n\n getLayout(): Partial<Layout> {\n return this.layout;\n }\n\n getFilterColumnMap(): FilterColumnMap {\n return new Map(this.filterColumnMap);\n }\n\n isFilterRequired(): boolean {\n return (\n this.oneClicks.find(oneClick => oneClick.requireAllFiltersToDisplay) !=\n null\n );\n }\n\n /**\n * Sets the filter on the model. Will only set the values that have changed.\n * @param filterMap Map of filter column names to values\n */\n setFilter(filterMap: FilterMap): void {\n if (this.oneClicks.length === 0) {\n log.warn('Trying to set a filter, but no one click!');\n return;\n }\n\n log.debug('setFilter', filterMap);\n\n for (let i = 0; i < this.oneClicks.length; i += 1) {\n const oneClick = this.oneClicks[i];\n const { columns } = oneClick;\n // Need to get all the keys in case a filter was removed\n const keys = new Set([...filterMap.keys(), ...this.lastFilter.keys()]);\n keys.forEach(key => {\n const value = filterMap.get(key);\n if (\n this.lastFilter.get(key) !== value &&\n columns.find(column => column.name === key) != null\n ) {\n oneClick.setValueForColumn(key, value);\n }\n });\n }\n\n this.lastFilter = new Map(filterMap);\n }\n\n setFigure(figure: Figure): void {\n this.close();\n\n this.figure = figure;\n\n this.setTitle(this.getDefaultTitle());\n this.initAllSeries();\n this.updateAxisPositions();\n this.startListeningFigure();\n if (this.listeners.length > 0) {\n this.subscribeFigure();\n }\n }\n\n updateSettings(settings: Partial<ChartModelSettings>): void {\n this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BAAoB,CAAC,CAAC;IAC3B,IAAI,IAAI,CAACoC,SAAS,CAAC5G,MAAM,GAAG,CAAC,EAAE;MAC7B,IAAI,CAAC6G,eAAe,CAAC,CAAC;IACxB;EACF;EAEA8H,cAAcA,CAAC7O,QAAqC,EAAQ;IAC1D,IAAI,CAACA,QAAQ,GAAGA,QAAQ;EAC1B;AACF;AAACM,eAAA,CAvuBKX,gBAAgB,yBACS,EAAE;AAwuBjC,eAAeA,gBAAgB"}
@@ -1,7 +1,6 @@
1
1
  import type { dh as DhType } from '@deephaven/jsapi-types';
2
2
  import type { Layout, PlotData } from 'plotly.js';
3
3
  import ChartModel from './ChartModel';
4
- import { ChartTheme } from './ChartTheme';
5
4
  interface Series {
6
5
  x: PlotData['x'];
7
6
  y: PlotData['y'];
@@ -11,8 +10,6 @@ interface Series {
11
10
  /** Displays a basic random chart */
12
11
  declare class MockChartModel extends ChartModel {
13
12
  static smoothing: number;
14
- static _theme: ChartTheme;
15
- static get theme(): ChartTheme;
16
13
  static makeRandomSeries(offset: number, scale?: number, steps?: number): Series;
17
14
  static makeScatter(series: Series): Partial<PlotData>;
18
15
  static makeArea(series: Series): Partial<PlotData>;
@@ -1 +1 @@
1
- {"version":3,"file":"MockChartModel.d.ts","sourceRoot":"","sources":["../src/MockChartModel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAS,MAAM,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,UAAU,EAAqB,MAAM,cAAc,CAAC;AAG7D,UAAU,MAAM;IACd,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;C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,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;gBAgBnD,EAAE,EAAE,MAAM,EACV,EACE,IAAsC,EACtC,MAA6C,EAC7C,YAAiB,GAClB;;;;KAAK;IASR,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;IAE1B,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IAExB,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,EAAE;IAI9B,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAI5B,kBAAkB,IAAI,GAAG,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAYjE,gBAAgB,IAAI,OAAO;IAI3B,SAAS,IAAI,IAAI;CAGlB;AAED,eAAe,cAAc,CAAC"}
@@ -4,19 +4,10 @@ function _toPrimitive(input, hint) { if (typeof input !== "object" || input ===
4
4
  /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
5
5
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
6
6
  import ChartModel from "./ChartModel.js";
7
- import { defaultChartTheme } from "./ChartTheme.js";
7
+ import ChartTheme from "./ChartTheme.js";
8
8
  import ChartUtils from "./ChartUtils.js";
9
9
  /** Displays a basic random chart */
10
10
  class MockChartModel extends ChartModel {
11
- static get theme() {
12
- /* eslint-disable no-underscore-dangle */
13
- if (MockChartModel._theme == null) {
14
- MockChartModel._theme = defaultChartTheme();
15
- }
16
- return MockChartModel._theme;
17
- /* eslint-enable no-underscore-dangle */
18
- }
19
-
20
11
  static makeRandomSeries(offset) {
21
12
  var scale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
22
13
  var steps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;
@@ -50,7 +41,7 @@ class MockChartModel extends ChartModel {
50
41
  name: 'SCTR',
51
42
  x: series.x,
52
43
  y: series.y,
53
- type: 'scatter',
44
+ type: 'scattergl',
54
45
  mode: 'markers',
55
46
  hoverinfo: 'skip',
56
47
  marker: {
@@ -68,7 +59,7 @@ class MockChartModel extends ChartModel {
68
59
  fill: 'tozeroy',
69
60
  hoverinfo: 'all',
70
61
  line: {
71
- color: MockChartModel.theme.area_color,
62
+ color: ChartTheme.area_color,
72
63
  width: 3
73
64
  // area patten gets applied as hack in post render plot.ly callback + css
74
65
  }
@@ -81,14 +72,14 @@ class MockChartModel extends ChartModel {
81
72
  name: 'Trendline <br>R<sup>2</sup> = 0.91',
82
73
  x: series.x,
83
74
  y: series.l,
84
- type: 'scatter',
75
+ type: 'scattergl',
85
76
  mode: 'line',
86
77
  hoverinfo: 'skip',
87
78
  line: {
88
79
  width: 3,
89
80
  dash: 'dot',
90
81
  // trendlines should follow some sort of color convention + dots/dashed. Remember there can multiple
91
- color: MockChartModel.theme.trend_color
82
+ color: ChartTheme.trend_color
92
83
  // chroma(c.$green).brighten(1.2).hex()
93
84
  }
94
85
  };
@@ -111,15 +102,15 @@ class MockChartModel extends ChartModel {
111
102
  x: series.x.concat(series.x.slice().reverse()),
112
103
  // winding for x values, that slice just clones so reverse doesn't apply inplace
113
104
  y: errory,
114
- type: 'scatter',
105
+ type: 'scattergl',
115
106
  mode: 'line',
116
107
  hoverinfo: 'skip',
117
108
  fill: 'toself',
118
109
  // there's some ordering bug with scattergl where if the areas traces are ordered after the lines they don't render
119
- fillcolor: MockChartModel.theme.error_band_fill_color,
110
+ fillcolor: ChartTheme.error_band_fill_color,
120
111
  line: {
121
112
  width: 0,
122
- color: MockChartModel.theme.error_band_line_color,
113
+ color: ChartTheme.error_band_line_color,
123
114
  shape: 'spline'
124
115
  }
125
116
  };
@@ -129,11 +120,11 @@ class MockChartModel extends ChartModel {
129
120
  name: 'LINE',
130
121
  x: series.x,
131
122
  y: series.y,
132
- type: 'scatter',
123
+ type: 'scattergl',
133
124
  mode: 'line',
134
125
  hoverinfo: 'x+y+text+name',
135
126
  line: {
136
- color: MockChartModel.theme.line_color,
127
+ color: ChartTheme.line_color,
137
128
  width: 3
138
129
  }
139
130
  };
@@ -148,7 +139,7 @@ class MockChartModel extends ChartModel {
148
139
  return [areaPattern, trendLine, line, errorBand];
149
140
  }
150
141
  static makeDefaultLayout(dh) {
151
- var layout = new ChartUtils(dh).makeDefaultLayout(MockChartModel.theme);
142
+ var layout = new ChartUtils(dh).makeDefaultLayout(ChartTheme);
152
143
  layout.title = 'Chart';
153
144
  if (layout.xaxis) {
154
145
  layout.xaxis.title = 'Datestamp';
@@ -198,6 +189,5 @@ class MockChartModel extends ChartModel {
198
189
  }
199
190
  }
200
191
  _defineProperty(MockChartModel, "smoothing", 1.5);
201
- _defineProperty(MockChartModel, "_theme", void 0);
202
192
  export default MockChartModel;
203
193
  //# sourceMappingURL=MockChartModel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MockChartModel.js","names":["ChartModel","defaultChartTheme","ChartUtils","MockChartModel","theme","_theme","makeRandomSeries","offset","scale","arguments","length","undefined","steps","dates","values","smooth","linear","startDate","Date","i","date","getFullYear","getMonth","getDate","push","concat","v","Math","sin","cos","random","smoothing","round","x","y","s","l","makeScatter","series","name","type","mode","hoverinfo","marker","size","makeArea","fill","line","color","area_color","width","makeTrendline","dash","trend_color","makeErrorBand","erroryforward","errorybackward","value","errory","reverse","slice","fillcolor","error_band_fill_color","error_band_line_color","shape","makeLine","line_color","makeRandomData","series1","areaPattern","trendLine","series2","errorBand","makeDefaultLayout","dh","layout","title","xaxis","yaxis","constructor","data","filterFields","_defineProperty","getData","getLayout","getFilterColumnMap","map","Map","set","isFilterRequired","setFilter","fireUpdate"],"sources":["../src/MockChartModel.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport type { Datum, Layout, PlotData } from 'plotly.js';\nimport ChartModel from './ChartModel';\nimport { ChartTheme, defaultChartTheme } from './ChartTheme';\nimport ChartUtils from './ChartUtils';\n\ninterface Series {\n x: PlotData['x'];\n y: PlotData['y'];\n s: number[];\n l: number[];\n}\n\n/** Displays a basic random chart */\nclass MockChartModel extends ChartModel {\n static smoothing = 1.5;\n\n static _theme: ChartTheme;\n\n static get theme(): ChartTheme {\n /* eslint-disable no-underscore-dangle */\n if (MockChartModel._theme == null) {\n MockChartModel._theme = defaultChartTheme();\n }\n\n return MockChartModel._theme;\n /* eslint-enable no-underscore-dangle */\n }\n\n static makeRandomSeries(offset: number, scale = 1, steps = 100): Series {\n const dates = [];\n const values = [];\n const smooth = [];\n const linear = [];\n const startDate = new Date();\n\n for (let i = 0; i < steps; i += 1) {\n const date = new Date(\n startDate.getFullYear(),\n startDate.getMonth(),\n startDate.getDate() + i - steps\n );\n dates.push(\n `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`\n );\n let v =\n ((Math.sin((i / steps) * offset) * steps) / 3 +\n (Math.cos(i * 0.2) * steps) / 6 +\n (Math.sin(i * 0.5) * steps) / 10 +\n (Math.random() * steps) / 5 +\n i * MockChartModel.smoothing) *\n scale;\n v = Math.round(v * 100) / 100; // 2 decimals only\n // using steps acts as amplititude scaling based on value\n // large sine wave for course shape + small sine waves for bumpiness +\n // general randomness noise + index to be constantly up and to the right + smoothing factor\n values.push(v);\n linear.push(40 + i * MockChartModel.smoothing);\n smooth.push(\n (Math.sin((i / steps) * offset) * steps) / 3 +\n (Math.random() * steps) / 10 +\n i * MockChartModel.smoothing\n ); // push a smoother version of the same thing\n }\n\n return { x: dates, y: values, s: smooth, l: linear };\n }\n\n static makeScatter(series: Series): Partial<PlotData> {\n return {\n name: 'SCTR',\n x: series.x,\n y: series.y,\n type: 'scatter',\n mode: 'markers',\n hoverinfo: 'skip',\n marker: {\n size: 5,\n },\n };\n }\n\n static makeArea(series: Series): Partial<PlotData> {\n return {\n name: 'AREA',\n x: series.x,\n y: series.s,\n type: 'scatter',\n mode: 'line' as PlotData['mode'],\n fill: 'tozeroy',\n hoverinfo: 'all',\n line: {\n color: MockChartModel.theme.area_color,\n width: 3,\n // area patten gets applied as hack in post render plot.ly callback + css\n },\n };\n }\n\n static makeTrendline(series: Series): Partial<PlotData> {\n return {\n // we probably want to toss the line formula in legend I guess? either that or render it as text manually on plot\n name: 'Trendline <br>R<sup>2</sup> = 0.91',\n x: series.x,\n y: series.l,\n type: 'scatter',\n mode: 'line' as PlotData['mode'],\n hoverinfo: 'skip',\n line: {\n width: 3,\n dash: 'dot', // trendlines should follow some sort of color convention + dots/dashed. Remember there can multiple\n color: MockChartModel.theme.trend_color,\n // chroma(c.$green).brighten(1.2).hex()\n },\n };\n }\n\n static makeErrorBand(series: Series): Partial<PlotData> {\n // generate continouous error bands values and text\n const erroryforward = [];\n const errorybackward = [];\n for (let i = 0; i < series.y.length; i += 1) {\n const value = series.y[i] as number;\n erroryforward[i] = Math.round((value + 18) * 100) / 100;\n errorybackward[i] = Math.round((value - 18) * 100) / 100;\n }\n\n // makes a closed shape of points winding clockwise for y values\n const errory = erroryforward.concat(errorybackward.reverse());\n\n return {\n name: 'error',\n x: (series.x as Datum[]).concat((series.x as Datum[]).slice().reverse()), // winding for x values, that slice just clones so reverse doesn't apply inplace\n y: errory,\n type: 'scatter',\n mode: 'line' as PlotData['mode'],\n hoverinfo: 'skip',\n fill: 'toself', // there's some ordering bug with scattergl where if the areas traces are ordered after the lines they don't render\n fillcolor: MockChartModel.theme.error_band_fill_color,\n line: {\n width: 0,\n color: MockChartModel.theme.error_band_line_color,\n shape: 'spline',\n },\n };\n }\n\n static makeLine(series: Series): Partial<PlotData> {\n return {\n name: 'LINE',\n x: series.x,\n y: series.y,\n type: 'scatter',\n mode: 'line' as PlotData['mode'],\n hoverinfo: 'x+y+text+name' as PlotData['hoverinfo'],\n line: {\n color: MockChartModel.theme.line_color,\n width: 3,\n },\n };\n }\n\n static makeRandomData(): Partial<PlotData>[] {\n const series1 = MockChartModel.makeRandomSeries(6);\n const areaPattern = MockChartModel.makeArea(series1);\n const trendLine = MockChartModel.makeTrendline(series1);\n\n const series2 = MockChartModel.makeRandomSeries(2);\n const line = MockChartModel.makeLine(series2);\n const errorBand = MockChartModel.makeErrorBand(series2);\n\n return [areaPattern, trendLine, line, errorBand];\n }\n\n static makeDefaultLayout(dh: DhType): Partial<Layout> {\n const layout = new ChartUtils(dh).makeDefaultLayout(MockChartModel.theme);\n layout.title = 'Chart';\n\n if (layout.xaxis) {\n layout.xaxis.title = 'Datestamp';\n }\n\n if (layout.yaxis) {\n layout.yaxis.title = 'Price';\n }\n\n return layout;\n }\n\n constructor(\n dh: DhType,\n {\n data = MockChartModel.makeRandomData(),\n layout = MockChartModel.makeDefaultLayout(dh),\n filterFields = [],\n } = {}\n ) {\n super(dh);\n\n this.data = data;\n this.layout = layout;\n this.filterFields = filterFields;\n }\n\n data: Partial<PlotData>[];\n\n filterFields: string[];\n\n layout: Partial<Layout>;\n\n getData(): Partial<PlotData>[] {\n return this.data;\n }\n\n getLayout(): Partial<Layout> {\n return this.layout;\n }\n\n getFilterColumnMap(): Map<string, { name: string; type: string }> {\n const map = new Map();\n\n for (let i = 0; i < this.filterFields.length; i += 1) {\n const name = this.filterFields[i];\n const type = 'java.lang.String';\n map.set(name, { name, type });\n }\n\n return map;\n }\n\n isFilterRequired(): boolean {\n return this.filterFields.length > 0;\n }\n\n setFilter(): void {\n this.fireUpdate(this.data);\n }\n}\n\nexport default MockChartModel;\n"],"mappings":";;;AAAA;AACA;AAAA,OAIOA,UAAU;AAAA,SACIC,iBAAiB;AAAA,OAC/BC,UAAU;AASjB;AACA,MAAMC,cAAc,SAASH,UAAU,CAAC;EAKtC,WAAWI,KAAKA,CAAA,EAAe;IAC7B;IACA,IAAID,cAAc,CAACE,MAAM,IAAI,IAAI,EAAE;MACjCF,cAAc,CAACE,MAAM,GAAGJ,iBAAiB,CAAC,CAAC;IAC7C;IAEA,OAAOE,cAAc,CAACE,MAAM;IAC5B;EACF;;EAE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,CAAC,EAAE;MACpD,IAAMoB,IAAI,GAAG,IAAI,CAAC0C,YAAY,CAAC9D,CAAC,CAAC;MACjC,IAAMqB,IAAI,GAAG,kBAAkB;MAC/B8C,GAAG,CAACE,GAAG,CAACjD,IAAI,EAAE;QAAEA,IAAI;QAAEC;MAAK,CAAC,CAAC;IAC/B;IAEA,OAAO8C,GAAG;EACZ;EAEAG,gBAAgBA,CAAA,EAAY;IAC1B,OAAO,IAAI,CAACR,YAAY,CAACvE,MAAM,GAAG,CAAC;EACrC;EAEAgF,SAASA,CAAA,EAAS;IAChB,IAAI,CAACC,UAAU,CAAC,IAAI,CAACX,IAAI,CAAC;EAC5B;AACF;AAACE,eAAA,CA/NK/E,cAAc,eACC,GAAG;AAAA+E,eAAA,CADlB/E,cAAc;AAiOpB,eAAeA,cAAc"}
1
+ {"version":3,"file":"MockChartModel.js","names":["ChartModel","ChartTheme","ChartUtils","MockChartModel","makeRandomSeries","offset","scale","arguments","length","undefined","steps","dates","values","smooth","linear","startDate","Date","i","date","getFullYear","getMonth","getDate","push","concat","v","Math","sin","cos","random","smoothing","round","x","y","s","l","makeScatter","series","name","type","mode","hoverinfo","marker","size","makeArea","fill","line","color","area_color","width","makeTrendline","dash","trend_color","makeErrorBand","erroryforward","errorybackward","value","errory","reverse","slice","fillcolor","error_band_fill_color","error_band_line_color","shape","makeLine","line_color","makeRandomData","series1","areaPattern","trendLine","series2","errorBand","makeDefaultLayout","dh","layout","title","xaxis","yaxis","constructor","data","filterFields","_defineProperty","getData","getLayout","getFilterColumnMap","map","Map","set","isFilterRequired","setFilter","fireUpdate"],"sources":["../src/MockChartModel.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\nimport type { dh as DhType } from '@deephaven/jsapi-types';\nimport type { Datum, Layout, PlotData } from 'plotly.js';\nimport ChartModel from './ChartModel';\nimport ChartTheme from './ChartTheme';\nimport ChartUtils from './ChartUtils';\n\ninterface Series {\n x: PlotData['x'];\n y: PlotData['y'];\n s: number[];\n l: number[];\n}\n\n/** Displays a basic random chart */\nclass MockChartModel extends ChartModel {\n static smoothing = 1.5;\n\n static makeRandomSeries(offset: number, scale = 1, steps = 100): Series {\n const dates = [];\n const values = [];\n const smooth = [];\n const linear = [];\n const startDate = new Date();\n\n for (let i = 0; i < steps; i += 1) {\n const date = new Date(\n startDate.getFullYear(),\n startDate.getMonth(),\n startDate.getDate() + i - steps\n );\n dates.push(\n `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`\n );\n let v =\n ((Math.sin((i / steps) * offset) * steps) / 3 +\n (Math.cos(i * 0.2) * steps) / 6 +\n (Math.sin(i * 0.5) * steps) / 10 +\n (Math.random() * steps) / 5 +\n i * MockChartModel.smoothing) *\n scale;\n v = Math.round(v * 100) / 100; // 2 decimals only\n // using steps acts as amplititude scaling based on value\n // large sine wave for course shape + small sine waves for bumpiness +\n // general randomness noise + index to be constantly up and to the right + smoothing factor\n values.push(v);\n linear.push(40 + i * MockChartModel.smoothing);\n smooth.push(\n (Math.sin((i / steps) * offset) * steps) / 3 +\n (Math.random() * steps) / 10 +\n i * MockChartModel.smoothing\n ); // push a smoother version of the same thing\n }\n\n return { x: dates, y: values, s: smooth, l: linear };\n }\n\n static makeScatter(series: Series): Partial<PlotData> {\n return {\n name: 'SCTR',\n x: series.x,\n y: series.y,\n type: 'scattergl',\n mode: 'markers',\n hoverinfo: 'skip',\n marker: {\n size: 5,\n },\n };\n }\n\n static makeArea(series: Series): Partial<PlotData> {\n return {\n name: 'AREA',\n x: series.x,\n y: series.s,\n type: 'scatter',\n mode: 'line' as PlotData['mode'],\n fill: 'tozeroy',\n hoverinfo: 'all',\n line: {\n color: ChartTheme.area_color,\n width: 3,\n // area patten gets applied as hack in post render plot.ly callback + css\n },\n };\n }\n\n static makeTrendline(series: Series): Partial<PlotData> {\n return {\n // we probably want to toss the line formula in legend I guess? either that or render it as text manually on plot\n name: 'Trendline <br>R<sup>2</sup> = 0.91',\n x: series.x,\n y: series.l,\n type: 'scattergl',\n mode: 'line' as PlotData['mode'],\n hoverinfo: 'skip',\n line: {\n width: 3,\n dash: 'dot', // trendlines should follow some sort of color convention + dots/dashed. Remember there can multiple\n color: ChartTheme.trend_color,\n // chroma(c.$green).brighten(1.2).hex()\n },\n };\n }\n\n static makeErrorBand(series: Series): Partial<PlotData> {\n // generate continouous error bands values and text\n const erroryforward = [];\n const errorybackward = [];\n for (let i = 0; i < series.y.length; i += 1) {\n const value = series.y[i] as number;\n erroryforward[i] = Math.round((value + 18) * 100) / 100;\n errorybackward[i] = Math.round((value - 18) * 100) / 100;\n }\n\n // makes a closed shape of points winding clockwise for y values\n const errory = erroryforward.concat(errorybackward.reverse());\n\n return {\n name: 'error',\n x: (series.x as Datum[]).concat((series.x as Datum[]).slice().reverse()), // winding for x values, that slice just clones so reverse doesn't apply inplace\n y: errory,\n type: 'scattergl',\n mode: 'line' as PlotData['mode'],\n hoverinfo: 'skip',\n fill: 'toself', // there's some ordering bug with scattergl where if the areas traces are ordered after the lines they don't render\n fillcolor: ChartTheme.error_band_fill_color,\n line: {\n width: 0,\n color: ChartTheme.error_band_line_color,\n shape: 'spline',\n },\n };\n }\n\n static makeLine(series: Series): Partial<PlotData> {\n return {\n name: 'LINE',\n x: series.x,\n y: series.y,\n type: 'scattergl',\n mode: 'line' as PlotData['mode'],\n hoverinfo: 'x+y+text+name' as PlotData['hoverinfo'],\n line: {\n color: ChartTheme.line_color,\n width: 3,\n },\n };\n }\n\n static makeRandomData(): Partial<PlotData>[] {\n const series1 = MockChartModel.makeRandomSeries(6);\n const areaPattern = MockChartModel.makeArea(series1);\n const trendLine = MockChartModel.makeTrendline(series1);\n\n const series2 = MockChartModel.makeRandomSeries(2);\n const line = MockChartModel.makeLine(series2);\n const errorBand = MockChartModel.makeErrorBand(series2);\n\n return [areaPattern, trendLine, line, errorBand];\n }\n\n static makeDefaultLayout(dh: DhType): Partial<Layout> {\n const layout = new ChartUtils(dh).makeDefaultLayout(ChartTheme);\n layout.title = 'Chart';\n\n if (layout.xaxis) {\n layout.xaxis.title = 'Datestamp';\n }\n\n if (layout.yaxis) {\n layout.yaxis.title = 'Price';\n }\n\n return layout;\n }\n\n constructor(\n dh: DhType,\n {\n data = MockChartModel.makeRandomData(),\n layout = MockChartModel.makeDefaultLayout(dh),\n filterFields = [],\n } = {}\n ) {\n super(dh);\n\n this.data = data;\n this.layout = layout;\n this.filterFields = filterFields;\n }\n\n data: Partial<PlotData>[];\n\n filterFields: string[];\n\n layout: Partial<Layout>;\n\n getData(): Partial<PlotData>[] {\n return this.data;\n }\n\n getLayout(): Partial<Layout> {\n return this.layout;\n }\n\n getFilterColumnMap(): Map<string, { name: string; type: string }> {\n const map = new Map();\n\n for (let i = 0; i < this.filterFields.length; i += 1) {\n const name = this.filterFields[i];\n const type = 'java.lang.String';\n map.set(name, { name, type });\n }\n\n return map;\n }\n\n isFilterRequired(): boolean {\n return this.filterFields.length > 0;\n }\n\n setFilter(): void {\n this.fireUpdate(this.data);\n }\n}\n\nexport default MockChartModel;\n"],"mappings":";;;AAAA;AACA;AAAA,OAIOA,UAAU;AAAA,OACVC,UAAU;AAAA,OACVC,UAAU;AASjB;AACA,MAAMC,cAAc,SAASH,UAAU,CAAC;EAGtC,OAAOI,gBAAgBA,CAACC,MAAc,EAAkC;IAAA,IAAhCC,KAAK,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;IAAA,IAAEG,KAAK,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,GAAG;IAC5D,IAAMI,KAAK,GAAG,EAAE;IAChB,IAAMC,MAAM,GAAG,EAAE;IACjB,IAAMC,MAAM,GAAG,EAAE;IACjB,IAAMC,MAAM,GAAG,EAAE;IACjB,IAAMC,SAAS,GAAG,IAAIC,IAAI,CAAC,CAAC;IAE5B,KAAK,IAA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ts CHANGED
@@ -6,8 +6,6 @@ export * from './ChartUtils';
6
6
  export { default as FigureChartModel } from './FigureChartModel';
7
7
  export { default as MockChartModel } from './MockChartModel';
8
8
  export { default as Plot } from './plotly/Plot';
9
- export * from './ChartTheme';
10
- export * from './ChartThemeProvider';
9
+ export { default as ChartTheme } from './ChartTheme';
11
10
  export { default as isFigureChartModel } from './isFigureChartModel';
12
- export * from './useChartTheme';
13
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC;AAChD,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -6,8 +6,6 @@ export * from "./ChartUtils.js";
6
6
  export { default as FigureChartModel } from "./FigureChartModel.js";
7
7
  export { default as MockChartModel } from "./MockChartModel.js";
8
8
  export { default as Plot } from "./plotly/Plot.js";
9
- export * from "./ChartTheme.js";
10
- export * from "./ChartThemeProvider.js";
9
+ export { default as ChartTheme } from "./ChartTheme.js";
11
10
  export { default as isFigureChartModel } from "./isFigureChartModel.js";
12
- export * from "./useChartTheme.js";
13
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","Chart","ChartModelFactory","ChartModel","ChartUtils","FigureChartModel","MockChartModel","Plot","isFigureChartModel"],"sources":["../src/index.ts"],"sourcesContent":["export { default as Chart } from './Chart';\nexport { default as ChartModelFactory } from './ChartModelFactory';\nexport { default as ChartModel } from './ChartModel';\nexport { default as ChartUtils } from './ChartUtils';\nexport * from './ChartUtils';\nexport { default as FigureChartModel } from './FigureChartModel';\nexport { default as MockChartModel } from './MockChartModel';\nexport { default as Plot } from './plotly/Plot';\nexport * from './ChartTheme';\nexport * from './ChartThemeProvider';\nexport { default as isFigureChartModel } from './isFigureChartModel';\nexport * from './useChartTheme';\n"],"mappings":"SAASA,OAAO,IAAIC,KAAK;AAAA,SAChBD,OAAO,IAAIE,iBAAiB;AAAA,SAC5BF,OAAO,IAAIG,UAAU;AAAA,SACrBH,OAAO,IAAII,UAAU;AAAA;AAAA,SAErBJ,OAAO,IAAIK,gBAAgB;AAAA,SAC3BL,OAAO,IAAIM,cAAc;AAAA,SACzBN,OAAO,IAAIO,IAAI;AAAA;AAAA;AAAA,SAGfP,OAAO,IAAIQ,kBAAkB;AAAA"}
1
+ {"version":3,"file":"index.js","names":["default","Chart","ChartModelFactory","ChartModel","ChartUtils","FigureChartModel","MockChartModel","Plot","ChartTheme","isFigureChartModel"],"sources":["../src/index.ts"],"sourcesContent":["export { default as Chart } from './Chart';\nexport { default as ChartModelFactory } from './ChartModelFactory';\nexport { default as ChartModel } from './ChartModel';\nexport { default as ChartUtils } from './ChartUtils';\nexport * from './ChartUtils';\nexport { default as FigureChartModel } from './FigureChartModel';\nexport { default as MockChartModel } from './MockChartModel';\nexport { default as Plot } from './plotly/Plot';\nexport { default as ChartTheme } from './ChartTheme';\nexport { default as isFigureChartModel } from './isFigureChartModel';\n"],"mappings":"SAASA,OAAO,IAAIC,KAAK;AAAA,SAChBD,OAAO,IAAIE,iBAAiB;AAAA,SAC5BF,OAAO,IAAIG,UAAU;AAAA,SACrBH,OAAO,IAAII,UAAU;AAAA;AAAA,SAErBJ,OAAO,IAAIK,gBAAgB;AAAA,SAC3BL,OAAO,IAAIM,cAAc;AAAA,SACzBN,OAAO,IAAIO,IAAI;AAAA,SACfP,OAAO,IAAIQ,UAAU;AAAA,SACrBR,OAAO,IAAIS,kBAAkB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Plot.d.ts","sourceRoot":"","sources":["../../src/plotly/Plot.ts"],"names":[],"mappings":";;AAMA,wBAA6C"}
1
+ {"version":3,"file":"Plot.d.ts","sourceRoot":"","sources":["../../src/plotly/Plot.ts"],"names":[],"mappings":";;AASA,wBAMO"}
@@ -1,7 +1,12 @@
1
1
  // Import the react customizable bundle for building, only pull in the modules we need
2
2
  // This reduces the build size. Plotly has a lot of modules we don't need/use.
3
3
  // https://github.com/plotly/react-plotly.js#customizing-the-plotlyjs-bundle
4
- import createPlotlyComponent from "./createPlotlyComponent.js";
5
- import Plotly from "./Plotly.js";
6
- export default createPlotlyComponent(Plotly);
4
+ import createPlotlyComponent from 'react-plotly.js/factory.js';
5
+ import Plotly from "./Plotly.js"; // Webpack 5 (used in docusaurus) gives an object w/ a default key
6
+ // This is probably something on react-plotly.js's side
7
+ // Or because we lazy load this and Docusaurus ends up w/ some complications between ESM and CJS
8
+ export default typeof createPlotlyComponent === 'function' ? createPlotlyComponent(Plotly) :
9
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
+ // @ts-ignore
11
+ createPlotlyComponent.default(Plotly);
7
12
  //# sourceMappingURL=Plot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Plot.js","names":["createPlotlyComponent","Plotly"],"sources":["../../src/plotly/Plot.ts"],"sourcesContent":["// Import the react customizable bundle for building, only pull in the modules we need\n// This reduces the build size. Plotly has a lot of modules we don't need/use.\n// https://github.com/plotly/react-plotly.js#customizing-the-plotlyjs-bundle\nimport createPlotlyComponent from './createPlotlyComponent';\nimport Plotly from './Plotly';\n\nexport default createPlotlyComponent(Plotly);\n"],"mappings":"AAAA;AACA;AACA;AAAA,OACOA,qBAAqB;AAAA,OACrBC,MAAM;AAEb,eAAeD,qBAAqB,CAACC,MAAM,CAAC"}
1
+ {"version":3,"file":"Plot.js","names":["createPlotlyComponent","Plotly","default"],"sources":["../../src/plotly/Plot.ts"],"sourcesContent":["// Import the react customizable bundle for building, only pull in the modules we need\n// This reduces the build size. Plotly has a lot of modules we don't need/use.\n// https://github.com/plotly/react-plotly.js#customizing-the-plotlyjs-bundle\nimport createPlotlyComponent from 'react-plotly.js/factory.js';\nimport Plotly from './Plotly';\n\n// Webpack 5 (used in docusaurus) gives an object w/ a default key\n// This is probably something on react-plotly.js's side\n// Or because we lazy load this and Docusaurus ends up w/ some complications between ESM and CJS\nexport default typeof createPlotlyComponent === 'function'\n ? createPlotlyComponent(Plotly)\n : // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n (createPlotlyComponent.default(Plotly) as ReturnType<\n typeof createPlotlyComponent\n >);\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,qBAAqB,MAAM,4BAA4B;AAAC,OACxDC,MAAM,qBAEb;AACA;AACA;AACA,eAAe,OAAOD,qBAAqB,KAAK,UAAU,GACtDA,qBAAqB,CAACC,MAAM,CAAC;AAC7B;AACA;AACCD,qBAAqB,CAACE,OAAO,CAACD,MAAM,CAEnC"}