- var plot1 = $.jqplot ('chart', [data_chart], {
- title: 'Daily Download Count',
- axes: {
- xaxis: {
- renderer:$.jqplot.DateAxisRenderer,
- tickOptions:{formatString:'%Y/%m/%d'},
- min: min_date,
- max: max_date
- },
- yaxis: {
- min: 0
- }
- },
- series: [{lineWidth:1,showMarker:false}]
- });
+ $.each(ddts, function(i, item) {
+ var tm = item["time"];
+ var d = new Date(tm[0], tm[1]-1, tm[2]);
+ var entry = [d, item["value"]];
+ data_chart.push(entry);
+
+ if (max_date == null || max_date < d) {
+ max_date = d;
+ }
+
+ if (min_date == null || min_date > d) {
+ min_date = d;
+ }
+ });
+
+ var plot1 = $.jqplot ('chart', [data_chart], {
+ title: 'Daily Download Count',
+ axes: {
+ xaxis: {
+ renderer:$.jqplot.DateAxisRenderer,
+ tickOptions:{formatString:'%Y/%m/%d'},
+ min: min_date,
+ max: max_date
+ },
+ yaxis: {
+ min: 0
+ }
+ },
+ series: [{lineWidth:1,showMarker:false}]
+ });