Skip to content

Commit

Permalink
🎨 improve chart render
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmyth committed Feb 20, 2021
1 parent 82b476b commit e2d5e6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions module/js/ccsun.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ if (!fs.existsSync('./temp/')) fs.mkdirSync('./temp/');
const waitForSelectorOptions = {
timeout: 1600
}
await page.waitForSelector('#container .highcharts-container', waitForSelectorOptions).then(async () => {
await setTimeout(async () => {
await page.waitForSelector('#container .highcharts-container', waitForSelectorOptions).then(async () => {
await page.waitForSelector('#container2 .highcharts-container', waitForSelectorOptions).then(async () => {
await page.screenshot({path: filename, quality: 76});
await page.screenshot({path: filename, quality: 76})
})
}).catch(async reject => {
console.log('[Error waitForSelector]')
console.log(reject)
await browser.close();
})
await browser.close();
}, 600)
})();

0 comments on commit e2d5e6c

Please sign in to comment.