Difference between revisions of "Team:Hong Kong UCCKE/Results"

Line 103: Line 103:
 
             text: 'Responsive Index of Diacetyl',
 
             text: 'Responsive Index of Diacetyl',
 
             fontSize: 15,
 
             fontSize: 15,
         }
+
         },
    },
+
 
 +
 
 +
 
 +
 
 +
 
 +
 
  
  
 
  
 
animation: {
 
animation: {
            duration: 500,
+
    onComplete: function() {
            easing: "easeOutQuart",
+
    var ctx = this.chart.ctx;
            onComplete: function () {
+
    ctx.textAlign = "center";
                var ctx = this.chart.ctx;
+
    ctx.textBaseline = "bottom";
                ctx.font = Chart.helpers.fontString(Chart.defaults.global.defaultFontFamily, 'normal', Chart.defaults.global.defaultFontFamily);
+
                ctx.textAlign = 'center';
+
                ctx.textBaseline = 'bottom';
+
  
                this.data.datasets.forEach(function (dataset) {
+
    this.chart.config.data.datasets.forEach(function(dataset) {
                    for (var i = 0; i < dataset.data.length; i++) {
+
      ctx.fillStyle = dataset.strokeColor;
                        var model = dataset._meta[Object.keys(dataset._meta)[0]].data[i]._model,
+
      dataset.metaDataset._points.forEach(function(p) {
                            scale_max = dataset._meta[Object.keys(dataset._meta)[0]].data[i]._yScale.maxHeight;
+
      ctx.fillText(p._chart.config.data.datasets[p._datasetIndex].data[p._index], p._model.x, p._model.y - 10);
                        ctx.fillStyle = '#444';
+
      });
                        var y_pos = model.y - 5;
+
    })
                        // Make sure data value does not get overflown and hidden
+
  }
                        // when the bar's value is too close to max value of scale
+
},
                        // Note: The y value is reverse, it counts from top down
+
                        if ((scale_max - model.y) / scale_max >= 0.93)
+
                            y_pos = model.y + 20;  
+
                        ctx.fillText(dataset.data[i], model.x, y_pos);
+
                    }
+
                });             
+
            }
+
        }
+
  
  
Line 139: Line 132:
  
  
 +
 +
 +
 +
 +
    },
  
 
});
 
});

Revision as of 11:14, 3 October 2016

Raw Result of Diacetyl Volatile Test with Index

Chemical Type Concentration # of worms in T # of worms in C Index
Diacetyl Volatile Test 1 10 0 1
Diacetyl Volatile Test 1 80 3 0.927710843
Diacetyl Volatile Test 1 96 2 0.959183673
Diacetyl Volatile Test 1/10 97 8 0.847619048
Diacetyl Volatile Test 1/10 78 9 0.793103448
Diacetyl Volatile Test 1/10 91 6 0.87628866
Diacetyl Volatile Test 1/100 7 4 0.272727273
Diacetyl Volatile Test 1/100 85 54 0.223021583
Diacetyl Volatile Test 1/100 60 32 0.304347826
Diacetyl Volatile Test 1/1000 18 14 0.125
Diacetyl Volatile Test 1/1000 67 45 0.196428571
Diacetyl Volatile Test 1/1000 51 35 0.186046512
Diacetyl Volatile Test 1/10000 13 13 0
Diacetyl Volatile Test 1/10000 27 22 0.102040816
Diacetyl Volatile Test 1/10000 27 24 0.058823529
Diacetyl Volatile Test 1/100000 18 16 0.058823529
Diacetyl Volatile Test 1/100000 32 29 0.049180328
Diacetyl Volatile Test 1/100000 35 31 0.060606061

Raw Result of Cinnemaldehyde Volatile Test with Index

Chemical Type Concentration # of worms in T # of worms in C Index
Cinnemoaldehyde Volatile Test 1 18 75 -0.612903226
Cinnemoaldehyde Volatile Test 1 0 24 -1
Cinnemoaldehyde Volatile Test 1 11 92 -0.786407767
Cinnemoaldehyde Volatile Test 1 9 95 -0.826923077
Cinnemoaldehyde Volatile Test 1/10 10 97 -0.813084112
Cinnemoaldehyde Volatile Test 1/10 3 32 -0.828571429
Cinnemoaldehyde Volatile Test 1/10 13 93 -0.754716981
Cinnemoaldehyde Volatile Test 1/10 11 98 -0.798165138
Cinnemoaldehyde Volatile Test 1/100 6 90 -0.875
Cinnemoaldehyde Volatile Test 1/100 2 38 -0.9
Cinnemoaldehyde Volatile Test 1/100 9 68 -0.766233766
Cinnemoaldehyde Volatile Test 1/100 14 96 -0.745454545
Cinnemoaldehyde Volatile Test 1/1000 27 82 -0.504587156
Cinnemoaldehyde Volatile Test 1/1000 9 28 -0.513513514
Cinnemoaldehyde Volatile Test 1/1000 14 40 -0.481481481
Cinnemoaldehyde Volatile Test 1/1000 17 50 -0.492537313
Cinnemoaldehyde Volatile Test 1/10000 40 35 0.066666667
Cinnemoaldehyde Volatile Test 1/10000 16 28 -0.272727273
Cinnemoaldehyde Volatile Test 1/10000 27 37 -0.15625
Cinnemoaldehyde Volatile Test 1/10000 29 39 -0.147058824
Cinnemoaldehyde Volatile Test 1/100000 34 44 -0.128205128
Cinnemoaldehyde Volatile Test 1/100000 25 37 -0.193548387
Cinnemoaldehyde Volatile Test 1/100000 28 33 -0.081967213
Cinnemoaldehyde Volatile Test 1/100000 32 33 -0.015384615