--- a/heuristics/viewHeuristicsColormap.php +++ b/heuristics/viewHeuristicsColormap.php @@ -1,5 +1,11 @@ <?php include_once("../lib/common.inc.php"); + echo '<style> + div { + padding: 5px; + display: inline-block; + } + </style>'; // http://www.herethere.net/~samson/php/color_gradient/color_gradient_generator.php.txt // return the interpolated value between pBegin and pEnd function interpolate($pBegin, $pEnd, $pStep, $pMax) @@ -42,13 +48,13 @@ $maxVal = $r[0]; $query = "SELECT sum(heuristic_value) as sum, CNID -FROM `heuristic_results` group by CNID order by sum DESC LIMIT 30"; +FROM `heuristic_results` group by CNID order by sum DESC LIMIT 300"; $result = mysql_query($query); if (!$result) echo mysql_error().$query; while ($r = mysql_fetch_array($result, MYSQL_BOTH)) { - echo '<span style="background: #'.$Gradients[floor(($r['sum']/$maxVal) * 10)].'; padding: 5px;">'; + echo '<div style="background: #'.$Gradients[floor(($r['sum']/$maxVal) * 10)].';">'; echo '<a title="'.$r['sum'].'" href="../displayContract.php?CNID='.$r['CNID'].'">X</a>'; - echo "</span>"; + echo "</div>"; } ?>