Date format in JSON File / Interval type

When receiving data in a JSON file can the Date be in string format "mm/dd/yyyy" or do they have to be specified as new Date (mm dd yyyy)
when setting the primaryXAxis how can I specify the interval as "Days"

typical JSON I am getting :

[
        {
            "Date": "3/27/2018",
            "Close": "168.34"
        },
        {
            "Date": "3/26/2018",
            "Close": "172.77"
        },
        {
            "Date": "3/23/2018",
            "Close": "164.94"
        },
        {
            "Date": "3/22/2018",
            "Close": "168.845"
        },
        {
            "Date": "3/21/2018",
            "Close": "171.27"
        }
]

1 Reply

BP Baby Palanidurai Syncfusion Team May 13, 2022 12:03 PM UTC

Hi Jawahar,



Greetings from Syncfusion.



We analyzed your query. We are having intervalType property in date axis. You can specify intervalType as Days. Please find the below sample link for your reference.


Sample link: https://stackblitz.com/edit/3asrem?file=index.ts



Kindly revert us, if you have any concerns.


Regards,

Baby.


Loader.
Up arrow icon