From: <ki...@us...> - 2009-10-12 03:36:34
|
Revision: 436 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=436&view=rev Author: kilica Date: 2009-10-12 03:36:26 +0000 (Mon, 12 Oct 2009) Log Message: ----------- add label to Google Chart Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2009-10-12 02:50:21 UTC (rev 435) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2009-10-12 03:36:26 UTC (rev 436) @@ -141,6 +141,8 @@ $render->setAttribute('chart', $this->mChart); $render->setAttribute('pageNavi', $this->mFilter->mNavi); $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); + rsort($this->mChart['count']); + $render->setAttribute('chartMax', array_shift($this->mChart['count'])); } } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2009-10-12 02:50:21 UTC (rev 435) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2009-10-12 03:36:26 UTC (rev 436) @@ -5,8 +5,12 @@ <{foreach item=pCount from=$chart.count key=pKey}> <div style="float:left;width:<{$pCount*10}>px;height:10px;background-color:#000000;margin:10px 30px 10px 5px;"></div><{$chart.title[$pKey]}> (<{$smarty.const._MD_BIZPOLL_LANG_POLL_COUNT}>: <{$pCount}>)<br style="clear:left;" /> <{/foreach}> -<img src="http://chart.apis.google.com/chart?cht=<{$chartSetting[0]}>&chd=t:<{','|implode:$chart.count}>&chs=<{$chartSetting[1]}>x<{$chartSetting[2]}>&chl=<{'|'|implode:$chart.title|escape:'url'}>" alt="chart" width="<{$chartSetting[1]}>" height="<{$chartSetting[2]}>" /> +<!-- Google Chart API --> +<{if count($chartSetting)>2}> +<img src="http://chart.apis.google.com/chart?cht=<{$chartSetting[0]}>&chd=t:<{','|implode:$chart.count}>&chds=0,<{$chartMax}>&chs=<{$chartSetting[1]}>x<{$chartSetting[2]}>&<{if $chartSetting[0]=='bhs'}>chxt=y,x&chxl=0:|<{'|'|implode:$chart.title|escape:'url'}>|<{elseif $chartSetting[0]=='bvs'}>chxt=x,y&chxl=0:|<{'|'|implode:$chart.title|escape:'url'}>|<{elseif $chartSetting[0]=='p'||$chartSetting[0]=='p3'}>chl=<{'|'|implode:$chart.title|escape:'url'}><{/if}>" alt="chart" width="<{$chartSetting[1]}>" height="<{$chartSetting[2]}>" /> +<{/if}> + <h2><{$smarty.const._MD_BIZPOLL_LANG_POLL_RESULT}></h2> <div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div> <hr /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |