      }
            }

            for(i in totalsBtc) {
                if(totalsBtc[i] > maxYBtc) maxYBtc = totalsBtc[i];
                if(totalsScrypt[i] > maxYScrypt) maxYScrypt = totalsScrypt[i];
            }
            console.log(maxYBtc, maxYScrypt)

            yLinear = d3.scale.linear()
                    .domain([0, maxYBtc * 1.5])
                    .range([height, 0]);

            yLinear2 = d3.scale.linear()
                    .domain([0, maxYScrypt * 1.5])
                    .range(