Need More Info
Last Updated: 30 May 2022 12:25 by ADMIN
Brian
Created on: 23 May 2022 17:07
Category: Charts
Type: Bug Report
0
Charts do not display in Chromium, Puppeteer, and other automated tools

Can the dev team comment on any known reasons why Charts (I think both SVG and Canvas) might not display when a blazor page is rendered from an automation tool like Chromium, Puppeteer, etc.? (e.g., https://developers.google.com/web/tools/puppeteer).

I have a standard blazor page that I can manually from a standard Chrome window, and it works fine and the Telerik chart displays.

But the same page, when launched either headless or with a GUI browser window, from a tool like Chromium or Puppeteer (with javascript enabled of course), it seems like the DOM is never dynamically updated to include the chart.

1 comment
ADMIN
Hristian Stefanov
Posted on: 30 May 2022 12:25

Hi Brian,

I suggest trying refreshing the charts to see if it helps at first. Call StateHasChanged() to re-render the charts upon dynamic DOM change. If this does not help, you can also call the chart's .Refesh() method (perhaps after a small timeout). Something like:

await Task.Delay(20);

//redraw the chart
theChart.Refresh();

If neither of these helps, and if it's convenient, please send us a small runnable project that shows the problem. The project will help us see the actual configuration, as we are not familiar with the exact behavior of the automation tools.

Thank you.

Regards,
Hristian Stefanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.