1👍
JsonResult "formats the given result as JSON."
By giving it a JSON string, you end up sending a double-serialized value to the browser. So even after jQuery deserializes it, you still end up with a string rather than an object.
So rather than passing JsonResult
the serialized string representation, just give it the object you want to have serialized.
return new JsonResult(ds);
- [Chartjs]-In chart.js, Is it possible to hide x-axis label/text of bar chart if accessing from mobile?
- [Chartjs]-How to remove X and Y axis with react-chartjs-2
Source:stackexchange.com