array_pop($this->_tag_stack);
 echo '"/></a></td></script><script type="text/template" id="crm-vol-define-flexible-need-tpl"><input type="checkbox" name="visibility_id" id="crm-vol-visibility-id" value="<%= visibilityValue %>"><label for="crm-vol-visibility-id">Allow users to sign up without specifying a shift.</label></script><script type="text/template" id="crm-vol-define-add-row-tpl"><tr id="crm-vol-define-add-row"><td colspan="7"><select class="crm-form-select crm-action-menu action-icon-plus" id="crm-vol-define-add-need" style="width: 20em;"><option value="">';
 $this->_tag_stack[] = array('ts', array('domain' => 'org.civicrm.volunteer'));
 $_block_repeat = true;
 smarty_block_ts($this->_tag_stack[count($this->_tag_stack) - 1][1], null, $this, $_block_repeat);
 while ($_block_repeat) {
     ob_start();
     echo 'Create new';
     $_block_content = ob_get_contents();
     ob_end_clean();
     $_block_repeat = false;
     echo smarty_block_ts($this->_tag_stack[count($this->_tag_stack) - 1][1], $_block_content, $this, $_block_repeat);
 }
 array_pop($this->_tag_stack);
 echo '</option>';
 echo smarty_function_crmAPI(array('var' => 'result', 'entity' => 'VolunteerNeed', 'action' => 'getoptions', 'field' => 'role_id', 'sequential' => 0), $this);
 echo '';
 $_from = $this->_tpl_vars['result']['values'];
 if (!is_array($_from) && !is_object($_from)) {
     settype($_from, 'array');
 }
 if (count($_from)) {
     foreach ($_from as $this->_tpl_vars['id'] => $this->_tpl_vars['VolunteerNeed']) {
         echo '<option value="';
         echo $this->_tpl_vars['id'];
         echo '">';
         echo $this->_tpl_vars['VolunteerNeed'];
         echo '</option>';
     }
 }
 unset($_from);
        <a class="reset" href="javascript:moveChart.filterAll();volumeChart.filterAll();dc.redrawAll();"
style="display: none;">reset</a>
        <div class="clearfix"></div>
    </div>
</div>

<div id="monthly-volume-chart"></div>

<div class="clear"></div>

<script>
    'use strict';

    var data = <?php echo smarty_function_crmSQL(array('file' => 'contribution_by_date'), $this);?>
;
    var i = <?php echo smarty_function_crmAPI(array('entity' => 'OptionValue','option_group_id' => '10'), $this);?>
; 
    <?php echo '
        if(!data.is_error){
            var instrumentLabel = {};
            i.values.forEach (function(d) {
                instrumentLabel[d.value] = d.label;
            });

            var numberFormat = d3.format(".2f");
            var volumeChart=null,dayOfWeekChart=null,moveChart=null,pieinstrument,pietype;  


            cj(function($) {
                // create a pie chart under #chart-container1 element using the default global chart group
                pietype = dc.pieChart("#type").innerRadius(20).radius(90);