@deephaven/chart 0.9.1-embed-grid.14 → 0.9.2-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Chart.css +3 -3
- package/dist/Chart.css.map +1 -1
- package/dist/Chart.d.ts +4 -2
- package/dist/Chart.d.ts.map +1 -1
- package/dist/Chart.js +16 -6
- package/dist/Chart.js.map +1 -1
- package/dist/ChartModelFactory.d.ts +8 -4
- package/dist/ChartModelFactory.d.ts.map +1 -1
- package/dist/ChartModelFactory.js +6 -2
- package/dist/ChartModelFactory.js.map +1 -1
- package/package.json +11 -16
- package/dist/Chart.module.css +0 -65
- package/dist/Chart.module.css.map +0 -1
package/dist/Chart.css
CHANGED
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
.chart-wrapper .js-plotly-plot .plotly .modebar {
|
|
45
45
|
z-index: auto;
|
|
46
46
|
}
|
|
47
|
-
.chart-wrapper .js-plotly-plot .plotly .modebar .modebar-btn[data-
|
|
47
|
+
.chart-wrapper .js-plotly-plot .plotly .modebar .modebar-btn[data-attr=animation-spin] svg {
|
|
48
48
|
animation: fa-spin 2s infinite linear;
|
|
49
49
|
}
|
|
50
|
-
.chart-wrapper .js-plotly-plot .plotly .modebar .modebar-btn[data-
|
|
50
|
+
.chart-wrapper .js-plotly-plot .plotly .modebar .modebar-btn[data-attr=fill-active] svg path {
|
|
51
51
|
fill: rgba(255, 255, 255, 0.7) !important;
|
|
52
52
|
}
|
|
53
|
-
.chart-wrapper .js-plotly-plot .plotly .modebar .modebar-btn[data-
|
|
53
|
+
.chart-wrapper .js-plotly-plot .plotly .modebar .modebar-btn[data-attr=fill-warning] svg path {
|
|
54
54
|
fill: #f37e3f !important;
|
|
55
55
|
}
|
|
56
56
|
|
package/dist/Chart.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../src/Chart.scss","../../components/scss/bootstrap_overrides.scss"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/Chart.scss","../../components/scss/bootstrap_overrides.scss"],"names":[],"mappings":"AAQA;EACE,cAN6B;;;AAS/B;EAIE;EACA;EACA;;;AAGF;EACE,YCXc;;ADcZ;EACE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE,MC/BW;EDgCX,QClBK;;ADuBT;EACE;EAGA;;AAGF;EACE,eC+DY;ED9DZ,YCnCO;EDoCP,OC/Ca;EDgDb;EACA,YCoHiB;EDjHjB;;AAGF;EAEE;;AAII;EACE;;AAMA;EACE;;AAOF;EACE","file":"Chart.css"}
|
package/dist/Chart.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ export class Chart extends React.Component<any, any, any> {
|
|
|
10
10
|
descent: number;
|
|
11
11
|
transform: string;
|
|
12
12
|
};
|
|
13
|
-
static downsampleButtonTitle(isDownsampleInProgress: any, isDownsamplingDisabled: any):
|
|
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;
|
|
14
15
|
constructor(props: any);
|
|
15
16
|
handleAfterPlot(): void;
|
|
16
17
|
handleDownsampleClick(): void;
|
|
@@ -32,7 +33,7 @@ export class Chart extends React.Component<any, any, any> {
|
|
|
32
33
|
displaylogo: boolean;
|
|
33
34
|
displayModeBar: string | boolean;
|
|
34
35
|
modeBarButtons: (string[] | {
|
|
35
|
-
name:
|
|
36
|
+
name: string;
|
|
36
37
|
icon: {
|
|
37
38
|
width: any;
|
|
38
39
|
path: any;
|
|
@@ -41,6 +42,7 @@ export class Chart extends React.Component<any, any, any> {
|
|
|
41
42
|
transform: string;
|
|
42
43
|
};
|
|
43
44
|
click: () => void;
|
|
45
|
+
attr: string | undefined;
|
|
44
46
|
}[])[];
|
|
45
47
|
};
|
|
46
48
|
getPlotRect(): any;
|
package/dist/Chart.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../src/Chart.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../src/Chart.jsx"],"names":[],"mappings":"AAgBA;IACE;;;OAGG;IACH;;;;;;MAWC;IAED,4MAQC;IAED,oIAMC;IAED,wBAgCC;IAqID,wBAIC;IAED,8BAcC;IAED,mCAsEC;IAED,oCAcC;IAED,mCAWC;IAED,0DAYC;IAlSC,2BAA6B;IAC7B,kCAAoC;IACpC,qBAAuB;IACvB,6BAAkC;IAClC,yBAA8B;IAC9B,yBAA8B;IAC9B,UAAgB;IAChB,sBAAkB;IAClB,sBAAyB;IACzB,uBAA0B;IA8C5B;;;;;;;;;;;;;;;MA0DE;IAEF,mBAEC;IAED,iBAUC;IAED,kBAYC;IAED,oBAQC;IA2ID;;;;;;;OAOG;IACH,8BAFW,OAAO,QAwBjB;IAED,sBAGC;IAED,6CAmBC;IAED,wBAUC;IAED,yBAcC;CAuCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAmCe,uCAAQ;;QACT,sCAAQ;;QACX,mCAAQ;;QACT,kCAAQ;;QACE,4CAAQ"}
|
package/dist/Chart.js
CHANGED
|
@@ -15,7 +15,6 @@ import Plotly from "./plotly/Plotly.js";
|
|
|
15
15
|
import Plot from "./plotly/Plot.js";
|
|
16
16
|
import ChartModel from "./ChartModel.js";
|
|
17
17
|
import ChartUtils from "./ChartUtils.js";
|
|
18
|
-
import ChartConstants from "./Chart.module.css";
|
|
19
18
|
import "./Chart.css";
|
|
20
19
|
var log = Log.module('Chart');
|
|
21
20
|
export class Chart extends Component {
|
|
@@ -38,10 +37,18 @@ export class Chart extends Component {
|
|
|
38
37
|
|
|
39
38
|
static downsampleButtonTitle(isDownsampleInProgress, isDownsamplingDisabled) {
|
|
40
39
|
if (isDownsampleInProgress) {
|
|
41
|
-
return
|
|
40
|
+
return 'Downsampling in progress...';
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
return isDownsamplingDisabled ?
|
|
43
|
+
return isDownsamplingDisabled ? 'Downsampling disabled, click to enable' : 'Downsampling enabled, click to disable';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static downsampleButtonAttr(isDownsampleInProgress, isDownsamplingDisabled) {
|
|
47
|
+
if (isDownsampleInProgress) {
|
|
48
|
+
return 'animation-spin';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return isDownsamplingDisabled ? undefined : 'fill-active';
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
constructor(props) {
|
|
@@ -52,19 +59,22 @@ export class Chart extends Component {
|
|
|
52
59
|
|
|
53
60
|
if (downsamplingError) {
|
|
54
61
|
customButtons.push({
|
|
55
|
-
name: "
|
|
62
|
+
name: "Downsampling failed: ".concat(downsamplingError),
|
|
56
63
|
click: () => {},
|
|
57
|
-
icon: Chart.convertIcon(dhWarningFilled)
|
|
64
|
+
icon: Chart.convertIcon(dhWarningFilled),
|
|
65
|
+
attr: 'fill-warning'
|
|
58
66
|
});
|
|
59
67
|
}
|
|
60
68
|
|
|
61
69
|
if (isDownsampleFinished || isDownsampleInProgress || isDownsamplingDisabled || downsamplingError) {
|
|
62
70
|
var name = Chart.downsampleButtonTitle(isDownsampleInProgress, isDownsamplingDisabled);
|
|
71
|
+
var attr = Chart.downsampleButtonAttr(isDownsampleInProgress, isDownsamplingDisabled);
|
|
63
72
|
var icon = isDownsampleInProgress ? vsLoading : dhGraphLineDown;
|
|
64
73
|
customButtons.push({
|
|
65
74
|
name,
|
|
66
75
|
icon: Chart.convertIcon(icon),
|
|
67
|
-
click: this.handleDownsampleClick
|
|
76
|
+
click: this.handleDownsampleClick,
|
|
77
|
+
attr
|
|
68
78
|
});
|
|
69
79
|
}
|
|
70
80
|
|
package/dist/Chart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Chart.jsx"],"names":["React","Component","PropTypes","deepEqual","memoize","vsLoading","dhGraphLineDown","dhWarningFilled","Formatter","FormatterUtils","DateUtils","Log","Plotly","Plot","ChartModel","ChartUtils","ChartConstants","log","module","Chart","convertIcon","faIcon","width","path","icon","ascent","descent","transform","downsampleButtonTitle","isDownsampleInProgress","isDownsamplingDisabled","constructor","props","downsamplingError","isDownsampleFinished","customButtons","push","name","click","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","propTypes","instanceOf","isRequired","shape","timeZone","string","defaultDateTimeFormat","showTimeZone","bool","showTSeparator","arrayOf","defaultFormatString","func","defaultProps","FULL_DATE_FORMAT"],"mappings":";;;;;;AAAA,OAAOA,K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A,iBAAiB,EAAEjH,SAAS,CAACsJ;AArBb,CAAlB;AAwBArI,KAAK,CAACsI,YAAN,GAAqB;AACnBnF,EAAAA,QAAQ,EAAE,IADS;AAEnBI,EAAAA,QAAQ,EAAE;AACRsE,IAAAA,QAAQ,EAAE,kBADF;AAERE,IAAAA,qBAAqB,EAAExI,SAAS,CAACgJ,gBAFzB;AAGRP,IAAAA,YAAY,EAAE,KAHN;AAIRE,IAAAA,cAAc,EAAE,IAJR;AAKRpB,IAAAA,SAAS,EAAE;AALH,GAFS;AASnBhC,EAAAA,YAAY,EAAE,MAAM,CAAE,CATH;AAUnBE,EAAAA,WAAW,EAAE,MAAM,CAAE,CAVF;AAWnBN,EAAAA,QAAQ,EAAE,MAAM,CAAE,CAXC;AAYnBY,EAAAA,OAAO,EAAE,MAAM,CAAE,CAZE;AAanBU,EAAAA,iBAAiB,EAAE,MAAM,CAAE;AAbR,CAArB;AAgBA,eAAehG,KAAf","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/iris-grid';\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 ChartConstants from './Chart.module.scss';\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 ChartConstants['title-downsampling-in-progress'];\n }\n\n return isDownsamplingDisabled\n ? ChartConstants['title-downsampling-disabled']\n : ChartConstants['title-downsampling-enabled'];\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: `${ChartConstants['title-downsampling-failed']}: ${downsamplingError}`,\n click: () => {},\n icon: Chart.convertIcon(dhWarningFilled),\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 icon = isDownsampleInProgress ? vsLoading : dhGraphLineDown;\n customButtons.push({\n name,\n icon: Chart.convertIcon(icon),\n click: this.handleDownsampleClick,\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 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"],"file":"Chart.js"}
|
|
1
|
+
{"version":3,"sources":["../src/Chart.jsx"],"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","propTypes","instanceOf","isRequired","shape","timeZone","string","defaultDateTimeFormat","showTimeZone","bool","showTSeparator","arrayOf","defaultFormatString","func","defaultProps","FULL_DATE_FORMAT"],"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,sBAArD;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;AACnC;AACF;AACA;AACA;AACoB,SAAXkB,WAAW,CAACC,MAAD,EAAS;AACzB,QAAM,CAACC,KAAD,KAAcC,IAAd,IAAsBF,MAAM,CAACG,IAAnC,CADyB,CAEzB;AACA;;AACA,WAAO;AACLF,MAAAA,KADK;AAELC,MAAAA,IAFK;AAGLE,MAAAA,MAAM,EAAEH,KAHH;AAILI,MAAAA,OAAO,EAAE,CAJJ;AAKLC,MAAAA,SAAS;AALJ,KAAP;AAOD;;AAE2B,SAArBC,qBAAqB,CAACC,sBAAD,EAAyBC,sBAAzB,EAAiD;AAC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enG,KAAf","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/iris-grid';\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 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"],"file":"Chart.js"}
|
|
@@ -12,7 +12,9 @@ declare class ChartModelFactory {
|
|
|
12
12
|
* @param {string[]} settings.hiddenSeries Array of hidden series names
|
|
13
13
|
* @param {dh.Table} table The table to build the model for
|
|
14
14
|
* @param {Object} theme The theme for the figure. Defaults to ChartTheme
|
|
15
|
-
* @returns {Promise<FigureChartModel>} The FigureChartModel representing the figure
|
|
15
|
+
* @returns {Promise<ChartModel | FigureChartModel>} The FigureChartModel representing the figure
|
|
16
|
+
* CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel
|
|
17
|
+
* This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel
|
|
16
18
|
*/
|
|
17
19
|
static makeModelFromSettings(settings: {
|
|
18
20
|
isLinked: boolean;
|
|
@@ -21,7 +23,7 @@ declare class ChartModelFactory {
|
|
|
21
23
|
type: string;
|
|
22
24
|
xAxis: string;
|
|
23
25
|
hiddenSeries: string[];
|
|
24
|
-
}, table: dh.Table, theme?: Object): Promise<FigureChartModel>;
|
|
26
|
+
}, table: dh.Table, theme?: Object): Promise<ChartModel | FigureChartModel>;
|
|
25
27
|
/**
|
|
26
28
|
* Creates a model from the settings provided.
|
|
27
29
|
* Tries to create a Figure in the API with it.
|
|
@@ -34,7 +36,9 @@ declare class ChartModelFactory {
|
|
|
34
36
|
* @param {string[]} settings.hiddenSeries Array of hidden series names
|
|
35
37
|
* @param {dh.Figure} figure The figure to build the model for
|
|
36
38
|
* @param {Object} theme The theme for the figure. Defaults to ChartTheme
|
|
37
|
-
* @returns {Promise<FigureChartModel>} The FigureChartModel representing the figure
|
|
39
|
+
* @returns {Promise<ChartModel | FigureChartModel>} The FigureChartModel representing the figure
|
|
40
|
+
* CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel
|
|
41
|
+
* This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel
|
|
38
42
|
*/
|
|
39
43
|
static makeModel(settings: {
|
|
40
44
|
isLinked: boolean;
|
|
@@ -43,7 +47,7 @@ declare class ChartModelFactory {
|
|
|
43
47
|
type: string;
|
|
44
48
|
xAxis: string;
|
|
45
49
|
hiddenSeries: string[];
|
|
46
|
-
}, figure: dh.Figure, theme?: Object): Promise<FigureChartModel>;
|
|
50
|
+
}, figure: dh.Figure, theme?: Object): Promise<ChartModel | FigureChartModel>;
|
|
47
51
|
}
|
|
48
52
|
import FigureChartModel from "./FigureChartModel";
|
|
49
53
|
//# sourceMappingURL=ChartModelFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartModelFactory.d.ts","sourceRoot":"","sources":["../src/ChartModelFactory.js"],"names":[],"mappings":";AAKA;IACE
|
|
1
|
+
{"version":3,"file":"ChartModelFactory.d.ts","sourceRoot":"","sources":["../src/ChartModelFactory.js"],"names":[],"mappings":";AAKA;IACE;;;;;;;;;;;;;;;OAeG;IACH;QAZ6B,QAAQ,EAA1B,OAAO;QACY,MAAM,EAAzB,MAAM,EAAE;QACS,aAAa,EAA9B,MAAM;QACW,IAAI,EAArB,MAAM;QACW,KAAK,EAAtB,MAAM;QACa,YAAY,EAA/B,MAAM,EAAE;gCAER,MAAM,GACJ,QAAQ,aAAa,gBAAgB,CAAC,CAkBlD;IAED;;;;;;;;;;;;;;;OAeG;IACH;QAZ6B,QAAQ,EAA1B,OAAO;QACY,MAAM,EAAzB,MAAM,EAAE;QACS,aAAa,EAA9B,MAAM;QACW,IAAI,EAArB,MAAM;QACW,KAAK,EAAtB,MAAM;QACa,YAAY,EAA/B,MAAM,EAAE;kCAER,MAAM,GACJ,QAAQ,aAAa,gBAAgB,CAAC,CAMlD;CACF"}
|
|
@@ -20,7 +20,9 @@ class ChartModelFactory {
|
|
|
20
20
|
* @param {string[]} settings.hiddenSeries Array of hidden series names
|
|
21
21
|
* @param {dh.Table} table The table to build the model for
|
|
22
22
|
* @param {Object} theme The theme for the figure. Defaults to ChartTheme
|
|
23
|
-
* @returns {Promise<FigureChartModel>} The FigureChartModel representing the figure
|
|
23
|
+
* @returns {Promise<ChartModel | FigureChartModel>} The FigureChartModel representing the figure
|
|
24
|
+
* CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel
|
|
25
|
+
* This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel
|
|
24
26
|
*/
|
|
25
27
|
static makeModelFromSettings(settings, table) {
|
|
26
28
|
var _arguments = arguments;
|
|
@@ -50,7 +52,9 @@ class ChartModelFactory {
|
|
|
50
52
|
* @param {string[]} settings.hiddenSeries Array of hidden series names
|
|
51
53
|
* @param {dh.Figure} figure The figure to build the model for
|
|
52
54
|
* @param {Object} theme The theme for the figure. Defaults to ChartTheme
|
|
53
|
-
* @returns {Promise<FigureChartModel>} The FigureChartModel representing the figure
|
|
55
|
+
* @returns {Promise<ChartModel | FigureChartModel>} The FigureChartModel representing the figure
|
|
56
|
+
* CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel
|
|
57
|
+
* This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel
|
|
54
58
|
*/
|
|
55
59
|
|
|
56
60
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ChartModelFactory.js"],"names":["dh","ChartUtils","FigureChartModel","ChartTheme","ChartModelFactory","makeModelFromSettings","settings","table","theme","copy","then","tableCopy","applyCustomColumns","customColumns","applyFilter","filter","applySort","sort","plot","Figure","create","makeFigureSettings","figure","makeModel"],"mappings":";;;;AAAA,OAAOA,EAAP,MAAe,uBAAf;OACOC,U;OACAC,gB;OACAC,U;;AAEP,MAAMC,iBAAN,CAAwB;AACtB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoC,SAArBC,qBAAqB,CAACC,QAAD,EAAWC,KAAX,EAAsC;AAAA;AAAA;AAAA,UAApBC,KAAoB,0EAAZL,UAAY;AACtE;AACA;AACA;AACA;AACA,aAAOI,KAAK,CAACE,IAAN,GAAaC,IAAb,CAAkBC,SAAS,IAAI;AACpCA,QAAAA,SAAS,CAACC,kBAAV,CAA6BL,KAAK,CAACM,aAAnC;AACAF,QAAAA,SAAS,CAACG,WAAV,CAAsBP,KAAK,CAACQ,MAA5B;AACAJ,QAAAA,SAAS,CAACK,SAAV,CAAoBT,KAAK,CAACU,IAA1B;AAEA,eAAOjB,EAAE,CAACkB,IAAH,CAAQC,MAAR,CAAeC,MAAf,CACLnB,UAAU,CAACoB,kBAAX,CAA8Bf,QAA9B,EAAwCK,SAAxC,CADK,EAELD,IAFK,CAEAY,MAAM,IAAI,IAAIpB,gBAAJ,CAAqBoB,MAArB,EAA6BhB,QAA7B,EAAuCE,KAAvC,CAFV,CAAP;AAGD,OARM,CAAP;AALsE;AAcvE;AAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACwB,SAATe,SAAS,CAACjB,QAAD,EAAWgB,MAAX,EAAuC;AAAA;AAAA;AAAA,UAApBd,KAAoB,6EAAZL,UAAY;AAC3D,aAAO,IAAID,gBAAJ,CAAqBoB,MAArB,EAA6BhB,QAA7B,EAAuCE,KAAvC,CAAP;AAD2D;AAE5D;;
|
|
1
|
+
{"version":3,"sources":["../src/ChartModelFactory.js"],"names":["dh","ChartUtils","FigureChartModel","ChartTheme","ChartModelFactory","makeModelFromSettings","settings","table","theme","copy","then","tableCopy","applyCustomColumns","customColumns","applyFilter","filter","applySort","sort","plot","Figure","create","makeFigureSettings","figure","makeModel"],"mappings":";;;;AAAA,OAAOA,EAAP,MAAe,uBAAf;OACOC,U;OACAC,gB;OACAC,U;;AAEP,MAAMC,iBAAN,CAAwB;AACtB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoC,SAArBC,qBAAqB,CAACC,QAAD,EAAWC,KAAX,EAAsC;AAAA;AAAA;AAAA,UAApBC,KAAoB,0EAAZL,UAAY;AACtE;AACA;AACA;AACA;AACA,aAAOI,KAAK,CAACE,IAAN,GAAaC,IAAb,CAAkBC,SAAS,IAAI;AACpCA,QAAAA,SAAS,CAACC,kBAAV,CAA6BL,KAAK,CAACM,aAAnC;AACAF,QAAAA,SAAS,CAACG,WAAV,CAAsBP,KAAK,CAACQ,MAA5B;AACAJ,QAAAA,SAAS,CAACK,SAAV,CAAoBT,KAAK,CAACU,IAA1B;AAEA,eAAOjB,EAAE,CAACkB,IAAH,CAAQC,MAAR,CAAeC,MAAf,CACLnB,UAAU,CAACoB,kBAAX,CAA8Bf,QAA9B,EAAwCK,SAAxC,CADK,EAELD,IAFK,CAEAY,MAAM,IAAI,IAAIpB,gBAAJ,CAAqBoB,MAArB,EAA6BhB,QAA7B,EAAuCE,KAAvC,CAFV,CAAP;AAGD,OARM,CAAP;AALsE;AAcvE;AAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACwB,SAATe,SAAS,CAACjB,QAAD,EAAWgB,MAAX,EAAuC;AAAA;AAAA;AAAA,UAApBd,KAAoB,6EAAZL,UAAY;AAC3D,aAAO,IAAID,gBAAJ,CAAqBoB,MAArB,EAA6BhB,QAA7B,EAAuCE,KAAvC,CAAP;AAD2D;AAE5D;;AAnDqB;;AAsDxB,eAAeJ,iBAAf","sourcesContent":["import dh from '@deephaven/jsapi-shim';\nimport ChartUtils from './ChartUtils';\nimport FigureChartModel from './FigureChartModel';\nimport ChartTheme from './ChartTheme';\n\nclass ChartModelFactory {\n /**\n * Creates a model from the settings provided.\n * Tries to create a Figure in the API with it.\n * @param {Object} settings The chart builder settings\n * @param {boolean} settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated\n * @param {string[]} settings.series The column names to use for creating the series of this chart\n * @param {string} settings.sourcePanelId The panel ID the chart was created from\n * @param {string} settings.type Chart builder type, from ChartBuilder.types\n * @param {string} settings.xAxis The column name to use for the x-axis\n * @param {string[]} settings.hiddenSeries Array of hidden series names\n * @param {dh.Table} table The table to build the model for\n * @param {Object} theme The theme for the figure. Defaults to ChartTheme\n * @returns {Promise<ChartModel | FigureChartModel>} The FigureChartModel representing the figure\n * CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel\n * This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel\n */\n static async makeModelFromSettings(settings, table, theme = ChartTheme) {\n // Copy the table first and then re-apply the filters from the original table\n // When we add table linking we'll want to listen to the original table and update\n // the copied table with any changes that occur.\n // The table gets owned by the Figure that gets created, which closes the table\n return table.copy().then(tableCopy => {\n tableCopy.applyCustomColumns(table.customColumns);\n tableCopy.applyFilter(table.filter);\n tableCopy.applySort(table.sort);\n\n return dh.plot.Figure.create(\n ChartUtils.makeFigureSettings(settings, tableCopy)\n ).then(figure => new FigureChartModel(figure, settings, theme));\n });\n }\n\n /**\n * Creates a model from the settings provided.\n * Tries to create a Figure in the API with it.\n * @param {Object} settings The chart builder settings\n * @param {boolean} settings.isLinked Whether the newly created chart should stay linked with the original table, update when filters are updated\n * @param {string[]} settings.series The column names to use for creating the series of this chart\n * @param {string} settings.sourcePanelId The panel ID the chart was created from\n * @param {string} settings.type Chart builder type, from ChartBuilder.types\n * @param {string} settings.xAxis The column name to use for the x-axis\n * @param {string[]} settings.hiddenSeries Array of hidden series names\n * @param {dh.Figure} figure The figure to build the model for\n * @param {Object} theme The theme for the figure. Defaults to ChartTheme\n * @returns {Promise<ChartModel | FigureChartModel>} The FigureChartModel representing the figure\n * CRA sets tsconfig to type check JS based on jsdoc comments. It isn't able to figure out FigureChartModel extends ChartModel\n * This causes TS issues in 1 or 2 spots. Once this is TS it can be returned to just FigureChartModel\n */\n static async makeModel(settings, figure, theme = ChartTheme) {\n return new FigureChartModel(figure, settings, theme);\n }\n}\n\nexport default ChartModelFactory;\n"],"file":"ChartModelFactory.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/chart",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.2-beta.10+4063003",
|
|
4
4
|
"description": "Deephaven Chart",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,27 +16,22 @@
|
|
|
16
16
|
"node": ">=10"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "cross-env NODE_ENV=production run-
|
|
20
|
-
"build-dev": "cross-env NODE_ENV=development run-
|
|
21
|
-
"
|
|
22
|
-
"babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward --verbose",
|
|
19
|
+
"build": "cross-env NODE_ENV=production run-p build:*",
|
|
20
|
+
"build-dev": "cross-env NODE_ENV=development run-p build:*",
|
|
21
|
+
"babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward",
|
|
23
22
|
"sass": "sass ./src:./dist",
|
|
24
|
-
"types": "tsc",
|
|
25
23
|
"build:babel": "npm run babel",
|
|
26
24
|
"build:sass": "npm run sass",
|
|
27
|
-
"build:types": "npm run types -- --incremental",
|
|
28
25
|
"watch": "run-p watch:*",
|
|
29
26
|
"watch:babel": "npm run babel -- -w --skip-initial-build",
|
|
30
27
|
"watch:sass": "npm run sass -- --watch --update",
|
|
31
|
-
"watch:types": "npm run types -- -w --incremental --preserveWatchOutput",
|
|
32
|
-
"clean": "rimraf ./dist tsconfig.tsbuildinfo",
|
|
33
28
|
"prestart": "npm run build-dev",
|
|
34
29
|
"start": "cross-env NODE_ENV=development npm run watch"
|
|
35
30
|
},
|
|
36
31
|
"dependencies": {
|
|
37
|
-
"@deephaven/icons": "^0.9.
|
|
38
|
-
"@deephaven/iris-grid": "^0.9.
|
|
39
|
-
"@deephaven/jsapi-shim": "^0.9.
|
|
32
|
+
"@deephaven/icons": "^0.9.2-beta.10+4063003",
|
|
33
|
+
"@deephaven/iris-grid": "^0.9.2-beta.10+4063003",
|
|
34
|
+
"@deephaven/jsapi-shim": "^0.9.2-beta.10+4063003",
|
|
40
35
|
"deep-equal": "^2.0.4",
|
|
41
36
|
"lodash.debounce": "^4.0.8",
|
|
42
37
|
"memoize-one": "^5.1.1",
|
|
@@ -51,9 +46,9 @@
|
|
|
51
46
|
},
|
|
52
47
|
"devDependencies": {
|
|
53
48
|
"@babel/cli": "^7.16.0",
|
|
54
|
-
"@deephaven/log": "^0.9.
|
|
55
|
-
"@deephaven/mocks": "^0.9.
|
|
56
|
-
"@deephaven/tsconfig": "^0.9.
|
|
49
|
+
"@deephaven/log": "^0.9.2-beta.10+4063003",
|
|
50
|
+
"@deephaven/mocks": "^0.9.2-beta.10+4063003",
|
|
51
|
+
"@deephaven/tsconfig": "^0.9.2-beta.10+4063003",
|
|
57
52
|
"@types/react": "^16.14.8",
|
|
58
53
|
"@types/react-dom": "^16.9.13",
|
|
59
54
|
"cross-env": "^7.0.2",
|
|
@@ -72,5 +67,5 @@
|
|
|
72
67
|
"publishConfig": {
|
|
73
68
|
"access": "public"
|
|
74
69
|
},
|
|
75
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "406300380f004aab72325afb691a20856d2bbd7d"
|
|
76
71
|
}
|
package/dist/Chart.module.css
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
.plotly-notifier {
|
|
2
|
-
margin-right: 15px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.plotly-notifier .notifier-note {
|
|
6
|
-
border: 0 !important;
|
|
7
|
-
border-radius: 2px !important;
|
|
8
|
-
background: #555356 !important;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.chart-wrapper {
|
|
12
|
-
background: #2d2a2e;
|
|
13
|
-
}
|
|
14
|
-
.chart-wrapper .plot-container .cartesianlayer text {
|
|
15
|
-
user-select: none;
|
|
16
|
-
}
|
|
17
|
-
.chart-wrapper .plot-container .hovertext path,
|
|
18
|
-
.chart-wrapper .plot-container .axistext path {
|
|
19
|
-
stroke: none !important;
|
|
20
|
-
}
|
|
21
|
-
.chart-wrapper .plot-container .axistext path {
|
|
22
|
-
fill: #555356 !important;
|
|
23
|
-
box-shadow: 4px 4px #1a171a;
|
|
24
|
-
}
|
|
25
|
-
.chart-wrapper .plot-container .zoomlayer .zoombox {
|
|
26
|
-
fill: rgba(0, 0, 0, 0.5) !important;
|
|
27
|
-
}
|
|
28
|
-
.chart-wrapper .plot-container .zoomlayer .zoombox-corners {
|
|
29
|
-
fill: #f0f0ee;
|
|
30
|
-
stroke: #211f22;
|
|
31
|
-
}
|
|
32
|
-
.chart-wrapper .js-plotly-plot .plotly [data-title]::before {
|
|
33
|
-
border-color: transparent transparent #403e41;
|
|
34
|
-
z-index: 1002;
|
|
35
|
-
}
|
|
36
|
-
.chart-wrapper .js-plotly-plot .plotly [data-title]::after {
|
|
37
|
-
border-radius: 4px;
|
|
38
|
-
background: #403e41;
|
|
39
|
-
color: #f0f0ee;
|
|
40
|
-
padding: 0.25rem 0.5rem;
|
|
41
|
-
box-shadow: 0 0.1rem 1.5rem 0.1rem rgba(26, 23, 26, 0.8);
|
|
42
|
-
z-index: 1001;
|
|
43
|
-
}
|
|
44
|
-
.chart-wrapper .js-plotly-plot .plotly .modebar {
|
|
45
|
-
z-index: auto;
|
|
46
|
-
}
|
|
47
|
-
.chart-wrapper .js-plotly-plot .plotly .modebar .modebar-btn[data-title="Downsampling in progress..."] svg {
|
|
48
|
-
animation: fa-spin 2s infinite linear;
|
|
49
|
-
}
|
|
50
|
-
.chart-wrapper .js-plotly-plot .plotly .modebar .modebar-btn[data-title="Downsampling enabled, click to disable"] svg path {
|
|
51
|
-
fill: rgba(255, 255, 255, 0.7) !important;
|
|
52
|
-
}
|
|
53
|
-
.chart-wrapper .js-plotly-plot .plotly .modebar .modebar-btn[data-title^="Downsampling failed"] svg path {
|
|
54
|
-
fill: #f37e3f !important;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* stylelint-disable property-no-unknown */
|
|
58
|
-
:export {
|
|
59
|
-
title-downsampling-in-progress: Downsampling in progress...;
|
|
60
|
-
title-downsampling-failed: Downsampling failed;
|
|
61
|
-
title-downsampling-enabled: Downsampling enabled, click to disable;
|
|
62
|
-
title-downsampling-disabled: Downsampling disabled, click to enable;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/*# sourceMappingURL=Chart.module.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../src/Chart.scss","../../components/scss/bootstrap_overrides.scss","../src/Chart.module.scss"],"names":[],"mappings":"AAYA;EACE,cAV6B;;;AAa/B;EAIE;EACA;EACA;;;AAGF;EACE,YCfc;;ADkBZ;EACE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE,MCnCW;EDoCX,QCtBK;;AD2BT;EACE;EAGA;;AAGF;EACE,eC2DY;ED1DZ,YCvCO;EDwCP,OCnDa;EDoDb;EACA,YCgHiB;ED7GjB;;AAGF;EAEE;;AAKI;EACE;;AAMA;EACE;;AAOF;EACE;;;AE5FZ;AACA;EACE;EACA;EACA;EACA","file":"Chart.module.css"}
|