<commit_before><?php

use MapasCulturais\i;

?>

<div class="charts-dynamic">
    <div class="chart-wrap" ng-repeat="(key, graphic) in data.graphics">    
        <header>
            <h3>{{graphic.reportData.title}}</h3>
            <button ng-click="createCsv(graphic.reportData.graphicId)" name="{{graphic.identifier}}" class="hltip download" title="<?php i::_e("Baixar em CSV"); ?>"></button>
            <button ng-click="deleteGraphic(graphic.reportData.graphicId)" class="hltip delete" title="<?php i::_e("Excluir gráfico"); ?>"></button>
            <p class="description">{{graphic.reportData.description}}</p>
        </header>
        
        <div ng-if="graphic.reportData.typeGraphic == 'table'" class="chart-container dynamic-graphic-{{graphic.identifier}} chart-{{graphic.reportData.typeGraphic}}" style="position: relative; height:auto; width: 100%;">
            <table>
                <thead>
                    <tr>
                        <th></th>
                        <th ng-repeat="(key, label) in graphic.data.labels">{{label}}</th>
                        <th><?php i::_e("Total"); ?></th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="(key, serie) in graphic.data.series track by $index">                    
                        <td >{{serie.label}}</td>
                        <td ng-repeat="(key, value) in serie.data track by $index">{{value}}</td>
                        <td>{{graphic.data.sumLines[key]}}</td>
                    </tr>
                    <tr>
                        <td><?php i::_e("Total"); ?></td>
                        <td ng-repeat="(key, sumColumn) in graphic.data.sumColumns track by $index">{{sumColumn}}</td> 
                        <td>{{graphic.data.total}}</td>
                    </tr>
                </tbody>
            </table> 
        </div>            
    
        <div ng-if="graphic.reportData.typeGraphic != 'table'" class="chart-container dynamic-graphic-{{graphic.identifier}} chart-{{graphic.reportData.typeGraphic}}" style="position: relative; height:auto;" ng-style="{'width': (graphic.reportData.typeGraphic == 'pie') ? '60%' : '100%'}">
            <canvas id="dynamic-graphic-{{graphic.identifier}}"></canvas>
        </div>
        
        <footer>
            <div class="legends-chats" id="dynamic-legends-{{graphic.identifier}}">
                <div class="each" ng-if="graphic.reportData.typeGraphic != 'pie'" ng-repeat="(key, label) in graphic.data.legends">
                    <span class="dot" ng-style="{'background-color': getLabelColor(graphic, key)}"></span><p>{{label}}<p>
                </div>

                <div class="each" ng-if="graphic.reportData.typeGraphic == 'pie'" ng-repeat="(key, label) in graphic.data.labels">
                    <span class="dot" ng-style="{'background-color': getLabelColor(graphic, key)}"></span><p>{{label}}<p>
                </div>
            </div>
        </footer>

    </div>
</div><commit_msg>Insere dados selecionados para gerar o grafico em icone (i)<commit_after><?php

use MapasCulturais\i;

?>

<div class="charts-dynamic">
    <div class="chart-wrap" ng-repeat="(key, graphic) in data.graphics">    
        <header>
            <h3>{{graphic.reportData.title}}</h3>
            <button ng-click="createCsv(graphic.reportData.graphicId)" name="{{graphic.identifier}}" class="hltip download" title="<?php i::_e("Baixar em CSV"); ?>"></button>
            <button ng-click="deleteGraphic(graphic.reportData.graphicId)" class="hltip delete" title="<?php i::_e("Excluir gráfico"); ?>"></button>
            <span class="type"><i class="fas fa-info-circle" title="{{graphic.reportData.fields}}"></i></span>
            <p class="description">{{graphic.reportData.description}}</p>
        </header>
        
        <div ng-if="graphic.reportData.typeGraphic == 'table'" class="chart-container dynamic-graphic-{{graphic.identifier}} chart-{{graphic.reportData.typeGraphic}}" style="position: relative; height:auto; width: 100%;">
            <table>
                <thead>
                    <tr>
                        <th></th>
                        <th ng-repeat="(key, label) in graphic.data.labels">{{label}}</th>
                        <th><?php i::_e("Total"); ?></th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="(key, serie) in graphic.data.series track by $index">                    
                        <td >{{serie.label}}</td>
                        <td ng-repeat="(key, value) in serie.data track by $index">{{value}}</td>
                        <td>{{graphic.data.sumLines[key]}}</td>
                    </tr>
                    <tr>
                        <td><?php i::_e("Total"); ?></td>
                        <td ng-repeat="(key, sumColumn) in graphic.data.sumColumns track by $index">{{sumColumn}}</td> 
                        <td>{{graphic.data.total}}</td>
                    </tr>
                </tbody>
            </table> 
        </div>            
    
        <div ng-if="graphic.reportData.typeGraphic != 'table'" class="chart-container dynamic-graphic-{{graphic.identifier}} chart-{{graphic.reportData.typeGraphic}}" style="position: relative; height:auto;" ng-style="{'width': (graphic.reportData.typeGraphic == 'pie') ? '60%' : '100%'}">
            <canvas id="dynamic-graphic-{{graphic.identifier}}"></canvas>
        </div>
        
        <footer>
            <div class="legends-chats" id="dynamic-legends-{{graphic.identifier}}">
                <div class="each" ng-if="graphic.reportData.typeGraphic != 'pie'" ng-repeat="(key, label) in graphic.data.legends">
                    <span class="dot" ng-style="{'background-color': getLabelColor(graphic, key)}"></span><p>{{label}}<p>
                </div>

                <div class="each" ng-if="graphic.reportData.typeGraphic == 'pie'" ng-repeat="(key, label) in graphic.data.labels">
                    <span class="dot" ng-style="{'background-color': getLabelColor(graphic, key)}"></span><p>{{label}}<p>
                </div>
            </div>
        </footer>

    </div>
</div>
{'fraction_non_alphanumeric': 0.18494588919399127, 'fraction_numerical': 0.0032304958811177516, 'mean_word_length': 1.998547215496368, 'pattern_counts': {'":': 0, '<': 149, '<?xml version=': 0, '>': 149, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6205838', 'n_tokens_mistral': 1885, 'n_tokens_neox': 1809, 'n_words': 313}