Reputation: 29
I created an amCharts Stock Chart based on a date axis to show inventory quantity. Although I have 4 data entries in my dataset, only 2 dates are shown in the graph.
Here is my problem in JSFiddle : amCharts Stock Chart Example
[
{
"Date": "2018-01-30T23:00:00Z",
"DateText": "31.01.2018",
"Qty": 32
},
{
"Date": "2018-01-30T23:00:00Z",
"DateText": "31.01.2018",
"Qty": 74
},
{
"Date": "2018-09-10T22:00:00Z",
"DateText": "11.09.2018",
"Qty": 74
},
{
"Date": "2018-09-10T22:00:00Z",
"DateText": "11.09.2018",
"Qty": 49
}
]
Upvotes: 1
Views: 517
Reputation: 29
Here is the solution from amCharts support :
Stock charts group data by default when the interval exceeds a certain time period. In the other example the data points were all within a shorter time period so no grouping was happening. But when they are months away, the grouping happens by default. You can turn it off by adding these lines to your chart settings:
acp.categoryAxesSettings = {
maxSeries: 0
}
Link to documentation:
https://docs.amcharts.com/3/javascriptstockchart/CategoryAxesSettings#maxSeries
Upvotes: 1