dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17504
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6988: (DV plugin) Domain/range axis label options implemented.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 6988 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-05-19 14:35:14 +0300
message:
(DV plugin) Domain/range axis label options implemented.
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/plugin.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/index.html
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/plugin.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/plugin.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/plugin.js 2012-05-19 11:11:26 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/plugin.js 2012-05-19 11:33:16 +0000
@@ -270,7 +270,7 @@
return {
type: 'Numeric',
position: 'left',
- title: project.state.conf.rangeAxisLabel || false,
+ title: project.state.conf.rangeAxisLabel,
labelTitle: {
font: '17px ' + DHIS.chart.conf.chart.style.font
},
@@ -297,7 +297,7 @@
return {
type: 'Category',
position: 'bottom',
- title: project.state.conf.domainAxisLabel || false,
+ title: project.state.conf.domainAxisLabel,
labelTitle: {
font: '17px ' + DHIS.chart.conf.chart.style.font
},
@@ -694,6 +694,8 @@
targetLineLabel: null,
baseLineValue: null,
baseLineLabel: null,
+ domainAxisLabel: null,
+ rangeAxisLabel: null,
url: ''
};
@@ -733,17 +735,18 @@
conf.series = r.series.toLowerCase();
conf.category = r.category.toLowerCase();
conf.filter = r.filter.toLowerCase();
- conf.showData = r.showData || false,
- conf.trendLine = r.regression || false,
- conf.hideLegend = r.hideLegend || false,
- conf.hideSubtitle = r.hideSubtitle || false,
- conf.userOrganisationUnit = r.userOrganisationUnit || false,
- conf.userOrganisationUnitChildren = r.userOrganisationUnitChildren || false,
- conf.targetLineValue = r.targetLineValue || null,
- conf.targetLineLabel = r.targetLineLabel || null,
- conf.baseLineValue = r.baseLineValue || null,
- conf.baseLineLabel = r.baseLineLabel || null,
- conf.legendPosition = conf.legendPosition || false;
+ conf.showData = r.showData || false;
+ conf.trendLine = r.regression || false;
+ conf.hideLegend = r.hideLegend || false;
+ conf.hideSubtitle = r.hideSubtitle || false;
+ conf.userOrganisationUnit = r.userOrganisationUnit || false;
+ conf.userOrganisationUnitChildren = r.userOrganisationUnitChildren || false;
+ conf.targetLineValue = r.targetLineValue || null;
+ conf.targetLineLabel = r.targetLineLabel || null;
+ conf.baseLineValue = r.baseLineValue || null;
+ conf.baseLineLabel = r.baseLineLabel || null;
+ conf.domainAxisLabel = r.domainAxisLabel || null;
+ conf.rangeAxisLabel = r.rangeAxisLabel || null;
if (r.indicators) {
conf.indicators = DHIS.chart.util.dimension.indicator.getIdsFromObjects(r.indicators);
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/index.html'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/index.html 2012-05-19 11:13:49 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/index.html 2012-05-19 11:33:16 +0000
@@ -47,9 +47,11 @@
userOrganisationUnit: false,
userOrganisationUnitChildren: true,
targetLineValue: 80,
- targetLineLabel: null,
+ targetLineLabel: null,
baseLineValue: null,
- baseLineLabel: null,
+ baseLineLabel: null,
+ domainAxisLabel: null,
+ rangeAxisLabel: null,
el: 'chart2',
url: url
});
@@ -113,32 +115,36 @@
</script>
<!--
- CONFIG TYPE DEFAULT DESCRIPTION
+ CONFIG TYPE DEFAULT DESCRIPTION
- uid string (Optional) A chart uid. If provided, only 'el' and 'url' are required.
+ uid string (Optional) A chart uid. If provided, only 'el' and 'url' are required.
- type string 'column' (Optional) Chart types: 'column', 'stackedcolumn', 'bar', 'stackedbar', 'line', 'area', 'pie'
- indicators [integer] (Required*) Indicator uids. Required if no data elements are provided.
- dataelements [integer] (Required*) Data element uids. Required if no indicators are provided.
- periods [string] 'last12Months' (Optional) Relative period names.
- organisationunits [integer] (Required) Organisation unit uids.
- series string 'data' (Optional) Series: 'data', 'period' or 'organisationunit'.
- category string 'period' (Optional) Category: 'indicator', 'dataelement', 'period' or 'organisationunit'.
- filter string 'organisationunit' (Optional) Filter: 'indicator', 'dataelement', 'period' or 'organisationunit'.
- orgUnitIsParent boolean false (Optional) If true, the children of the provided orgunit are displayed.
- showData boolean false (Optional) If true, the exact data are displayed on the chart.
- trendLine boolean false (Optional) If true, trend line(s) are added.
- hideLegend boolean false (Optional) If true, the legend is not visible.
- hideSubtitle boolean false (Optional) If true, the subtitle is not visible.
- targetLineValue integer (Optional) The value of the target line.
- targetLineLabel string (Optional) The legend name of the target line. Requires targetLineValue, otherwise ignored.
- baseLineValue integer (Optional) The value of the base line.
- baseLineLabel string (Optional) The legend name of the base line. Requires baseLineValue, otherwise ignored.
- legendPosition string 'top' (Optional) Positions: 'top', 'right', 'bottom' or 'left'.
- el string (Required) The element id to render the chart.
- width integer <el width> (Optional) Chart width. Default is the element width.
- height integer <el height> (Optional) Chart height. Default is the element height.
- url string (Required) The base url of the DHIS instance.
+ type string 'column' (Optional) Chart types: 'column', 'stackedcolumn', 'bar', 'stackedbar', 'line', 'area', 'pie'
+ indicators [integer] (Required*) Indicator uids. Required if no data elements are provided.
+ dataelements [integer] (Required*) Data element uids. Required if no indicators are provided.
+ periods [string] 'last12Months' (Optional) Relative period names.
+ organisationunits [integer] (Required) Organisation unit uids.
+ series string 'data' (Optional) Series: 'data', 'period' or 'organisationunit'.
+ category string 'period' (Optional) Category: 'indicator', 'dataelement', 'period' or 'organisationunit'.
+ filter string 'organisationunit' (Optional) Filter: 'indicator', 'dataelement', 'period' or 'organisationunit'.
+ orgUnitIsParent boolean false (Optional) If true, the children of the provided orgunit are displayed.
+ showData boolean false (Optional) If true, the exact data are displayed on the chart.
+ trendLine boolean false (Optional) If true, trend line(s) are added.
+ hideLegend boolean false (Optional) If true, the legend is not visible.
+ hideSubtitle boolean false (Optional) If true, the subtitle is not visible.
+ userOrganisationUnit boolean false (Optional) If true, the provided orgunits are replaced by the user orgunit.
+ userOrganisationUnitChildren boolean false (Optional) If true, the provided orgunits are replaced by the user orgunit children.
+ targetLineValue integer (Optional) The value of the target line.
+ targetLineLabel string (Optional) The legend name of the target line. Requires targetLineValue, otherwise ignored.
+ baseLineValue integer (Optional) The value of the base line.
+ baseLineLabel string (Optional) The legend name of the base line. Requires baseLineValue, otherwise ignored.
+ domainAxisLabel string (Optional) Domain axis (usually the x axis) label.
+ rangeAxisLabel string (Optional) Range axis (usually the y axis) label.
+ legendPosition string 'top' (Optional) Positions: 'top', 'right', 'bottom' or 'left'.
+ el string (Required) The element id to render the chart.
+ width integer <el width> (Optional) Chart width. Default is the element width.
+ height integer <el height> (Optional) Chart height. Default is the element height.
+ url string (Required) The base url of the DHIS instance.
-->
</head>
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/plugin.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/plugin.js 2012-05-19 11:11:26 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin/plugin.js 2012-05-19 11:33:16 +0000
@@ -270,7 +270,7 @@
return {
type: 'Numeric',
position: 'left',
- title: project.state.conf.rangeAxisLabel || false,
+ title: project.state.conf.rangeAxisLabel,
labelTitle: {
font: '17px ' + DHIS.chart.conf.chart.style.font
},
@@ -297,7 +297,7 @@
return {
type: 'Category',
position: 'bottom',
- title: project.state.conf.domainAxisLabel || false,
+ title: project.state.conf.domainAxisLabel,
labelTitle: {
font: '17px ' + DHIS.chart.conf.chart.style.font
},
@@ -694,6 +694,8 @@
targetLineLabel: null,
baseLineValue: null,
baseLineLabel: null,
+ domainAxisLabel: null,
+ rangeAxisLabel: null,
url: ''
};
@@ -733,17 +735,18 @@
conf.series = r.series.toLowerCase();
conf.category = r.category.toLowerCase();
conf.filter = r.filter.toLowerCase();
- conf.showData = r.showData || false,
- conf.trendLine = r.regression || false,
- conf.hideLegend = r.hideLegend || false,
- conf.hideSubtitle = r.hideSubtitle || false,
- conf.userOrganisationUnit = r.userOrganisationUnit || false,
- conf.userOrganisationUnitChildren = r.userOrganisationUnitChildren || false,
- conf.targetLineValue = r.targetLineValue || null,
- conf.targetLineLabel = r.targetLineLabel || null,
- conf.baseLineValue = r.baseLineValue || null,
- conf.baseLineLabel = r.baseLineLabel || null,
- conf.legendPosition = conf.legendPosition || false;
+ conf.showData = r.showData || false;
+ conf.trendLine = r.regression || false;
+ conf.hideLegend = r.hideLegend || false;
+ conf.hideSubtitle = r.hideSubtitle || false;
+ conf.userOrganisationUnit = r.userOrganisationUnit || false;
+ conf.userOrganisationUnitChildren = r.userOrganisationUnitChildren || false;
+ conf.targetLineValue = r.targetLineValue || null;
+ conf.targetLineLabel = r.targetLineLabel || null;
+ conf.baseLineValue = r.baseLineValue || null;
+ conf.baseLineLabel = r.baseLineLabel || null;
+ conf.domainAxisLabel = r.domainAxisLabel || null;
+ conf.rangeAxisLabel = r.rangeAxisLabel || null;
if (r.indicators) {
conf.indicators = DHIS.chart.util.dimension.indicator.getIdsFromObjects(r.indicators);