Closed heitoreleuterio closed 6 months ago
I'm struggle to run the project with those changes.
I'm struggle to run the project with those changes.
My project has been running with these changes for the last few months without any problems so far. What is happening?
When I run the project, I can see this error:
Uncaught SyntaxError SyntaxError: Unexpected token 'export' at (program) (localhost꞉7194/_content/PSC.Blazor.Components.Chartjs/Chart.js:46:1) Debugging hotkey: Shift+Alt+D (when application has focus) Uncaught SyntaxError SyntaxError: Cannot use 'import.meta' outside a module at (program) (localhost꞉7194/_framework/dotnet.7.0.16.y6degfjxhe.js:8:27)
Are you using NET8? If not, I will release one package for NET7.
I'm using .NET 7 as described in this commit #33a31a1
I've found this article
I had opened a pull request #57, but during the week I worked on some additional changes and fixes. Therefore, I decided to close pull request #57 and open a new one.
Changes:
[1] Legend Labels Filtering e.g:
[2] Scales Ticks' AutoSkip and Font properties e.g:
[3] Tooltip CallbackLabel parameters type fixed:
The parameters were initially defined as int, but the JavaScript wasn't passing integer values. To address this, I changed the type from int[] to decimal[].
[4] Ticks Callback e.g
I've implemented these functionalities following the project structure, but the .NET version needed to be updated to .NET 7 because System.Text.Json in .NET 6 can't handle polymorphic entities. This feature is important to enable the LegendFilterContext to receive generic data that can be parsed into the correct type of chart data.
Note: I realized that my formatting differed from yours in my personal projects. I addressed this in the commit https://github.com/erossini/BlazorChartjs/commit/8361ad61840bad553b945dc07c78a48b8623f0af