MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / getChartData

Method getChartData

server/controllers/ChartController.js:1037–1055  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

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)

Callers 1

runRequestMethod · 0.95

Calls 3

findByIdMethod · 0.95
plotMethod · 0.95
updateMethod · 0.95

Tested by

no test coverage detected