diff --git a/README.md b/README.md index 0e22a6f..83a346b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ +# List of available resources for Agile-Mashup (widgets and operators) + This set of Wirecloud components allow the creation and visualization of agile dashboards where you can easily check the progress and status of agile projects using charts and tables to plot the data. Currently Github, Gitlab, Jira and Jenkins are supported. Example dashboard to check Wirecloud's development on Github: [Wirecloud example](https://wirecloud.conwet.fi.upm.es/alex.rodriguez/Example#view=workspace) -# List of available resources for Agile-Mashup (widgets and operators) - ## Harvesters (Harvest phase) This operators harvest data from the online tools, such as Github. diff --git a/pie-chart-generator-operator/.gitignore b/pie-chart-generator-operator/.gitignore index e12fd0c..f6070ea 100644 --- a/pie-chart-generator-operator/.gitignore +++ b/pie-chart-generator-operator/.gitignore @@ -1,8 +1,70 @@ -bower_components/ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components +src/bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/ + +# Dependency directories node_modules/ -src/bower_components/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next + +# distribution content dist/ -build/ + +# Some configuration files _SpecRunner.html src/js/.tern-port .DS_Store diff --git a/pie-chart-generator-operator/README.md b/pie-chart-generator-operator/README.md index e4c8e5a..309f91c 100644 --- a/pie-chart-generator-operator/README.md +++ b/pie-chart-generator-operator/README.md @@ -1,10 +1,8 @@ -Pie Chart Generator operator -====================== +# Pie Chart Generator operator The Pie Chart Generator operator is a WireCloud operator that provides the ability to draw pie charts. -Build ------ +## Build Be sure to have installed [Node.js](http://node.js) in your system. For example, you can install it on Ubuntu and Debian running the following commands: diff --git a/pie-chart-generator-operator/src/config.xml b/pie-chart-generator-operator/src/config.xml index 26e7ea5..133902d 100644 --- a/pie-chart-generator-operator/src/config.xml +++ b/pie-chart-generator-operator/src/config.xml @@ -1,5 +1,5 @@ - +
Pie Chart Generator Alejandro Rodriguez <alex.rodriguez@conwet.com> diff --git a/pie-chart-generator-operator/src/doc/changelog.md b/pie-chart-generator-operator/src/doc/changelog.md index 77bf122..8a78c20 100644 --- a/pie-chart-generator-operator/src/doc/changelog.md +++ b/pie-chart-generator-operator/src/doc/changelog.md @@ -1,3 +1,12 @@ +# CHANGELOG + +## v0.3.4 + +- Adds 3D format. +- Allow point select. +- Change PlotOptions. +- Update README content (correction some problems). + ## v0.3.3 - Adds dataHandler support. diff --git a/pie-chart-generator-operator/src/doc/index.md b/pie-chart-generator-operator/src/doc/index.md index f13a589..65018f7 100644 --- a/pie-chart-generator-operator/src/doc/index.md +++ b/pie-chart-generator-operator/src/doc/index.md @@ -1,4 +1,4 @@ -## Introduction +# Introduction Generates a pie chart from a dataset diff --git a/pie-chart-generator-operator/src/js/main.js b/pie-chart-generator-operator/src/js/main.js index e4a3803..d92b3b4 100644 --- a/pie-chart-generator-operator/src/js/main.js +++ b/pie-chart-generator-operator/src/js/main.js @@ -15,7 +15,7 @@ MashupPlatform.wiring.registerCallback("label-serie", labelSerieCallback); }; - var labelSerieCallback = function labelSerieCallback (data) { + var labelSerieCallback = function labelSerieCallback(data) { if (data) { var labelSerie = toNumberSerie(data); labelSerie = calculateSeries(labelSerie); @@ -25,7 +25,7 @@ } }; - var numberSerieCallback = function numberSerieCallback (data) { + var numberSerieCallback = function numberSerieCallback(data) { if (data) { var numberSerie = data; numberSerie = calculateSeries(numberSerie); @@ -35,10 +35,10 @@ } }; - var toNumberSerie = function toNumberSerie (serie) { + var toNumberSerie = function toNumberSerie(serie) { var result = []; - serie.forEach (function (data) { + serie.forEach(function (data) { if (result[data]) { result[data] += 1; } else { @@ -54,21 +54,33 @@ var keys = Object.keys(data); for (var i = 0; i < keys.length; i++) { - result.push({name: keys[i], y: data[keys[i]]}); + result.push({ + name: keys[i], + y: data[keys[i]] + }); } return result; }; - var dataHandler = function dataHandler (pie) { + var dataHandler = function dataHandler(pie) { var filterBy = pie.name; var meta = series.metadata; - return [{type: meta.filterAttributeType || "eq", value: filterBy, attr: meta.filterAttribute}]; + return [{ + type: meta.filterAttributeType || "eq", + value: filterBy, + attr: meta.filterAttribute + }]; }; var build_pie_chart = function build_pie_chart(series) { var options = { chart: { - type: 'pie' + type: 'pie', + options3d: { + enabled: true, + alpha: 45, + beta: 0 + } }, title: { text: MashupPlatform.prefs.get('title') @@ -80,7 +92,10 @@ data: series }], plotOptions: { - series: { + pie: { + allowPointSelect: true, + cursor: 'pointer', + depth: 35, dataLabels: { enabled: true, format: '{point.name}: {point.percentage:.1f}%'