As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
tasks = new Array(); var result = remote.call("/slingshot/dashlets/my-tasks"); var data = eval('(' + result + ')'); if (data.tasks !== null) { for (var i=0,len = data.tasks.length;i<len;i++) { tasks.push(data.tasks[i]); } }
tasks= workflow.assignedTasks
<webscript> <shortname>Statistique</shortname> <description>Statistique</description> <family>dashlet</family> <url>/shareextras/components/dashlets/statWorkflow</url> </webscript>
<script type="text/javascript" src="${page.url.context}/org/shareextras/components/dashlets/statWorkflow.js"></script> <script type="text/javascript" src="${page.url.context}/res/shareextras/components/dashlets/jquery.min.js"></script> <script type="text/javascript"> $(function () { alert(tasks.length); var chart; $(document).ready(function() { chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'column' }, title: { text: 'Statistique des tâches des workflows' }, xAxis: { categories: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', 'Décembre'] }, yAxis: { min: 0, title: { text: 'Nombre des tâches des workflows' }, stackLabels: { enabled: true, style: { fontWeight: 'bold', color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray' } } }, legend: { align: 'right', x: -100, verticalAlign: 'top', y: 20, floating: true, backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColorSolid) || 'white', borderColor: '#CCC', borderWidth: 1, shadow: false }, tooltip: { formatter: function() { return '<b>'+ this.x +'</b><br/>'+ this.series.name +': '+ this.y +'<br/>'+ 'Total: '+ this.point.stackTotal; } }, plotOptions: { column: { stacking: 'normal', dataLabels: { enabled: true, color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white' } } }, series: [{ name: 'En attente', data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { name: 'En cours', data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }, { name: 'Terminée', data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] }] }); }); }); </script> <script src="${page.url.context}/res/shareextras/components/dashlets/highcharts.js"></script> <script src="${page.url.context}/res/shareextras/components/dashlets/exporting.js"></script> <div class="dashlet"> <div class="title">Statistique</div> <div><span> <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div> </span> </div> </div>
tasks = new Array(); //tasks= workflow.assignedTasks var result = remote.call("/slingshot/dashlets/my-tasks"); var data = eval('(' + result + ')'); if (data.tasks !== null) { for (var i=0,len = data.tasks.length;i<len;i++) { tasks.push(data.tasks[i]); } }