Closed meronz closed 8 months ago
This is done to correctly show the tooltip values.
I fixed it by checking the undefined values in the blazor_apexcharts.js wrapper. Not sure if this is the correct way of doing this.
Screenshot of the exception:
Create a chart with FormatYAxisLabel set. Full example:
<ApexChart TItem="TestItem" Title="SeriesType.Pie" FormatYAxisLabel="MyFormatYAxisLabel"> <ApexPointSeries TItem="TestItem" Items="Items" Name="Gross Value" SeriesType="@type" XValue="@(e => e.Id)" YValue="@(e => e.Value)"/> </ApexChart> @code { public record TestItem(string Id, decimal? Value); public TestItem[] Items => new[] { new TestItem("1", 1.0m), new TestItem("2", 2.123m), new TestItem("3", 3.123m), new TestItem("4", null), new TestItem("5", 5.123m), }; private string MyFormatYAxisLabel(decimal arg) { return arg.ToString("c"); // should format to euros } }
This is done to correctly show the tooltip values.
Bug info
I fixed it by checking the undefined values in the blazor_apexcharts.js wrapper. Not sure if this is the correct way of doing this.
Screenshot of the exception:
Steps to reproduce:
Create a chart with FormatYAxisLabel set. Full example: