Commit 9e5c3495 authored by Sven Franck's avatar Sven Franck

fixed colors of graph series

parent 5b6a2378
......@@ -22,7 +22,7 @@
#results_list .start_over .ui-btn-inner { padding-top: 11px; padding-bottom: 11px; }
/* graph */
#results_list #graph_container_cell { min-height:360px; padding: .25em; max-width: 80%; margin: 0 auto;}
#results_list #graph_container_cell { min-height:360px; padding: .25em; max-width: 80%; margin: 2em auto;}
/* popups */
.ui-collapsible-popup {padding: 0;}
.ui-collapsible-popup .ui-collapsible-set-horizontal .ui-collapsible-content {margin-top: -15px; border:0 none; padding: 0;}
......@@ -210,26 +210,28 @@
makeColors = function (array, get, axis) {
var pos, colorObject = {}, colorArray = [];
if (get === "max") {
pos = arrayMax(array);
} else {
pos = arrayMin(array);
}
for (i = 0; i < array.length; i += 1) {
if (array[i] === pos || array.length === 1) {
colorArray.push("#2DBCF8");
} else {
colorArray.push("#ccc");
}
}
colorObject.series_colors = colorArray;
//if (get === "max") {
// pos = arrayMax(array);
//} else {
// pos = arrayMin(array);
//}
// highlight min/max value, rest gray... not working well with 4 series
//for (i = 0; i < array.length; i += 1) {
// if (array[i] === pos || array.length === 1) {
// colorArray.push("#2DBCF8");
// } else {
// colorArray.push("#ccc");
// }
//}
//colorObject.series_colors = colorArray;
//add rest, too...
if (axis === "log") {
colorObject.yaxis = "yaxis";
} else {
colorObject.yaxis = "y2axis";
}
colorObject.legend = "#ccc";
colorObject.pointLabels = {edgeTolerance: -50}
// colorObject.legend = "#ccc";
return colorObject;
},
......@@ -631,7 +633,7 @@
// title: 'Performance Benchmarks',
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
rendererOptions:{ varyBarColor : true, barWidth: useBarWidth }
rendererOptions:{ /* varyBarColor : true,*/ barWidth: useBarWidth }
},
tickDefaults: {
syncTicks: true,
......@@ -655,7 +657,7 @@
// autoscale: true
},
y2axis:{
label: 'Uptime (%), Cost($/h)',
label: 'Uptime (%), Cost ($/h)',
// renderer: $.jqplot.CategoryAxisRenderer,
//btickSpacing: 50,
// min: 0,
......@@ -669,6 +671,7 @@
legend: {
show: true,
placement: 'outsideGrid'
// location:'s'
}
};
......@@ -708,6 +711,8 @@
plotOpts.legend.labels = plotLables;
plotOpts.series = series_colors;
console.log(plotOpts)
// now we plot - only if a series is shown
if (plotSeries.length !== 0) {
plot1 = $.jqplot('graph_container_cell', plotSeries, plotOpts);
......
Markdown is supported
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