DateTimeAxis in Bar Chart not working in 18.4.x

I can't seem to paste the code here but when I do I get this error...
You have tried to enter a word or URL that is not allowed on this site. If you believe that this is inaccurate, please contact us at [email protected].

So I have attached the code as a file.
When trying to render this page with any build from 18.4.x on I get the following error..
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'KUVkIaphIMxAfxx_UTcbM2RMP8HfnYFQeTPyiN4oDVs'.
System.InvalidCastException: Invalid cast from 'DateTime' to 'Double'.
   at System.DateTime.System.IConvertible.ToDouble(IFormatProvider provider)
   at System.Convert.ToDouble(Object value, IFormatProvider provider)
   at Syncfusion.Blazor.Charts.Chart.Internal.ChartSeriesRenderer.PushData(Points point, Int32 i)
   at Syncfusion.Blazor.Charts.Chart.Internal.ChartSeriesRenderer.ProcessJsonData()
   at Syncfusion.Blazor.Charts.Chart.Internal.ChartSeriesRenderer.DataManagerSuccess(Boolean isRemoteData)
   at Syncfusion.Blazor.Charts.SfChart.InitializeDataModule(ChartSeries series)
   at Syncfusion.Blazor.Charts.SfChart.ProcessData(Boolean render, Boolean shouldLoadedTrigger)
   at Syncfusion.Blazor.Charts.SfChart.RenderChart()
   at Syncfusion.Blazor.Charts.SfChart.OnAfterScriptRendered()
   at Syncfusion.Blazor.SfBaseComponent.InvokeScriptRendered()
   at System.Threading.Tasks.Task.<>c.b__139_0(Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
Is this a known issue? If so is there a work around?
Thanks,
Jeff


Attachment: CodeSample_cf0ab5e0.7z

3 Replies 1 reply marked as answer

DG Durga Gopalakrishnan Syncfusion Team January 29, 2021 12:23 PM UTC

Hi Jeffrey,

Greetings from Syncfusion.

We have analyzed your scenario with attached code snippet. By default, x axis supports Double, DateTime, Category, DateTimeCategory and Logarithmic value types and y axis supports only Double and Logarithmic value type. In the snippet, y axis type is specified as DateTime and values passed for y also datetime. 



Please revert us if you have any concerns.

Regards,
Durga G


Marked as answer

JW Jeffrey West January 29, 2021 02:30 PM UTC

This worked in the previous version. Why the change? So now it seems there is no way to have a bar chart with dates on the Y-axis?


DG Durga Gopalakrishnan Syncfusion Team February 1, 2021 01:02 PM UTC

Hi Jeffrey,

As stated earlier, we don't have datetime support for y axis from initial for chart control. Please specify in which version your scenario is achieved and kindly share that sample so that we will check the sample from our end and provide an update.

Regards,
Durga G


Loader.
Up arrow icon