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
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:
The text was updated successfully, but these errors were encountered:
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:
But the data is in the wrong category as we can see on the chart:
The text was updated successfully, but these errors were encountered: