zed
zed

Reputation: 3267

amCharts: Set value 0 if no data is available on that date

How can I set value is zero if that date data doesn't exist? Do I have to do it in PHP? Or can it be easily done using AmCharts?

Value is not zero

Upvotes: 2

Views: 2141

Answers (2)

frubby
frubby

Reputation: 21

I use graph.connect;

http://docs.amcharts.com/3/javascriptcharts/AmGraph#connect

but if period is not one,example(15min,15second) ,u must also set minPeriod. http://docs.amcharts.com/3/javascriptcharts/CategoryAxis#minPeriod

example:jsfiddle.net/fruwei/fwazw2fx/

Upvotes: 0

Anurag
Anurag

Reputation: 128

You can directly do it from AMCharts.

var chart = new AmCharts.AmSerialChart();
chart.connect= false;

this line will avoid joining points if the value is missing. Defalut is true.

Upvotes: 2

Related Questions