Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 71: | Rivi 71: | ||
jw.obstype[ ot ].catsum += 0; | jw.obstype[ ot ].catsum += 0; | ||
} else if ( data.cat == '1' || data.cat == '4' ) { | } else if ( data.cat == '1' || data.cat == '4' ) { | ||
jw.obstype[ ot ].catsum += 1; | jw.obstype[ ot ].catsum += 1/days; | ||
} else { // 2 or 3 | } else { // 2 or 3 | ||
jw.obstype[ ot ].catsum += 2; | jw.obstype[ ot ].catsum += 2/days; | ||
} | } | ||
jw.obstype[ ot ].catcount+ | jw.obstype[ ot ].catcount = jw.obstype[ ot ].catcount + 1/days; | ||
jw.obstype[ ot ].catmean = jw.obstype[ ot ].catsum / jw.obstype[ ot ].catcount; | jw.obstype[ ot ].catmean = jw.obstype[ ot ].catsum / jw.obstype[ ot ].catcount; | ||
} else { | } else { | ||
jw.obstype[ ot ].catsum += parseInt( data.cat ); | jw.obstype[ ot ].catsum += parseInt( data.cat/days ); | ||
jw.obstype[ ot ].catcount+ | jw.obstype[ ot ].catcount = jw.obstype[ ot ].catcount + 1/days; | ||
jw.obstype[ ot ].catmean = jw.obstype[ ot ].catsum / jw.obstype[ ot ].catcount; | jw.obstype[ ot ].catmean = jw.obstype[ ot ].catsum / jw.obstype[ ot ].catcount; | ||
| Rivi 88: | Rivi 88: | ||
} | } | ||
jw.obstype[ ot ].sum += data.val; | jw.obstype[ ot ].sum += data.val / days; | ||
jw.obstype[ ot ].count+ | jw.obstype[ ot ].count = jw.obstype[ ot ].count + 1/days; | ||
jw.obstype[ ot ].mean = jw.obstype[ ot ].sum / jw.obstype[ ot ].count; | jw.obstype[ ot ].mean = jw.obstype[ ot ].sum / jw.obstype[ ot ].count; | ||


