For example ;
I want to draw graphics using widget-38.js file.
protected override Task OnInitializedAsync()
{
return base.OnInitializedAsync();
}
method in widget-38.js file data: [54, 42, 75, 110, 23, 87, 50] and categories: ['E2E', 'IMC', 'SSMC', 'SSBD', 'ICCD', ' PAN', 'SBN'], how can I send data as parameter in OnInitializedAsync in method.
Hi,
I guess that you do not need to add your data as a parameter for OnInitializedAsync.
Firstly, you need to fetch data from your data source, and then you can use fetched data for widget configuration.
You can check the example in Starterkit/Pages/FetchData.razor.
I want to show data graphically. How can I send the data I have obtained to the js file. Graphical data exists in js files by default. I want to send data as parameter to js file.
You can add parameters for the js init function.
init: function (data, categories) {
...
}
await JS.InvokeVoidAsync("KTChartsWidget38.init", data, categories);
My problem still persists. I'm waiting for your help