File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 63
63
var data1 = json1 .epidata ;
64
64
var data2 = json2 .epidata ;
65
65
for (var i = 0 ; i < data1 .length ; i++ ) {
66
- var ratio = data1[i].value ;
67
- var count = data2[i].value ;
66
+ var ratio = Math . max ( 0 , data1[i].value ) ;
67
+ var count = Math . max ( 0 , data2[i].value ) ;
68
68
data1[i].ratio = ratio;
69
69
delete data1[i].value ;
70
70
data1[i].count = count;
Original file line number Diff line number Diff line change 100
100
});
101
101
102
102
let currDate = parseTime (date);
103
- let currDateSeven = new Date (). setDate ( currDate . getDate () - 7 );
103
+ let currDateSeven = d3 . timeDay . offset (currDate, - 7 );
104
104
105
105
// peg values to max and min if out of range
106
106
let minMax = calculateSD (sensor);
107
107
let chartMax = minMax[1 ];
108
108
let chartMin = minMax[0 ];
109
+
109
110
for (var i = 0 ; i < data .length ; i++ ) {
110
111
let directionDate = parseTime (data[i].time_value );
111
112
if (directionDate >= currDateSeven && directionDate <= currDate) {
221
222
.style (' stroke-width' , d => (d .time_value == date ? 1 : 1 ))
222
223
.style (' fill' , d => {
223
224
let color = ' #767676' ;
225
+ console .log (d .inDirection );
224
226
if (d .inDirection && signal === ' direction' ) {
225
227
switch (d .direction ) {
226
228
case 1 :
You can’t perform that action at this time.
0 commit comments