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