Commit ab31000f authored by Antonella Giachino's avatar Antonella Giachino
Browse files

Changed expression to calculate weight for heatmap (range 0.3 / 1)

parent 63f3b2f3
......@@ -333,10 +333,10 @@
// perform calculation to get weight between 0 - 1
// apply formule: w = w-min/max-min (http://www.statisticshowto.com/normalized/)
weight = (p.value - minmax.minValue)/(minmax.maxValue-minmax.minValue);
// weight = (p.value - minmax.minValue)/(minmax.maxValue-minmax.minValue);
weight = (((p.value - minmax.minValue)/(minmax.maxValue-minmax.minValue))*(1-0.3))+0.3;
weight = Math.round(weight * 1000) / 1000; //round 3 digits
// if (weight == 0) weight = parseFloat("0.2"); //force weight for minimum values
// console.log("Id ["+ props.id.value + "] - Label [" + minmaxLabel + "] - value [" + p.value + "] - weight [" + weight+ "]");
// console.log("p.value: " + p.value + " - weight: ", weight );
return weight;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment