Remove Number of votes number but keep percentage

briannourse
briannourse
  • briannourse
  • 6 months ago

Hi

Sorry about this but i feel this has been answered but the code looks different to what i have. Im running the latest version and want to remove votes number but keep percentage.

My code looks like this. Can you help please.

<?php
/**
 * @package     corejoomla.administrator
 * @subpackage  com_communitypolls
 *
 * @copyright   Copyright (C) 2009 - 2016 corejoomla.com. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('JPATH_PLATFORM') or die();

$data             = $displayData['data'];
$item             = $data->item;
$params            = $item->params;
$theme            = $params->get('theme', 'default');
$view            = $params->get('default_view', 'form');
$palette         = ChartsHelper::get_hex_colors($item->pallete);
$rgb_palette    = ChartsHelper::get_rgb_colors($item->pallete);
?>
<div class="poll-results" <?php echo $view == 'results' ? '' : 'style="display: none;"';?>>
    <?php
    if(in_array($item->type, array('radio', 'checkbox')))
    {
        ////////////////////////////////////// CHOICE POLL ////////////////////////////////////////////
        switch ($item->chart_type)
        {
            case 'pie':
            case 'gpie':
                echo $this->sublayout('gpie', array('data'=>$data));
                echo $this->sublayout('sbar', array('data'=>$data));
                break;
               
            case 'sbar':
            case 'bar';
                echo $this->sublayout('sbar', array('data'=>$data));
                break;
               
            case 'modern':
            default:
                echo $this->sublayout('modern', array('data'=>$data));
                break;
        }
    }
    else
    {
        ////////////////////////////////////// GRID POLL ///////////////////////////////////////////////
        echo $this->sublayout('grid', array('data'=>$data));
    }
    ?>
</div>
<div style="display: none;">
    <span id="poll_answers" class="poll_answers"><?php echo json_encode($item->answers);?></span>
    <span id="color_pallete" class="color_pallete"><?php echo json_encode($palette);?></span>
    <span id="rgb_color_pallete" class="rgb_color_pallete"><?php echo json_encode($rgb_palette);?></span>
    <span id="chart_height" class="chart_height"><?php echo $params->get('pie_chart_height', 350);?></span>
</div>

Access to viewing replies is restricted.
Showing 2 of 2 replies
You do not have permissions for replying to this topic.
Loading...
Confirm delete? This action is irreversible and the data will be deleted permanently. Do you want to continue? Confirm Add New Delete Unpublish Cancel Import Uninstall The selected item successfully deleted.
Shondalai