Open danielchalmers opened 4 months ago
Related: #400
The challenge here is that the formatter functions in apexcharts.js is syncronous. In blazor server we need to make an async request, as far as I know there is no clean way to do this.
Hackish solutions like polling etc is not something we will implement.
If the only goal is to avoid hard-coded JS formatter expression or to provide type-safety with the rest of the .NET codebase, then one (possibly rather unhinged) solution would be making use of System.Linq.Expressions.Expression to "transpile" an actual C# expression into a JS function. This could cover simple use cases like adding a prefix/postfix to the formatted value. But obviously it wouldn't be able to do anything more complex that would rely on actual server-side C# logic.
Currently the .NET formatting option is only available on WASM.
Alternative is to use JavaScript.
Discussion continued from https://github.com/apexcharts/Blazor-ApexCharts/issues/37#issuecomment-1996807246