Hi,
I'm getting an exception "Step must be a number" when opening a line chart page with Step defined for RadzenCategoryAxis.
My .razor is as follows:
<RadzenChart Style="width: 100%; height: 600px;">
@foreach (var graph in graphs)
{
<RadzenLineSeries Smooth="@graph.Smooth" Data="@graph.Values" CategoryProperty="Timestamp" ValueProperty="ScaledValue" Title="@graph.Tag" Stroke="@graph.Color"
StrokeWidth="@graph.Width" LineType="@graph.Style">
<TooltipTemplate Context="data">
<div class="row">
<div class="col-6"><strong>@data.Graph.Tag</strong></div>
<div class="col-6 text-right"><strong>@data.Value.ToString("F3")</strong></div>
</div>
<div class="row">
<div class="col"><i>@data.Timestamp.ToString("yyyy-MM-dd HH:mm:ss.fff")</i></div>
</div>
</TooltipTemplate>
</RadzenLineSeries>
}
<RadzenCategoryAxis Stroke="#ffffff80" FormatString="{0:yyyy-MM-dd HH:mm:ss.fff}" Step="@GraphStepTime">
<RadzenTicks Stroke="#ffffff80" StrokeWidth="2" />
<RadzenGridLines Visible="true" />
</RadzenCategoryAxis>
<RadzenValueAxis Formatter="@FormatAsZeroDecimal" Stroke="#ffffff80" Min="@GraphMinY" Max="@GraphMaxY" Step="@GraphStepY">
<RadzenGridLines Visible="true" />
@*<RadzenAxisTitle Text="" />*@
<RadzenTicks Stroke="#ffffff80" StrokeWidth="2" />
</RadzenValueAxis>
<RadzenLegend Visible="true" Position="LegendPosition.Bottom" />
<RadzenTooltipOptions Visible="true"></RadzenTooltipOptions>
</RadzenChart>
It does not matter whatever value I specify for the GraphStepTime variable (which is a TimeSpan), the exception still occurs. This happens in the latest version v2.18.3 as well.
All the other bindings work fine, and I'm able to use the line chart when I quote out the Step="@GraphStepTime" definition from the .razor file. It's just that like you can see from the code above, I'm requiring full timestamp strings yyyy-MM-dd HH:mm:ss.fff on the category axis, so by default, there are too many steps drawn and the texts become unreadable, overlapping each other a lot, as you can see below.
Please assist.