Ariovaldo

Data included in the date do not appear in the chart

Recommended Posts

 

Hello, I am working on a line chart, where I have a problem on the date. I used ajax to return a json and apparently the json is returning correctly, but only the "look" of the graph appears, the information does not. Following photos for better analysis.

My Code:

5e39c45628c52_2020-02-0416_20_54-WebApplication1(Running)-MicrosoftVisualStudio.thumb.png.8a1d28301a85f54bbf8ed9bd27f96154.png

 

Return Json (picture of Postman and Inspect Chrome)

 

5e39c4a60b341_2020-02-0416_22_40-Postman.png.3710fc6a5e8772ad1ff4c6977eae073b.png     5e39c4d3e3cd2_2020-02-0416_23_28-localhost_64571_WebForm1_aspx.png.82287d95ff4e1e5040e4cf746f81d7c1.png

 

 

I really don't know what can be divergent, thanks!

Share this post


Link to post
Share on other sites

Hi Ariovaldo,

 

The fetched result is being provided to the data as a string instead of an array of objects, hence you are not getting the data visualized on the chart. You need to provide the data as an JSON array of objects.

Check the below fiddles for the difference :

Data as a string - https://jsfiddle.net/oam641cd/

Data as array of objects - https://jsfiddle.net/w1ar2gzL/

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now