js label cond updated

This commit is contained in:
projectsodoo 2021-03-02 23:27:21 +05:30
parent 0d09f22f27
commit 23405a5407
1 changed files with 3 additions and 5 deletions

View File

@ -145,8 +145,8 @@ 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("/");
var datasetLabel = dataPt.labels.slice(0).join("/");
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] +
(datasetLabel ? ('/' + datasetLabel) : '');
@ -295,7 +295,6 @@ var MAX_LEGEND_LENGTH = 25 * (1 + config.device.size_class);
label = this._relabelling(label, dataset.originIndex);
if (this.state.processedGroupBy.length > 1 || this.state.origins.length > 1) {
label = label + "/" + dataset.label;
label = dataset.label;
}
value = this._formatValue(item.yLabel);
boxColor = dataset.backgroundColor;
@ -306,8 +305,7 @@ 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;
label = dataset.label;
label = label + "/" + dataset.label;
}
value = this._formatValue(item.xLabel);
boxColor = dataset.backgroundColor;