I'm making a graph where on the XAxis there is category for each hour of the day.
Then I format the XPoint on the data to be the same as the category but the data still goes into the wrong category when displayed.
I create a list for all the categories and apply it:
private List<string> _categories = Enumerable.Range(0, 24).Select(x => _from.AddHours(x).ToString("HH:00")).ToList();
_options.Xaxis = new XAxis
{
Title = new AxisTitle
{
Text = ClientTranslations.Time
},
Categories = _categories
};
<ApexChart @ref="_chart" TItem="MyData"
Options="_options"
Height="500"
Debug="true">
@foreach (var series in _graphData)
{
<ApexPointSeries TItem="MyData"
Items="@series.Data"
Name="@series.Name"
XValue="@(x => x.CreatedAt.ToString("HH:00"))"
YAggregate="@(x => x.Sum(x => x.Weight))"
SeriesType="SeriesType.Bar"/>
}
</ApexChart>
This will display in the debugger as:
But the data is in the wrong category as we can see on the chart:
I'm making a graph where on the XAxis there is category for each hour of the day. Then I format the XPoint on the data to be the same as the category but the data still goes into the wrong category when displayed. I create a list for all the categories and apply it:
This will display in the debugger as:![image](https://github.com/apexcharts/Blazor-ApexCharts/assets/70661843/b74c6b52-2c22-406d-83af-f613fe15af99)
But the data is in the wrong category as we can see on the chart:![image](https://github.com/apexcharts/Blazor-ApexCharts/assets/70661843/ffe92b30-a9e3-48e3-9d6a-eed4d87069c8)