Js label valid updated
This commit is contained in:
parent
23405a5407
commit
128ce82d23
|
@ -145,7 +145,13 @@ var MAX_LEGEND_LENGTH = 25 * (1 + config.device.size_class);
|
|||
_getDatasetLabel: function (dataPt) {
|
||||
if (_.contains(['bar', 'horizontalBar', 'line'], this.state.mode)) {
|
||||
// ([origin] + second to last groupBys) or measure
|
||||
var datasetLabel = dataPt.labels.slice(1).join("/");
|
||||
//console.log("dataPt.labels", dataPt.labels, dataPt.labels.length, typeof dataPt.labels, self.resModel, this.resModel);
|
||||
if ((dataPt.labels.length > 2) && (this.resModel == 'project.timeline.report' || this.resModel == 'project.budget.hrs.report')) {
|
||||
var datasetLabel = dataPt.labels.slice(0).join("/");
|
||||
}
|
||||
else {
|
||||
var datasetLabel = dataPt.labels.slice(1).join("/");
|
||||
}
|
||||
//var datasetLabel = dataPt.labels.slice(0).join("/");
|
||||
if (this.state.origins.length > 1) {
|
||||
datasetLabel = this.state.origins[dataPt.originIndex] +
|
||||
|
@ -294,7 +300,13 @@ var MAX_LEGEND_LENGTH = 25 * (1 + config.device.size_class);
|
|||
if (this.state.mode === 'bar') {
|
||||
label = this._relabelling(label, dataset.originIndex);
|
||||
if (this.state.processedGroupBy.length > 1 || this.state.origins.length > 1) {
|
||||
label = label + "/" + dataset.label;
|
||||
if (this.resModel == 'project.timeline.report' || this.resModel == 'project.budget.hrs.report')
|
||||
{
|
||||
label = dataset.label;
|
||||
}
|
||||
else{
|
||||
label = label + "/" + dataset.label;
|
||||
}
|
||||
}
|
||||
value = this._formatValue(item.yLabel);
|
||||
boxColor = dataset.backgroundColor;
|
||||
|
@ -305,7 +317,13 @@ var MAX_LEGEND_LENGTH = 25 * (1 + config.device.size_class);
|
|||
} else if (this.state.mode === 'horizontalBar') {
|
||||
label = this._relabelling(label, dataset.originIndex);
|
||||
if (this.state.processedGroupBy.length > 1 || this.state.origins.length > 1) {
|
||||
label = label + "/" + dataset.label;
|
||||
if (this.resModel == 'project.timeline.report' || this.resModel == 'project.budget.hrs.report')
|
||||
{
|
||||
label = dataset.label;
|
||||
}
|
||||
else{
|
||||
label = label + "/" + dataset.label;
|
||||
}
|
||||
}
|
||||
value = this._formatValue(item.xLabel);
|
||||
boxColor = dataset.backgroundColor;
|
||||
|
|
Loading…
Reference in New Issue