1

I am facing a strange behaviour of line graph (using amCharts library). I am passing pretty straight forward data array to create chart while the chart draws some random curves anywhere in the trend line. The data i am passing is exactly :

{date: "2016-02-17", value2: "2.00"}
{date: "2016-03-17", value2: "2.00"}
{date: "2017-01-17", value2: "4.33"}
{date: "2017-02-17", value2: "4.33"}
{date: "2017-07-17", value2: "3.20"}
{date: "2017-08-17", value2: "3.20"}

and the graph i get with this data is shown in the attached image. What can be the problem here? enter image description here

Usman Iftakhar
  • 278
  • 5
  • 17

1 Answers1

1

Unfortunately it's a bug when using the smoothedLine graph type with date-based data. It's being looked at but a workaround you can try is setting equalSpacing to true in the categoryAxis

categoryAxis: {
  // ...
  equalSpacing: true,
  // ...
}

This usually fixes the issue at the expense of changing how your categoryAxis looks with equalSpacing enabled. If it still doesn't help, you'll have to resort to using the regular line type until it gets fixed.

xorspark
  • 15,749
  • 2
  • 29
  • 38
  • Well i needed the smooth line graph and equalSpacing is ruining my graph so still waiting if some better option or solution comes. – Usman Iftakhar Aug 25 '17 at 12:00
  • Unfortunately it's going to be a while before it gets fixed. Sorry. If we make any progress, I'll remember to ping you through this thread. – xorspark Aug 25 '17 at 13:17