Пофиксил графики

This commit is contained in:
Pavel Torbeev 2023-08-27 09:17:50 +03:00
parent e69d9aff48
commit dee5ca6f50
3 changed files with 12 additions and 3 deletions

View File

@ -20,7 +20,10 @@ export const generateFinancialChart = (rootId: string, [cac, ltv]: [number, numb
aspectRatio: 2, aspectRatio: 2,
animation: { animation: {
onComplete: function () { onComplete: function () {
callback(chart.toBase64Image()); setTimeout(() => {
const image = chart?.toBase64Image() || 'data:image/png;base64,i';
callback(image);
}, 1000);
}, },
}, },
}, },

View File

@ -24,7 +24,10 @@ export const generateGrowChart = (rootId: string, [company_value, future_value,
aspectRatio: 2, aspectRatio: 2,
animation: { animation: {
onComplete: function () { onComplete: function () {
callback(chart.toBase64Image()); setTimeout(() => {
const image = chart?.toBase64Image() || 'data:image/png;base64,i';
callback(image);
}, 1000);
}, },
}, },
}, },

View File

@ -20,7 +20,10 @@ export const generateMarketChart = (rootId: string, [tam, sam, som]: [number, nu
aspectRatio: 2, aspectRatio: 2,
animation: { animation: {
onComplete: function () { onComplete: function () {
callback(chart.toBase64Image()); setTimeout(() => {
const image = chart?.toBase64Image() || 'data:image/png;base64,i';
callback(image);
}, 1000);
}, },
}, },
}, },