From 0e5b0ea0b0bfdbd00c49adc611849815e4eb7bce Mon Sep 17 00:00:00 2001 From: "gianpiero.di.blasi" Date: Sat, 21 May 2022 10:48:47 +0200 Subject: [PATCH] public repository --- LICENSE | 24 ++ README.md | 40 +++ build-extension.xml | 294 +++++++++-------------- configfiles/metadata.xml | 44 ++-- ui/radarchart/radarchart.ide.min.css | 0 ui/radarchart/radarchart.ide.min.js | 5 - ui/radarchart/radarchart.runtime.min.css | 1 - ui/radarchart/radarchart.runtime.min.js | 7 - 8 files changed, 201 insertions(+), 214 deletions(-) create mode 100644 LICENSE create mode 100644 README.md delete mode 100644 ui/radarchart/radarchart.ide.min.css delete mode 100644 ui/radarchart/radarchart.ide.min.js delete mode 100644 ui/radarchart/radarchart.runtime.min.css delete mode 100644 ui/radarchart/radarchart.runtime.min.js diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fdddb29 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/README.md b/README.md new file mode 100644 index 0000000..a65109c --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# RadarChartWidget +An extension to show a radar chart. + +## Description +This extension provides a widget to show a radar chart based on the chart.js library (see dependencies). The chart is described by the ds_RadarChartData DataShape for data and the ds_RadarChartDataSettings for settings (see below); the DataShape structures are mandatory, but they can be extended with additional fields. + +## Properties +- debugMode - BOOLEAN (default = false): if set to true it sends to the browser's JS console a set of information useful for debugging the widget +- data - INFOTABLE (no default value): the data to show (use or duplicate & extend the Data Shape ds_RadarChartData, see below) +- dataSettings - INFOTABLE (no default value): the settings of the data (use or duplicate & extend the Data Shape ds_RadarChartDataSettings, see below) +- beginAtZero - BOOLEAN (default = true): if true, scale will include 0 if it is not already included +- minValue - NUMBER (default = 0): the minimum value +- maxValue - NUMBER (default = 100): the maximum value +- stepSize - NUMBER (default = 20): the step size between min and max +- fontSize - NUMBER (default = 12): the font size +- pointRadius - NUMBER (default = 3): the radius of the point shape +- pointBorderWidth - NUMBER (default = 1): the width of the point border +- pointHoverRadius - NUMBER (default = 4): the radius of the point when hovered +- legendPosition - STRING (default = 'top'): the (optional) legend position (options: NO_LEGEND, top, left, right, bottom + +## Services +- Render: service to render the chart + +## DataShapes +- ds_RadarChartData + - dataset: the dataset name - STRING + - field: the field name - STRING + - value: the field value - NUMBER +- ds_RadarChartDataSettings + - dataset: the dataset name - STRING + - backgroundColor: the background color - STRING + - borderColor: the border color - STRING + - pointBackgroundColor: the background color of the point - STRING + - pointBorderColor - the border color of the point - STRING + +## Dependencies +chart.js - [link](https://github.com/chartjs/Chart.js) + +## Donate +If you would like to support the development of this and/or other extensions, consider making a [donation](https://www.paypal.com/donate/?business=HCDX9BAEYDF4C&no_recurring=0¤cy_code=EUR). diff --git a/build-extension.xml b/build-extension.xml index 2e386fe..b23f08c 100644 --- a/build-extension.xml +++ b/build-extension.xml @@ -1,180 +1,116 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/configfiles/metadata.xml b/configfiles/metadata.xml index 7879c3f..3e9fed9 100644 --- a/configfiles/metadata.xml +++ b/configfiles/metadata.xml @@ -1,23 +1,23 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui/radarchart/radarchart.ide.min.css b/ui/radarchart/radarchart.ide.min.css deleted file mode 100644 index e69de29..0000000 diff --git a/ui/radarchart/radarchart.ide.min.js b/ui/radarchart/radarchart.ide.min.js deleted file mode 100644 index e9c0c6f..0000000 --- a/ui/radarchart/radarchart.ide.min.js +++ /dev/null @@ -1,5 +0,0 @@ -TW.IDE.Widgets.radarchart=function(){this.widgetIconUrl=function(){return"../Common/extensions/RadarChartWidget/ui/radarchart/radarchart.png"};this.widgetProperties=function(){return{name:"RadarChart",description:"Widget to show a radar chart",category:["Common"],iconImage:"radarchart.png",supportsAutoResize:!0,properties:{Width:{description:"width",defaultValue:200},Height:{description:"height",defaultValue:200},data:{isVisible:!0,baseType:"INFOTABLE",isBindingTarget:!0,isEditable:!1,description:"The data to show (use or duplicate & extend the Data Shape ds_RadarChartData)"}, -dataSettings:{isVisible:!0,baseType:"INFOTABLE",isBindingTarget:!0,isEditable:!1,description:"The settings of the data (use or duplicate & extend the Data Shape ds_RadarChartDataSettings)"},beginAtZero:{isVisible:!0,baseType:"BOOLEAN",isBindingTarget:!1,isEditable:!0,description:"if true, scale will include 0 if it is not already included",defaultValue:!0},minValue:{isVisible:!0,baseType:"NUMBER",isBindingTarget:!1,isEditable:!0,description:"The minimum value",defaultValue:0},maxValue:{isVisible:!0, -baseType:"NUMBER",isBindingTarget:!1,isEditable:!0,description:"The maximum value",defaultValue:100},stepSize:{isVisible:!0,baseType:"NUMBER",isBindingTarget:!1,isEditable:!0,description:"The step size between min and max",defaultValue:20},fontSize:{isVisible:!0,baseType:"NUMBER",isBindingTarget:!1,isEditable:!0,description:"The font size",defaultValue:12},pointRadius:{isVisible:!0,baseType:"NUMBER",isBindingTarget:!1,isEditable:!0,description:"The radius of the point shape",defaultValue:3},pointBorderWidth:{isVisible:!0, -baseType:"NUMBER",isBindingTarget:!1,isEditable:!0,description:"The width of the point border",defaultValue:1},pointHoverRadius:{isVisible:!0,baseType:"NUMBER",isBindingTarget:!1,isEditable:!0,description:"The radius of the point when hovered",defaultValue:4},legendPosition:{isVisible:!0,baseType:"STRING",isEditable:!0,description:"The (optional) legend position",defaultValue:"top",selectOptions:[{value:"NO_LEGEND",text:"No Legend"},{value:"top",text:"Top"},{value:"left",text:"Left"},{value:"right", -text:"Right"},{value:"bottom",text:"Bottom"}]},debugMode:{isVisible:!0,baseType:"BOOLEAN",isEditable:!0,defaultValue:!1,description:"true to activate the debug"}}}};this.renderHtml=function(){return'
Radar Chart
'};this.widgetServices=function(){return{Render:{warnIfNotBound:!0}}}}; \ No newline at end of file diff --git a/ui/radarchart/radarchart.runtime.min.css b/ui/radarchart/radarchart.runtime.min.css deleted file mode 100644 index 3d30a4c..0000000 --- a/ui/radarchart/radarchart.runtime.min.css +++ /dev/null @@ -1 +0,0 @@ -.widget-radarchart{width:100%;height:100%} \ No newline at end of file diff --git a/ui/radarchart/radarchart.runtime.min.js b/ui/radarchart/radarchart.runtime.min.js deleted file mode 100644 index aa84868..0000000 --- a/ui/radarchart/radarchart.runtime.min.js +++ /dev/null @@ -1,7 +0,0 @@ -$("link[chartjs='true']").length||$("head").append('');$("script[chartjs='true']").length||$("body").append('