Skip to content

Commit 0e99295

Browse files
committed
add todos
1 parent b180fd6 commit 0e99295

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/support/Chart.ts

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ export function scheme<T extends { key: string; color?: ChartColor }>(
6969

7070
export async function exportAsPng(_el: any, fileName = 'chart.png', delay = 0): Promise<void> {
7171
if (!_el) { return }
72+
73+
// TODO: automatically wait for chart to be ready
7274
await new Promise((resolve) => setTimeout(resolve, delay))
7375

7476
const el = '$el' in _el ? _el.$el : _el
@@ -77,6 +79,7 @@ export async function exportAsPng(_el: any, fileName = 'chart.png', delay = 0):
7779
const SCard = el.closest('.SCard')
7880
if (!(SCard instanceof HTMLElement)) { return }
7981

82+
// TODO: force render in light mode
8083
const canvas = await html2canvas(SCard, {
8184
scale: 2,
8285
backgroundColor: getBackgroundColor(el),

0 commit comments

Comments
 (0)