You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining RadarOptions with LinearRadialAxis with LinearRadialTicks an error occures.
Which Blazor project type is your bug related to?
Client-Side
Server-Side
Which charts does this bug apply to?
RadarChart
To Reproduce
Steps to reproduce the behavior:
Using this version of ChartJSBlazor '2.0.0'.
Create a RadarChart with RadarOptions with LinearRadialAxis with LinearRadialTicks
See error
Expected behavior
Show RadarChart
Additional context / logging
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: undefined is not a function
TypeError: undefined is not a function
at Array.map (<anonymous>)
at n.convertTicksToLabels
Code example
RadarConfig _config = new RadarConfig()
{
Options = new RadarOptions
{
Responsive = true,
Title = new OptionsTitle
{
Display = true,
Padding = 0,
FontSize = 20,
FontColor = "white",
Text = "Loading ..."
},
Scale = new LinearRadialAxis()
{
Ticks = new LinearRadialTicks
{
}
}
}
};
if (!config.options.scale.ticks.callback) {
delete config.options.scale.ticks.callback; // undefined != deleted, Chart.js throws an error if it's undefined so we have to delete it
}
The text was updated successfully, but these errors were encountered:
With this null vs undefined vs deleted hell, it's really easy to miss bugs like that. I have very little time at the moment but I'll make sure to release a patch when I do get time.
Describe the bug
When defining RadarOptions with LinearRadialAxis with LinearRadialTicks an error occures.
Which Blazor project type is your bug related to?
Which charts does this bug apply to?
RadarChart
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Show RadarChart
Additional context / logging
Code example
Fix:
Add following code to ChartJsInterop.ts after line 248
The text was updated successfully, but these errors were encountered: