dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15697
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5756: (DV) Hide legend option implemented.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5756 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-01-19 14:03:27 +0100
message:
(DV) Hide legend option implemented.
modified:
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.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-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-01-18 16:12:08 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-01-19 13:00:43 +0000
@@ -991,6 +991,7 @@
dataelementIds: [],
relativePeriods: {},
organisationunitIds: [],
+ hideLegend: false,
isRendered: false,
getState: function(exe) {
this.resetState();
@@ -1024,6 +1025,8 @@
this.relativePeriods = DV.util.dimension.period.getRelativePeriodObject();
this.organisationunitIds = DV.util.dimension.organisationunit.getIds();
+ this.hideLegend = DV.cmp.favorite.hidelegend.getValue();
+
this.isRendered = true;
if (exe) {
@@ -1127,6 +1130,7 @@
DV.cmp.favorite.trendline.setValue(f.regression);
DV.cmp.favorite.hidesubtitle.setValue(f.hideSubtitle);
+ this.hideLegend = f.hideLegend;
DV.cmp.favorite.hidelegend.setValue(f.hideLegend);
DV.cmp.favorite.userorganisationunit.setValue(f.userOrganisationUnit);
DV.cmp.favorite.xaxislabel.setValue(f.domainAxisLabel);
@@ -1256,7 +1260,7 @@
store: DV.store.chart,
insetPadding: DV.conf.chart.style.inset,
items: DV.util.chart.getTitle(),
- legend: DV.util.chart.getLegend(),
+ legend: DV.state.hideLegend ? false : DV.util.chart.getLegend(),
axes: [
{
type: 'Numeric',
@@ -1299,7 +1303,7 @@
store: DV.store.chart,
insetPadding: DV.conf.chart.style.inset,
items: DV.util.chart.getTitle(),
- legend: DV.util.chart.getLegend(DV.store.chart.bottom.length),
+ legend: DV.state.hideLegend ? false : DV.util.chart.getLegend(DV.store.chart.bottom.length),
axes: [
{
type: 'Category',
@@ -1342,7 +1346,7 @@
store: DV.store.chart,
insetPadding: DV.conf.chart.style.inset,
items: DV.util.chart.getTitle(),
- legend: DV.util.chart.getLegend(),
+ legend: DV.state.hideLegend ? false : DV.util.chart.getLegend(),
axes: [
{
type: 'Numeric',
@@ -1371,7 +1375,7 @@
store: DV.store.chart,
insetPadding: DV.conf.chart.style.inset,
items: DV.util.chart.getTitle(),
- legend: DV.util.chart.getLegend(),
+ legend: DV.state.hideLegend ? false : DV.util.chart.getLegend(),
axes: [
{
type: 'Numeric',
@@ -1409,7 +1413,7 @@
store: DV.store.chart,
insetPadding: 60,
items: DV.util.chart.pie.getTitle(),
- legend: DV.util.chart.getLegend(DV.state.category.names.length),
+ legend: DV.state.hideLegend ? false : DV.util.chart.getLegend(DV.state.category.names.length),
series: [{
type: 'pie',
field: DV.store.chart.left[0],