Closed wolfgangschneider closed 10 months ago
Hello,
Yes, I agree that would be great. If you feel up to it PR's are more then welcome.
Hi
Unfortunately my JS skills are to less to understand the js code.
I was able to load the blazor-apex-charts as module , It able to call “await JSHandler.RenderChartAsync();” that function also worhed well till “chart = new ApexCharts(container, options);” this function goeas deep into the “apexcharts.js” filt , (it still is includes l with the html scriopt tag. And throws an exception chart not defined.
Wolfgang
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: Joakim @.> Sent: Friday, 27 October 2023 10:23 To: @.> Cc: @.>; @.> Subject: Re: [apexcharts/Blazor-ApexCharts] Feature Request: include Js files in a more Blazor like way (Issue #317)
Hello,
Yes, I agree that would be great. If you feel up to it PR's are more then welcome.
— Reply to this email directly, view it on GitHubhttps://github.com/apexcharts/Blazor-ApexCharts/issues/317#issuecomment-1782504163, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADXZ5WQACJYA3ALMYMUFAALYBNVOVAVCNFSM6AAAAAA6SNOR5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGUYDIMJWGM. You are receiving this because you authored the thread.Message ID: @.***>
Hi - I made some changes but I am to stupid to Pull the changes (please advice me) Anyhow here are the changes files
And of course remove bothscript Tags form _host.schtml and Indexhtml
Thank you for the pull request! It's now merged.
Hmm looks like there is a problem https://apexcharts.github.io/Blazor-ApexCharts/events/brush-scrolled
I guess this is related, https://github.com/apexcharts/apexcharts.js/issues/2315
I added window.ApexCharts = ApexCharts and it seems to be working
Fixed in v2.0.0
If its possible with your design it would be nice include the .js files in a more Blazor like style. In my opinion a component should be used in the most simple way:
add using
Blazor has a nice feature to load the JS files in the component itself: var module = await jsRuntime.InvokeAsync("import", "./_content/MyComponents/exampleJsInterop.js");("showPrompt", message);
await module.InvokeAsync