r5161 - branches/noflash/cumin/python/cumin
by croberts@fedoraproject.org
Author: croberts
Date: 2011-12-02 20:03:18 +0000 (Fri, 02 Dec 2011)
New Revision: 5161
Modified:
branches/noflash/cumin/python/cumin/stat.strings
Log:
Fixing display issue in Chrome where the duration radio buttons for a chart would wrap into 2 lines. The fix was go give that div a specific width which fixes Chrome and does not change the look in any other browser.
Modified: branches/noflash/cumin/python/cumin/stat.strings
===================================================================
--- branches/noflash/cumin/python/cumin/stat.strings 2011-12-02 19:54:13 UTC (rev 5160)
+++ branches/noflash/cumin/python/cumin/stat.strings 2011-12-02 20:03:18 UTC (rev 5161)
@@ -116,6 +116,7 @@
div.StatValueChart div.duration {
margin: 1em 0 0.5em 1em;
+ width:250px;
}
div.StatValueChart ul.radiotabs {
12 years, 5 months
r5160 - branches/noflash/cumin/resources
by croberts@fedoraproject.org
Author: croberts
Date: 2011-12-02 19:54:13 +0000 (Fri, 02 Dec 2011)
New Revision: 5160
Modified:
branches/noflash/cumin/resources/app.js
Log:
Jqplot charts: smaller dots, thinner lines for a cleaner feel.
Modified: branches/noflash/cumin/resources/app.js
===================================================================
--- branches/noflash/cumin/resources/app.js 2011-12-02 16:07:10 UTC (rev 5159)
+++ branches/noflash/cumin/resources/app.js 2011-12-02 19:54:13 UTC (rev 5160)
@@ -631,9 +631,9 @@
markerRenderer: $j.jqplot.MarkerRenderer,
},
markerOptions: {show:true,
- lineWidth:2,
+ lineWidth:1,
style:'filledCircle',
- size:4,
+ size:3,
},
},
highlighter: {
12 years, 5 months
r5159 - branches/noflash/cumin/resources
by croberts@fedoraproject.org
Author: croberts
Date: 2011-12-02 16:07:10 +0000 (Fri, 02 Dec 2011)
New Revision: 5159
Modified:
branches/noflash/cumin/resources/app.js
Log:
More fine-tuning of the charts with respect to y-axis scaling and labels, especially with smaller values.
Modified: branches/noflash/cumin/resources/app.js
===================================================================
--- branches/noflash/cumin/resources/app.js 2011-12-01 19:02:54 UTC (rev 5158)
+++ branches/noflash/cumin/resources/app.js 2011-12-02 16:07:10 UTC (rev 5159)
@@ -603,9 +603,10 @@
},
axes: {
y2axis: {
- autoscale: true,
+ autoscale:true,
min:0,
tickOptions:{formatString:'%.0f',formatter: y_axis_Formatter,},
+ pad:1.01,
numberTicks:4,
},
xaxis: {
@@ -655,7 +656,6 @@
for (i=0; i < dataContainer['labels'].length; i++) {
if(dataContainer['y_coordinate_values'][i].length == 0) {
dataContainer['y_coordinate_values'][i] = [1,0];
- needToReplot = false;
}
}
@@ -665,9 +665,7 @@
allCharts[divName].series[i].data = dataContainer['y_coordinate_values'][i];
}
try {
- if(needToReplot) {
- allCharts[divName].replot({resetAxes:(!allCharts[divName].plugins.cursor._zoom.isZoomed), axes:{y2axis:{autoscale:true,min:0,numberTicks:4,tickOptions:{formatString:'%.0f',formatter: y_axis_Formatter,}}, xaxis:{min:dataopts['xmin'] / dataContainer['x_axis_normalizer'], max:dataopts['xmax'] / dataContainer['x_axis_normalizer'],tickOptions:{formatString:'%.0f ' + dataContainer['x_axis_unit_label'], formatter: x_axis_Formatter,}}}})
- }
+ allCharts[divName].replot({resetAxes:(!allCharts[divName].plugins.cursor._zoom.isZoomed), axes:{y2axis:{autoscale:true,min:0,pad:1.01,numberTicks:4,tickOptions:{formatString:'%.0f',formatter: y_axis_Formatter,}}, xaxis:{min:dataopts['xmin'] / dataContainer['x_axis_normalizer'], max:dataopts['xmax'] / dataContainer['x_axis_normalizer'],tickOptions:{formatString:'%.0f ' + dataContainer['x_axis_unit_label'], formatter: x_axis_Formatter,}}}})
} catch (err) {
// this is needed in the event of the first draw for a fullpage chart
allCharts[divName] = $j.jqplot(holder, dataContainer['y_coordinate_values'],chartOptionsObject);
@@ -701,11 +699,15 @@
if (val > 1000000) {
val = val / 1000000
format = "%.1fM";
- }
- if (val > 100000) {
+ } else if (val > 100000) {
val = val / 1000
format = "%.1fk";
- }
+ } else if (val < 2) {
+ format = "%.2f";
+ }
+ if (val == 0) {
+ format = "%d";
+ }
tickval = $j.jqplot.sprintf(format, val);
}
else {
12 years, 5 months
r5158 - branches/noflash/cumin/resources
by croberts@fedoraproject.org
Author: croberts
Date: 2011-12-01 19:02:54 +0000 (Thu, 01 Dec 2011)
New Revision: 5158
Modified:
branches/noflash/cumin/resources/app.js
Log:
Now handling charts where no data was given (previously, the drawChart function would throw an exception and nothing would show up). We are now showing an empty chart.
Modified: branches/noflash/cumin/resources/app.js
===================================================================
--- branches/noflash/cumin/resources/app.js 2011-12-01 15:31:58 UTC (rev 5157)
+++ branches/noflash/cumin/resources/app.js 2011-12-01 19:02:54 UTC (rev 5158)
@@ -605,8 +605,7 @@
y2axis: {
autoscale: true,
min:0,
- tickOptions:{formatString:'%.0f',
- formatter: y_axis_Formatter,},
+ tickOptions:{formatString:'%.0f',formatter: y_axis_Formatter,},
numberTicks:4,
},
xaxis: {
@@ -651,13 +650,24 @@
var divName = $(holder).get('id');
+ // If we have no real data to plot, add a fake coordinate to plot an empty chart
+ var needToReplot = true;
+ for (i=0; i < dataContainer['labels'].length; i++) {
+ if(dataContainer['y_coordinate_values'][i].length == 0) {
+ dataContainer['y_coordinate_values'][i] = [1,0];
+ needToReplot = false;
+ }
+ }
+
// if the chart already exists, perform a "replot()" on the chart, otherwise, draw the chart from scratch
- if(allCharts[divName]) {
+ if(allCharts[divName] != undefined) {
for(i=0; i < allCharts[divName].series.length; i++) {
allCharts[divName].series[i].data = dataContainer['y_coordinate_values'][i];
}
try {
- allCharts[divName].replot({resetAxes:(!allCharts[divName].plugins.cursor._zoom.isZoomed), axes:{y2axis:{autoscale:true,min:0,numberTicks:4,}, xaxis:{min:dataopts['xmin'] / dataContainer['x_axis_normalizer'], max:dataopts['xmax'] / dataContainer['x_axis_normalizer'],tickOptions:{formatString:'%.0f ' + dataContainer['x_axis_unit_label'], formatter: x_axis_Formatter,}}}})
+ if(needToReplot) {
+ allCharts[divName].replot({resetAxes:(!allCharts[divName].plugins.cursor._zoom.isZoomed), axes:{y2axis:{autoscale:true,min:0,numberTicks:4,tickOptions:{formatString:'%.0f',formatter: y_axis_Formatter,}}, xaxis:{min:dataopts['xmin'] / dataContainer['x_axis_normalizer'], max:dataopts['xmax'] / dataContainer['x_axis_normalizer'],tickOptions:{formatString:'%.0f ' + dataContainer['x_axis_unit_label'], formatter: x_axis_Formatter,}}}})
+ }
} catch (err) {
// this is needed in the event of the first draw for a fullpage chart
allCharts[divName] = $j.jqplot(holder, dataContainer['y_coordinate_values'],chartOptionsObject);
@@ -666,7 +676,7 @@
allCharts[divName] = $j.jqplot(holder, dataContainer['y_coordinate_values'],chartOptionsObject);
startChartMonitor(divName);
}
-} // end functio drawChart
+} // end function drawChart
// used in axis:tickOptions:formatter to override the default axis label formatting
x_axis_Formatter = function (format, val) {
12 years, 5 months
r5157 - branches/noflash/cumin/resources
by croberts@fedoraproject.org
Author: croberts
Date: 2011-12-01 15:31:58 +0000 (Thu, 01 Dec 2011)
New Revision: 5157
Modified:
branches/noflash/cumin/resources/app.js
Log:
The new charts will now respect the "Resume updates" mode and will stop updating when all other page updates are paused. Updates to the charts will resume with the rest of the page updates (after hitting "resume updates").
Modified: branches/noflash/cumin/resources/app.js
===================================================================
--- branches/noflash/cumin/resources/app.js 2011-11-30 20:53:45 UTC (rev 5156)
+++ branches/noflash/cumin/resources/app.js 2011-12-01 15:31:58 UTC (rev 5157)
@@ -456,9 +456,12 @@
function after that data is fetched
*/
drawSingleChart = function(id) {
- var jsonurl = $(id).getParent().getElements('a')[chart_href].get('href');
- var passback = "";
- wooly.setIntervalUpdate(jsonurl, stathandler, 0, passback, true);
+ // if the "resume updates" is displayed, we don't want to do updates.
+ if($('shock').style.display != "undefined" && $('shock').style.display != "block") {
+ var jsonurl = $(id).getParent().getElements('a')[chart_href].get('href');
+ var passback = "";
+ wooly.setIntervalUpdate(jsonurl, stathandler, 0, passback, true);
+ }
}
/*
12 years, 5 months