(id)
| 1035 | } |
| 1036 | |
| 1037 | getChartData(id) { |
| 1038 | let gChartData; |
| 1039 | return this.findById(id) |
| 1040 | .then((chart) => { |
| 1041 | if (chart.type === "table") { |
| 1042 | return dataExtractor(chart); |
| 1043 | } |
| 1044 | |
| 1045 | const axisChart = new AxisChart(chart); |
| 1046 | return axisChart.plot(); |
| 1047 | }) |
| 1048 | .then((chartData) => { |
| 1049 | gChartData = chartData; |
| 1050 | return this.update(id, { chartData: gChartData, chartDataUpdated: moment() }); |
| 1051 | }) |
| 1052 | .then(() => { |
| 1053 | return new Promise((resolve) => resolve(gChartData)); |
| 1054 | }); |
| 1055 | } |
| 1056 | |
| 1057 | exportChartData(userId, chartIds, filters, projectId) { |
| 1058 | const parsedChartIds = Array.isArray(chartIds) |
no test coverage detected