1
votes

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.

amCharts Screenshot

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
  }
]
1
its not clear what you want. you need to add more context in the question, the link to jsFiddle is not enough. - A Khudairy
Duplicate timestamps in the same dataProvider array don't work. Change the timestamps or move the duplicates into a separate dataset similar to the multiple datasets example if the duplicate entries represent a different dataset. - xorspark
only 2 dates are shown in the graph because you do have only to distinct dates! - Roman Koliada
In a second case it is working with mutiple timestamps at the same dates See jsfiddle.net/tdLn3bjm/5. I don't understand why it's not working in the first case... - Felix Brenkel

1 Answers

1
votes

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