@deephaven/chart 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ChartModelFactory.js"],"names":["dh","ChartUtils","FigureChartModel","ChartModelFactory","settings","table","copy","then","tableCopy","applyCustomColumns","customColumns","applyFilter","filter","applySort","sort","plot","Figure","create","makeFigureSettings","figure"],"mappings":";;;;;;;;;;AAAA,OAAOA,EAAP,MAAe,uBAAf;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,gBAAP,MAA6B,oBAA7B;;IAEMC,iB;;;;;;;;AACJ;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;2FACE,iBAAmCC,QAAnC,EAA6CC,KAA7C;AAAA;AAAA;AAAA;AAAA;AAAA,iDAKSA,KAAK,CAACC,IAAN,GAAaC,IAAb,CAAkB,UAAAC,SAAS,EAAI;AACpCA,kBAAAA,SAAS,CAACC,kBAAV,CAA6BJ,KAAK,CAACK,aAAnC;AACAF,kBAAAA,SAAS,CAACG,WAAV,CAAsBN,KAAK,CAACO,MAA5B;AACAJ,kBAAAA,SAAS,CAACK,SAAV,CAAoBR,KAAK,CAACS,IAA1B;AAEA,yBAAOd,EAAE,CAACe,IAAH,CAAQC,MAAR,CAAeC,MAAf,CACLhB,UAAU,CAACiB,kBAAX,CAA8Bd,QAA9B,EAAwCI,SAAxC,CADK,EAELD,IAFK,CAEA,UAAAY,MAAM;AAAA,2BAAI,IAAIjB,gBAAJ,CAAqBiB,MAArB,EAA6Bf,QAA7B,CAAJ;AAAA,mBAFN,CAAP;AAGD,iBARM,CALT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;AAgBA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;+EACE,kBAAuBA,QAAvB,EAAiCe,MAAjC;AAAA;AAAA;AAAA;AAAA;AAAA,kDACS,IAAIjB,gBAAJ,CAAqBiB,MAArB,EAA6Bf,QAA7B,CADT;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,O;;;;;;;;;;;;;AAKF,eAAeD,iBAAf","sourcesContent":["import dh from '@deephaven/jsapi-shim';\nimport ChartUtils from './ChartUtils';\nimport FigureChartModel from './FigureChartModel';\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 * @returns {Promise<FigureChartModel>} The FigureChartModel representing the figure\n */\n static async makeModelFromSettings(settings, table) {\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));\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 * @returns {Promise<FigureChartModel>} The FigureChartModel representing the figure\n */\n static async makeModel(settings, figure) {\n return new FigureChartModel(figure, settings);\n }\n}\n\nexport default ChartModelFactory;\n"],"file":"ChartModelFactory.js"}
1
+ {"version":3,"sources":["../src/ChartModelFactory.js"],"names":["dh","ChartUtils","FigureChartModel","ChartModelFactory","makeModelFromSettings","settings","table","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;;AAEP,MAAMC,iBAAN,CAAwB;AACtB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACoC,SAArBC,qBAAqB,CAACC,QAAD,EAAWC,KAAX,EAAkB;AAAA;AAClD;AACA;AACA;AACA;AACA,aAAOA,KAAK,CAACC,IAAN,GAAaC,IAAb,CAAkBC,SAAS,IAAI;AACpCA,QAAAA,SAAS,CAACC,kBAAV,CAA6BJ,KAAK,CAACK,aAAnC;AACAF,QAAAA,SAAS,CAACG,WAAV,CAAsBN,KAAK,CAACO,MAA5B;AACAJ,QAAAA,SAAS,CAACK,SAAV,CAAoBR,KAAK,CAACS,IAA1B;AAEA,eAAOf,EAAE,CAACgB,IAAH,CAAQC,MAAR,CAAeC,MAAf,CACLjB,UAAU,CAACkB,kBAAX,CAA8Bd,QAA9B,EAAwCI,SAAxC,CADK,EAELD,IAFK,CAEAY,MAAM,IAAI,IAAIlB,gBAAJ,CAAqBkB,MAArB,EAA6Bf,QAA7B,CAFV,CAAP;AAGD,OARM,CAAP;AALkD;AAcnD;AAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACwB,SAATgB,SAAS,CAAChB,QAAD,EAAWe,MAAX,EAAmB;AAAA;AACvC,aAAO,IAAIlB,gBAAJ,CAAqBkB,MAArB,EAA6Bf,QAA7B,CAAP;AADuC;AAExC;;AA7CqB;;AAgDxB,eAAeF,iBAAf","sourcesContent":["import dh from '@deephaven/jsapi-shim';\nimport ChartUtils from './ChartUtils';\nimport FigureChartModel from './FigureChartModel';\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 * @returns {Promise<FigureChartModel>} The FigureChartModel representing the figure\n */\n static async makeModelFromSettings(settings, table) {\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));\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 * @returns {Promise<FigureChartModel>} The FigureChartModel representing the figure\n */\n static async makeModel(settings, figure) {\n return new FigureChartModel(figure, settings);\n }\n}\n\nexport default ChartModelFactory;\n"],"file":"ChartModelFactory.js"}
@@ -1,127 +1,90 @@
1
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
-
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
4
-
5
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
6
-
7
1
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
2
 
9
3
  import dh from '@deephaven/jsapi-shim';
10
4
 
11
- var ChartTestUtils = /*#__PURE__*/function () {
12
- function ChartTestUtils() {
13
- _classCallCheck(this, ChartTestUtils);
5
+ class ChartTestUtils {
6
+ static makeAxis() {
7
+ var {
8
+ label = 'Axis',
9
+ type = dh.plot.AxisType.X,
10
+ position = dh.plot.AxisPosition.BOTTOM,
11
+ formatType = dh.Axis.FORMAT_TYPE_NUMBER,
12
+ formatPattern = '###,###0.00',
13
+ log = false
14
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
15
+ return new dh.Axis({
16
+ label,
17
+ type,
18
+ position,
19
+ formatType,
20
+ formatPattern,
21
+ log
22
+ });
23
+ }
24
+
25
+ static makeDefaultAxes() {
26
+ return [ChartTestUtils.makeAxis({
27
+ label: ChartTestUtils.DEFAULT_X_TITLE,
28
+ type: dh.plot.AxisType.X
29
+ }), ChartTestUtils.makeAxis({
30
+ label: ChartTestUtils.DEFAULT_Y_TITLE,
31
+ type: dh.plot.AxisType.Y
32
+ })];
14
33
  }
15
34
 
16
- _createClass(ChartTestUtils, null, [{
17
- key: "makeAxis",
18
- value: function makeAxis() {
19
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
20
- _ref$label = _ref.label,
21
- label = _ref$label === void 0 ? 'Axis' : _ref$label,
22
- _ref$type = _ref.type,
23
- type = _ref$type === void 0 ? dh.plot.AxisType.X : _ref$type,
24
- _ref$position = _ref.position,
25
- position = _ref$position === void 0 ? dh.plot.AxisPosition.BOTTOM : _ref$position,
26
- _ref$formatType = _ref.formatType,
27
- formatType = _ref$formatType === void 0 ? dh.Axis.FORMAT_TYPE_NUMBER : _ref$formatType,
28
- _ref$formatPattern = _ref.formatPattern,
29
- formatPattern = _ref$formatPattern === void 0 ? '###,###0.00' : _ref$formatPattern,
30
- _ref$log = _ref.log,
31
- log = _ref$log === void 0 ? false : _ref$log;
35
+ static makeSource(_ref) {
36
+ var {
37
+ axis = ChartTestUtils.makeAxis()
38
+ } = _ref;
39
+ return new dh.SeriesDataSource({
40
+ axis,
41
+ type: axis.type
42
+ });
43
+ }
32
44
 
33
- return new dh.Axis({
34
- label: label,
35
- type: type,
36
- position: position,
37
- formatType: formatType,
38
- formatPattern: formatPattern,
39
- log: log
40
- });
41
- }
42
- }, {
43
- key: "makeDefaultAxes",
44
- value: function makeDefaultAxes() {
45
- return [ChartTestUtils.makeAxis({
46
- label: ChartTestUtils.DEFAULT_X_TITLE,
47
- type: dh.plot.AxisType.X
48
- }), ChartTestUtils.makeAxis({
49
- label: ChartTestUtils.DEFAULT_Y_TITLE,
50
- type: dh.plot.AxisType.Y
51
- })];
52
- }
53
- }, {
54
- key: "makeSource",
55
- value: function makeSource(_ref2) {
56
- var _ref2$axis = _ref2.axis,
57
- axis = _ref2$axis === void 0 ? ChartTestUtils.makeAxis() : _ref2$axis;
58
- return new dh.SeriesDataSource({
59
- axis: axis,
60
- type: axis.type
61
- });
62
- }
63
- }, {
64
- key: "makeDefaultSources",
65
- value: function makeDefaultSources() {
66
- var axes = ChartTestUtils.makeDefaultAxes();
67
- return axes.map(function (axis) {
68
- return ChartTestUtils.makeSource({
69
- axis: axis
70
- });
71
- });
72
- }
73
- }, {
74
- key: "makeSeries",
75
- value: function makeSeries() {
76
- var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
77
- _ref3$name = _ref3.name,
78
- name = _ref3$name === void 0 ? ChartTestUtils.DEFAULT_SERIES_NAME : _ref3$name,
79
- _ref3$plotStyle = _ref3.plotStyle,
80
- plotStyle = _ref3$plotStyle === void 0 ? dh.plot.SeriesPlotStyle.SCATTER : _ref3$plotStyle,
81
- _ref3$sources = _ref3.sources,
82
- sources = _ref3$sources === void 0 ? ChartTestUtils.makeDefaultSources() : _ref3$sources,
83
- _ref3$lineColor = _ref3.lineColor,
84
- lineColor = _ref3$lineColor === void 0 ? null : _ref3$lineColor,
85
- _ref3$shapeColor = _ref3.shapeColor,
86
- shapeColor = _ref3$shapeColor === void 0 ? null : _ref3$shapeColor;
45
+ static makeDefaultSources() {
46
+ var axes = ChartTestUtils.makeDefaultAxes();
47
+ return axes.map(axis => ChartTestUtils.makeSource({
48
+ axis
49
+ }));
50
+ }
87
51
 
88
- return new dh.Series(name, plotStyle, sources, lineColor, shapeColor);
89
- }
90
- }, {
91
- key: "makeChart",
92
- value: function makeChart() {
93
- var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
94
- _ref4$title = _ref4.title,
95
- title = _ref4$title === void 0 ? ChartTestUtils.DEFAULT_CHART_TITLE : _ref4$title,
96
- _ref4$series = _ref4.series,
97
- series = _ref4$series === void 0 ? [ChartTestUtils.makeSeries()] : _ref4$series,
98
- _ref4$axes = _ref4.axes,
99
- axes = _ref4$axes === void 0 ? ChartTestUtils.makeDefaultAxes() : _ref4$axes;
52
+ static makeSeries() {
53
+ var {
54
+ name = ChartTestUtils.DEFAULT_SERIES_NAME,
55
+ plotStyle = dh.plot.SeriesPlotStyle.SCATTER,
56
+ sources = ChartTestUtils.makeDefaultSources(),
57
+ lineColor = null,
58
+ shapeColor = null
59
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
60
+ return new dh.Series(name, plotStyle, sources, lineColor, shapeColor);
61
+ }
100
62
 
101
- return new dh.Chart({
102
- title: title,
103
- series: series,
104
- axes: axes
105
- });
106
- }
107
- }, {
108
- key: "makeFigure",
109
- value: function makeFigure() {
110
- var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
111
- _ref5$title = _ref5.title,
112
- title = _ref5$title === void 0 ? 'Figure' : _ref5$title,
113
- _ref5$charts = _ref5.charts,
114
- charts = _ref5$charts === void 0 ? [ChartTestUtils.makeChart()] : _ref5$charts;
63
+ static makeChart() {
64
+ var {
65
+ title = ChartTestUtils.DEFAULT_CHART_TITLE,
66
+ series = [ChartTestUtils.makeSeries()],
67
+ axes = ChartTestUtils.makeDefaultAxes()
68
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
69
+ return new dh.Chart({
70
+ title,
71
+ series,
72
+ axes
73
+ });
74
+ }
115
75
 
116
- return new dh.plot.Figure({
117
- title: title,
118
- charts: charts
119
- });
120
- }
121
- }]);
76
+ static makeFigure() {
77
+ var {
78
+ title = 'Figure',
79
+ charts = [ChartTestUtils.makeChart()]
80
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
81
+ return new dh.plot.Figure({
82
+ title,
83
+ charts
84
+ });
85
+ }
122
86
 
123
- return ChartTestUtils;
124
- }();
87
+ }
125
88
 
126
89
  _defineProperty(ChartTestUtils, "DEFAULT_CHART_TITLE", 'Chart Title');
127
90
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ChartTestUtils.js"],"names":["dh","ChartTestUtils","label","type","plot","AxisType","X","position","AxisPosition","BOTTOM","formatType","Axis","FORMAT_TYPE_NUMBER","formatPattern","log","makeAxis","DEFAULT_X_TITLE","DEFAULT_Y_TITLE","Y","axis","SeriesDataSource","axes","makeDefaultAxes","map","makeSource","name","DEFAULT_SERIES_NAME","plotStyle","SeriesPlotStyle","SCATTER","sources","makeDefaultSources","lineColor","shapeColor","Series","title","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,CAACuC,KAAP,CAAa;AAAEJ,QAAAA,KAAK,EAALA,KAAF;AAASE,QAAAA,MAAM,EAANA,MAAT;AAAiBhB,QAAAA,IAAI,EAAJA;AAAjB,OAAb,CAAP;AACD;;;WAED,sBAGQ;AAAA,sFAAJ,EAAI;AAAA,8BAFNc,KAEM;AAAA,UAFNA,KAEM,4BAFE,QAEF;AAAA,+BADNK,MACM;AAAA,UADNA,MACM,6BADG,CAACvC,cAAc,CAACwC,SAAf,EAAD,CACH;;AACN,aAAO,IAAIzC,EAAE,CAACI,IAAH,CAAQsC,MAAZ,CAAmB;AAAEP,QAAAA,KAAK,EAALA,KAAF;AAASK,QAAAA,MAAM,EAANA;AAAT,OAAnB,CAAP;AACD;;;;;;gBAxEGvC,c,yBACyB,a;;gBADzBA,c,qBAGqB,Q;;gBAHrBA,c,qBAKqB,Q;;gBALrBA,c,yBAOyB,U;;AAoE/B,eAAeA,cAAf","sourcesContent":["import dh from '@deephaven/jsapi-shim';\n\nclass ChartTestUtils {\n static DEFAULT_CHART_TITLE = 'Chart Title';\n\n static DEFAULT_X_TITLE = 'X Axis';\n\n static DEFAULT_Y_TITLE = 'Y Axis';\n\n static DEFAULT_SERIES_NAME = 'MySeries';\n\n static makeAxis({\n label = 'Axis',\n type = dh.plot.AxisType.X,\n position = dh.plot.AxisPosition.BOTTOM,\n formatType = dh.Axis.FORMAT_TYPE_NUMBER,\n formatPattern = '###,###0.00',\n log = false,\n } = {}) {\n return new dh.Axis({\n label,\n type,\n position,\n formatType,\n formatPattern,\n log,\n });\n }\n\n static makeDefaultAxes() {\n return [\n ChartTestUtils.makeAxis({\n label: ChartTestUtils.DEFAULT_X_TITLE,\n type: dh.plot.AxisType.X,\n }),\n ChartTestUtils.makeAxis({\n label: ChartTestUtils.DEFAULT_Y_TITLE,\n type: dh.plot.AxisType.Y,\n }),\n ];\n }\n\n static makeSource({ axis = ChartTestUtils.makeAxis() }) {\n return new dh.SeriesDataSource({ axis, type: axis.type });\n }\n\n static makeDefaultSources() {\n const axes = ChartTestUtils.makeDefaultAxes();\n return axes.map(axis => ChartTestUtils.makeSource({ axis }));\n }\n\n static makeSeries({\n name = ChartTestUtils.DEFAULT_SERIES_NAME,\n plotStyle = dh.plot.SeriesPlotStyle.SCATTER,\n sources = ChartTestUtils.makeDefaultSources(),\n lineColor = null,\n shapeColor = null,\n } = {}) {\n return new dh.Series(name, plotStyle, sources, lineColor, shapeColor);\n }\n\n static makeChart({\n title = ChartTestUtils.DEFAULT_CHART_TITLE,\n series = [ChartTestUtils.makeSeries()],\n axes = ChartTestUtils.makeDefaultAxes(),\n } = {}) {\n return new dh.Chart({ title, series, axes });\n }\n\n static makeFigure({\n title = 'Figure',\n charts = [ChartTestUtils.makeChart()],\n } = {}) {\n return new dh.plot.Figure({ title, charts });\n }\n}\n\nexport default ChartTestUtils;\n"],"file":"ChartTestUtils.js"}
1
+ {"version":3,"sources":["../src/ChartTestUtils.js"],"names":["dh","ChartTestUtils","makeAxis","label","type","plot","AxisType","X","position","AxisPosition","BOTTOM","formatType","Axis","FORMAT_TYPE_NUMBER","formatPattern","log","makeDefaultAxes","DEFAULT_X_TITLE","DEFAULT_Y_TITLE","Y","makeSource","axis","SeriesDataSource","makeDefaultSources","axes","map","makeSeries","name","DEFAULT_SERIES_NAME","plotStyle","SeriesPlotStyle","SCATTER","sources","lineColor","shapeColor","Series","makeChart","title","DEFAULT_CHART_TITLE","series","Chart","makeFigure","charts","Figure"],"mappings":";;AAAA,OAAOA,EAAP,MAAe,uBAAf;;AAEA,MAAMC,cAAN,CAAqB;AASJ,SAARC,QAAQ,GAOP;AAAA,QAPQ;AACdC,MAAAA,KAAK,GAAG,MADM;AAEdC,MAAAA,IAAI,GAAGJ,EAAE,CAACK,IAAH,CAAQC,QAAR,CAAiBC,CAFV;AAGdC,MAAAA,QAAQ,GAAGR,EAAE,CAACK,IAAH,CAAQI,YAAR,CAAqBC,MAHlB;AAIdC,MAAAA,UAAU,GAAGX,EAAE,CAACY,IAAH,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GAAG7B,EAAE,CAACK,IAAH,CAAQyB,eAAR,CAAwBC,OAFpB;AAGhBC,MAAAA,OAAO,GAAG/B,cAAc,CAACsB,kBAAf,EAHM;AAIhBU,MAAAA,SAAS,GAAG,IAJI;AAKhBC,MAAAA,UAAU,GAAG;AALG,KAMV,uEAAJ,EAAI;AACN,WAAO,IAAIlC,EAAE,CAACmC,MAAP,CAAcR,IAAd,EAAoBE,SAApB,EAA+BG,OAA/B,EAAwCC,SAAxC,EAAmDC,UAAnD,CAAP;AACD;;AAEe,SAATE,SAAS,GAIR;AAAA,QAJS;AACfC,MAAAA,KAAK,GAAGpC,cAAc,CAACqC,mBADR;AAEfC,MAAAA,MAAM,GAAG,CAACtC,cAAc,CAACyB,UAAf,EAAD,CAFM;AAGfF,MAAAA,IAAI,GAAGvB,cAAc,CAACe,eAAf;AAHQ,KAIT,uEAAJ,EAAI;AACN,WAAO,IAAIhB,EAAE,CAACwC,KAAP,CAAa;AAAEH,MAAAA,KAAF;AAASE,MAAAA,MAAT;AAAiBf,MAAAA;AAAjB,KAAb,CAAP;AACD;;AAEgB,SAAViB,UAAU,GAGT;AAAA,QAHU;AAChBJ,MAAAA,KAAK,GAAG,QADQ;AAEhBK,MAAAA,MAAM,GAAG,CAACzC,cAAc,CAACmC,SAAf,EAAD;AAFO,KAGV,uEAAJ,EAAI;AACN,WAAO,IAAIpC,EAAE,CAACK,IAAH,CAAQsC,MAAZ,CAAmB;AAAEN,MAAAA,KAAF;AAASK,MAAAA;AAAT,KAAnB,CAAP;AACD;;AAxEkB;;gBAAfzC,c,yBACyB,a;;gBADzBA,c,qBAGqB,Q;;gBAHrBA,c,qBAKqB,Q;;gBALrBA,c,yBAOyB,U;;AAoE/B,eAAeA,cAAf","sourcesContent":["import dh from '@deephaven/jsapi-shim';\n\nclass ChartTestUtils {\n static DEFAULT_CHART_TITLE = 'Chart Title';\n\n static DEFAULT_X_TITLE = 'X Axis';\n\n static DEFAULT_Y_TITLE = 'Y Axis';\n\n static DEFAULT_SERIES_NAME = 'MySeries';\n\n static makeAxis({\n label = 'Axis',\n type = dh.plot.AxisType.X,\n position = dh.plot.AxisPosition.BOTTOM,\n formatType = dh.Axis.FORMAT_TYPE_NUMBER,\n formatPattern = '###,###0.00',\n log = false,\n } = {}) {\n return new dh.Axis({\n label,\n type,\n position,\n formatType,\n formatPattern,\n log,\n });\n }\n\n static makeDefaultAxes() {\n return [\n ChartTestUtils.makeAxis({\n label: ChartTestUtils.DEFAULT_X_TITLE,\n type: dh.plot.AxisType.X,\n }),\n ChartTestUtils.makeAxis({\n label: ChartTestUtils.DEFAULT_Y_TITLE,\n type: dh.plot.AxisType.Y,\n }),\n ];\n }\n\n static makeSource({ axis = ChartTestUtils.makeAxis() }) {\n return new dh.SeriesDataSource({ axis, type: axis.type });\n }\n\n static makeDefaultSources() {\n const axes = ChartTestUtils.makeDefaultAxes();\n return axes.map(axis => ChartTestUtils.makeSource({ axis }));\n }\n\n static makeSeries({\n name = ChartTestUtils.DEFAULT_SERIES_NAME,\n plotStyle = dh.plot.SeriesPlotStyle.SCATTER,\n sources = ChartTestUtils.makeDefaultSources(),\n lineColor = null,\n shapeColor = null,\n } = {}) {\n return new dh.Series(name, plotStyle, sources, lineColor, shapeColor);\n }\n\n static makeChart({\n title = ChartTestUtils.DEFAULT_CHART_TITLE,\n series = [ChartTestUtils.makeSeries()],\n axes = ChartTestUtils.makeDefaultAxes(),\n } = {}) {\n return new dh.Chart({ title, series, axes });\n }\n\n static makeFigure({\n title = 'Figure',\n charts = [ChartTestUtils.makeChart()],\n } = {}) {\n return new dh.plot.Figure({ title, charts });\n }\n}\n\nexport default ChartTestUtils;\n"],"file":"ChartTestUtils.js"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ChartTheme.js"],"names":["ChartTheme","Object","freeze","paper_bgcolor","plot_bgcolor","title_color","colorway","gridcolor","linecolor","zerolinecolor","activecolor","rangebgcolor","area_color","trend_color","line_color","error_band_line_color","error_band_fill_color","ohlc_increasing","ohlc_decreasing"],"mappings":"AAAA,OAAOA,UAAP;AAEA,eAAeC,MAAM,CAACC,MAAP,CAAc;AAC3BC,EAAAA,aAAa,EAAEH,UAAU,CAAC,eAAD,CADE;AAE3BI,EAAAA,YAAY,EAAEJ,UAAU,CAAC,cAAD,CAFG;AAG3BK,EAAAA,WAAW,EAAEL,UAAU,CAAC,aAAD,CAHI;AAI3BM,EAAAA,QAAQ,EAAEN,UAAU,CAACM,QAJM;AAK3BC,EAAAA,SAAS,EAAEP,UAAU,CAACO,SALK;AAM3BC,EAAAA,SAAS,EAAER,UAAU,CAACQ,SANK;AAO3BC,EAAAA,aAAa,EAAET,UAAU,CAACS,aAPC;AAQ3BC,EAAAA,WAAW,EAAEV,UAAU,CAACU,WARG;AAS3BC,EAAAA,YAAY,EAAEX,UAAU,CAACW,YATE;AAU3BC,EAAAA,UAAU,EAAEZ,UAAU,CAAC,YAAD,CAVK;AAW3Ba,EAAAA,WAAW,EAAEb,UAAU,CAAC,aAAD,CAXI;AAY3Bc,EAAAA,UAAU,EAAEd,UAAU,CAAC,YAAD,CAZK;AAa3Be,EAAAA,qBAAqB,EAAEf,UAAU,CAAC,uBAAD,CAbN;AAc3BgB,EAAAA,qBAAqB,EAAEhB,UAAU,CAAC,uBAAD,CAdN;AAe3BiB,EAAAA,eAAe,EAAEjB,UAAU,CAAC,iBAAD,CAfA;AAgB3BkB,EAAAA,eAAe,EAAElB,UAAU,CAAC,iBAAD;AAhBA,CAAd,CAAf","sourcesContent":["import ChartTheme from './ChartTheme.module.scss';\n\nexport default Object.freeze({\n paper_bgcolor: ChartTheme['paper-bgcolor'],\n plot_bgcolor: ChartTheme['plot-bgcolor'],\n title_color: ChartTheme['title-color'],\n colorway: ChartTheme.colorway,\n gridcolor: ChartTheme.gridcolor,\n linecolor: ChartTheme.linecolor,\n zerolinecolor: ChartTheme.zerolinecolor,\n activecolor: ChartTheme.activecolor,\n rangebgcolor: ChartTheme.rangebgcolor,\n area_color: ChartTheme['area-color'],\n trend_color: ChartTheme['trend-color'],\n line_color: ChartTheme['line-color'],\n error_band_line_color: ChartTheme['error-band-line-color'],\n error_band_fill_color: ChartTheme['error-band-fill-color'],\n ohlc_increasing: ChartTheme['ohlc-increasing'],\n ohlc_decreasing: ChartTheme['ohlc-decreasing'],\n});\n"],"file":"ChartTheme.js"}
1
+ {"version":3,"sources":["../src/ChartTheme.js"],"names":["ChartTheme","Object","freeze","paper_bgcolor","plot_bgcolor","title_color","colorway","gridcolor","linecolor","zerolinecolor","activecolor","rangebgcolor","area_color","trend_color","line_color","error_band_line_color","error_band_fill_color","ohlc_increasing","ohlc_decreasing"],"mappings":"OAAOA,U;AAEP,eAAeC,MAAM,CAACC,MAAP,CAAc;AAC3BC,EAAAA,aAAa,EAAEH,UAAU,CAAC,eAAD,CADE;AAE3BI,EAAAA,YAAY,EAAEJ,UAAU,CAAC,cAAD,CAFG;AAG3BK,EAAAA,WAAW,EAAEL,UAAU,CAAC,aAAD,CAHI;AAI3BM,EAAAA,QAAQ,EAAEN,UAAU,CAACM,QAJM;AAK3BC,EAAAA,SAAS,EAAEP,UAAU,CAACO,SALK;AAM3BC,EAAAA,SAAS,EAAER,UAAU,CAACQ,SANK;AAO3BC,EAAAA,aAAa,EAAET,UAAU,CAACS,aAPC;AAQ3BC,EAAAA,WAAW,EAAEV,UAAU,CAACU,WARG;AAS3BC,EAAAA,YAAY,EAAEX,UAAU,CAACW,YATE;AAU3BC,EAAAA,UAAU,EAAEZ,UAAU,CAAC,YAAD,CAVK;AAW3Ba,EAAAA,WAAW,EAAEb,UAAU,CAAC,aAAD,CAXI;AAY3Bc,EAAAA,UAAU,EAAEd,UAAU,CAAC,YAAD,CAZK;AAa3Be,EAAAA,qBAAqB,EAAEf,UAAU,CAAC,uBAAD,CAbN;AAc3BgB,EAAAA,qBAAqB,EAAEhB,UAAU,CAAC,uBAAD,CAdN;AAe3BiB,EAAAA,eAAe,EAAEjB,UAAU,CAAC,iBAAD,CAfA;AAgB3BkB,EAAAA,eAAe,EAAElB,UAAU,CAAC,iBAAD;AAhBA,CAAd,CAAf","sourcesContent":["import ChartTheme from './ChartTheme.module.scss';\n\nexport default Object.freeze({\n paper_bgcolor: ChartTheme['paper-bgcolor'],\n plot_bgcolor: ChartTheme['plot-bgcolor'],\n title_color: ChartTheme['title-color'],\n colorway: ChartTheme.colorway,\n gridcolor: ChartTheme.gridcolor,\n linecolor: ChartTheme.linecolor,\n zerolinecolor: ChartTheme.zerolinecolor,\n activecolor: ChartTheme.activecolor,\n rangebgcolor: ChartTheme.rangebgcolor,\n area_color: ChartTheme['area-color'],\n trend_color: ChartTheme['trend-color'],\n line_color: ChartTheme['line-color'],\n error_band_line_color: ChartTheme['error-band-line-color'],\n error_band_fill_color: ChartTheme['error-band-fill-color'],\n ohlc_increasing: ChartTheme['ohlc-increasing'],\n ohlc_decreasing: ChartTheme['ohlc-decreasing'],\n});\n"],"file":"ChartTheme.js"}