Author: croberts Date: 2011-11-03 20:15:19 +0000 (Thu, 03 Nov 2011) New Revision: 5111
Modified: branches/noflash/cumin/python/cumin/grid/dashboard.strings branches/noflash/cumin/resources/app.js Log: Changes for non-flash graph axis formatting and the png pie chart replacements.
Modified: branches/noflash/cumin/python/cumin/grid/dashboard.strings =================================================================== --- branches/noflash/cumin/python/cumin/grid/dashboard.strings 2011-11-03 15:12:45 UTC (rev 5110) +++ branches/noflash/cumin/python/cumin/grid/dashboard.strings 2011-11-03 20:15:19 UTC (rev 5111) @@ -209,11 +209,9 @@ [DefinitionSet.pie_html] <script type="text/javascript" charset="utf-8"> //<![CDATA[ - window.addEvent("domready", function () { values = {pie_slices}; colors = {colors}; - updatePieChart("{id_nodots}", values, colors); - }); + updatePieChart("{id_nodots}", values, colors); //]]> </script>
Modified: branches/noflash/cumin/resources/app.js =================================================================== --- branches/noflash/cumin/resources/app.js 2011-11-03 15:12:45 UTC (rev 5110) +++ branches/noflash/cumin/resources/app.js 2011-11-03 20:15:19 UTC (rev 5111) @@ -630,14 +630,13 @@ format = $j.jqplot.config.defaultTickFormatString; } if (val > 1000000) { - val = val / 100000 + val = val / 1000000 format = "%.2fM"; } - if (val > 10000) { - val = val / 100 + if (val > 100000) { + val = val / 10000 format = "%.2fk"; - } - + } tickval = $j.jqplot.sprintf(format, val); } else { @@ -648,8 +647,8 @@
updatePieChart = function (piediv, vals, colors) { var data = vals; - - var plot1 = jQuery.jqplot (piediv, [data], + $(piediv).empty(); + jQuery.jqplot (piediv, [data], { grid: { drawBorder: false, @@ -660,18 +659,20 @@ seriesDefaults: { renderer: jQuery.jqplot.PieRenderer, rendererOptions: { - showDataLabels: false, - dataLabels: 'value', + showDataLabels: true, + dataLabels: 'percent', dataLabelThreshold: 3, shadow:true, shadowOffset: 1, shadowAlpha: 0.06, shadowDepth: 5, padding:5, - hilightMouseOver: false + sliceMargin:3, + diameter:null, + highlightMouseOver: false } }, - legend: { show:false, location: 'e' }, + legend: { show:false}, seriesColors: colors } );
cumin-developers@lists.fedorahosted.org