(chart, projectId, user, noSource)
| 1017 | } |
| 1018 | |
| 1019 | previewChart(chart, projectId, user, noSource) { |
| 1020 | return this.getPreviewData(chart, projectId, user, noSource) |
| 1021 | .then((data) => { |
| 1022 | if (chart.type === "table") { |
| 1023 | return dataExtractor(chart); |
| 1024 | } |
| 1025 | |
| 1026 | const axisChart = new AxisChart(data); |
| 1027 | return axisChart.plot(); |
| 1028 | }) |
| 1029 | .then((chartData) => { |
| 1030 | return new Promise((resolve) => resolve(chartData)); |
| 1031 | }) |
| 1032 | .catch((error) => { |
| 1033 | return new Promise((resolve, reject) => reject(error)); |
| 1034 | }); |
| 1035 | } |
| 1036 | |
| 1037 | getChartData(id) { |
| 1038 | let gChartData; |
no test coverage detected