added long lables to Charting Library
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -310,18 +310,18 @@ ViewDashboardPresenter.prototype.statusViewModel = function(indicatorId, data) {
|
|||||||
$.each(data.dataList, function(index, originalObject) {
|
$.each(data.dataList, function(index, originalObject) {
|
||||||
|
|
||||||
originalObject.taskTitle = that.helper.labelIfEmpty(originalObject.taskTitle);
|
originalObject.taskTitle = that.helper.labelIfEmpty(originalObject.taskTitle);
|
||||||
var title = originalObject.taskTitle.substring(0,10);
|
//var title = originalObject.taskTitle.substring(0,10);
|
||||||
|
|
||||||
var newObject1 = {
|
var newObject1 = {
|
||||||
datalabel : title,
|
datalabel : originalObject.taskTitle,
|
||||||
value : originalObject.percentageTotalOverdue
|
value : originalObject.percentageTotalOverdue
|
||||||
};
|
};
|
||||||
var newObject2 = {
|
var newObject2 = {
|
||||||
datalabel : title,
|
datalabel : originalObject.taskTitle,
|
||||||
value : originalObject.percentageTotalAtRisk
|
value : originalObject.percentageTotalAtRisk
|
||||||
};
|
};
|
||||||
var newObject3 = {
|
var newObject3 = {
|
||||||
datalabel : title,
|
datalabel : originalObject.taskTitle,
|
||||||
value : originalObject.percentageTotalOnTime
|
value : originalObject.percentageTotalOnTime
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -338,6 +338,11 @@ ViewDashboardPresenter.prototype.statusViewModel = function(indicatorId, data) {
|
|||||||
originalObject.indicatorId = indicatorId;
|
originalObject.indicatorId = indicatorId;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
that.makeShortLabel(graph1Data, 10);
|
||||||
|
that.makeShortLabel(graph2Data, 10);
|
||||||
|
that.makeShortLabel(graph3Data, 10);
|
||||||
|
|
||||||
var retval = data;
|
var retval = data;
|
||||||
retval.graph1Data = this.orderGraphData(graph1Data, "down").splice(0,7)
|
retval.graph1Data = this.orderGraphData(graph1Data, "down").splice(0,7)
|
||||||
retval.graph2Data = this.orderGraphData(graph2Data, "down").splice(0,7)
|
retval.graph2Data = this.orderGraphData(graph2Data, "down").splice(0,7)
|
||||||
@@ -517,10 +522,15 @@ ViewDashboardPresenter.prototype.adaptGraphData = function(listData) {
|
|||||||
|
|
||||||
ViewDashboardPresenter.prototype.makeShortLabel = function(listData, labelLength) {
|
ViewDashboardPresenter.prototype.makeShortLabel = function(listData, labelLength) {
|
||||||
$.each(listData, function(index, item) {
|
$.each(listData, function(index, item) {
|
||||||
|
var longLabel = (item.datalabel == null)
|
||||||
|
? ""
|
||||||
|
: item.datalabel.substring(0, 50);
|
||||||
|
|
||||||
var shortLabel = (item.datalabel == null)
|
var shortLabel = (item.datalabel == null)
|
||||||
? ""
|
? ""
|
||||||
: item.datalabel.substring(0,labelLength);
|
: item.datalabel.substring(0, labelLength);
|
||||||
item.datalabel = shortLabel;
|
|
||||||
item.datalabel = shortLabel;
|
item.datalabel = shortLabel;
|
||||||
|
item.longlabel = longLabel;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -590,7 +590,7 @@ var fillStatusIndicatorFirstView = function (presenterData) {
|
|||||||
|
|
||||||
allowDrillDown:true,
|
allowDrillDown:true,
|
||||||
allowTransition:true,
|
allowTransition:true,
|
||||||
showTip: false,
|
showTip: true,
|
||||||
allowZoom: false,
|
allowZoom: false,
|
||||||
showLabels: true
|
showLabels: true
|
||||||
}
|
}
|
||||||
@@ -650,7 +650,7 @@ var fillSpecialIndicatorFirstView = function(presenterData) {
|
|||||||
graph: {
|
graph: {
|
||||||
allowDrillDown:false,
|
allowDrillDown:false,
|
||||||
allowTransition:true,
|
allowTransition:true,
|
||||||
showTip: false,
|
showTip: true,
|
||||||
allowZoom: false,
|
allowZoom: false,
|
||||||
gapWidth:0.3,
|
gapWidth:0.3,
|
||||||
useShadows: true,
|
useShadows: true,
|
||||||
@@ -674,7 +674,7 @@ var fillSpecialIndicatorFirstView = function(presenterData) {
|
|||||||
axisY:{ showAxis: true, label: G_STRING['ID_COSTS']},
|
axisY:{ showAxis: true, label: G_STRING['ID_COSTS']},
|
||||||
gridLinesX:false,
|
gridLinesX:false,
|
||||||
gridLinesY:true,
|
gridLinesY:true,
|
||||||
showTip: false,
|
showTip: true,
|
||||||
allowZoom: false,
|
allowZoom: false,
|
||||||
useShadows: true,
|
useShadows: true,
|
||||||
paddingTop: 50,
|
paddingTop: 50,
|
||||||
@@ -747,7 +747,7 @@ var fillSpecialIndicatorSecondView = function(presenterData) {
|
|||||||
graph: {
|
graph: {
|
||||||
allowTransition: false,
|
allowTransition: false,
|
||||||
allowDrillDown: true,
|
allowDrillDown: true,
|
||||||
showTip: false,
|
showTip: true,
|
||||||
allowZoom: false,
|
allowZoom: false,
|
||||||
useShadows: false,
|
useShadows: false,
|
||||||
gridLinesX: true,
|
gridLinesX: true,
|
||||||
@@ -837,7 +837,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
|
|||||||
graph: {
|
graph: {
|
||||||
allowTransition: false,
|
allowTransition: false,
|
||||||
allowDrillDown: true,
|
allowDrillDown: true,
|
||||||
showTip: false,
|
showTip: true,
|
||||||
allowZoom: false,
|
allowZoom: false,
|
||||||
useShadows: false,
|
useShadows: false,
|
||||||
gridLinesX: true,
|
gridLinesX: true,
|
||||||
@@ -859,7 +859,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
|
|||||||
graph: {
|
graph: {
|
||||||
allowTransition: false,
|
allowTransition: false,
|
||||||
allowDrillDown: true,
|
allowDrillDown: true,
|
||||||
showTip: false,
|
showTip: true,
|
||||||
allowZoom: false,
|
allowZoom: false,
|
||||||
useShadows: false,
|
useShadows: false,
|
||||||
gridLinesX: true,
|
gridLinesX: true,
|
||||||
@@ -885,7 +885,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
|
|||||||
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
|
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
|
||||||
gridLinesX:false,
|
gridLinesX:false,
|
||||||
gridLinesY:true,
|
gridLinesY:true,
|
||||||
showTip: false,
|
showTip: true,
|
||||||
allowZoom: false,
|
allowZoom: false,
|
||||||
useShadows: true,
|
useShadows: true,
|
||||||
paddingTop: 50,
|
paddingTop: 50,
|
||||||
@@ -907,7 +907,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
|
|||||||
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
|
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
|
||||||
gridLinesX:false,
|
gridLinesX:false,
|
||||||
gridLinesY:true,
|
gridLinesY:true,
|
||||||
showTip: false,
|
showTip: true,
|
||||||
allowZoom: false,
|
allowZoom: false,
|
||||||
useShadows: true,
|
useShadows: true,
|
||||||
paddingTop: 50,
|
paddingTop: 50,
|
||||||
|
|||||||
Reference in New Issue
Block a user