Add label column to data keys
@@ -226,6 +226,7 @@ export class ExplorerComponent implements OnInit {
processReceivedData(res) {
if (res.total > 0) {
+ res.measureName = this.selectedInfoResult.measureName;
this.data = res as DataResult;
this.noDateFoundinTimeRange = false;
if (this.yAxesKeys.length === 0) {
@@ -259,7 +260,7 @@ export class ExplorerComponent implements OnInit {
this.selectedInfoResult = this._filter(index)[0];
this.selectedInfoResult.eventSchema.eventProperties.forEach(property => {
- //Check if property is Primitive (only primitives has a runtimeType
+ //Check if property is Primitive (only primitives has a runtimeType)
if (property['runtimeType'] !== undefined) {
if (property['propertyScope'] !== undefined && property['propertyScope'] === 'DIMENSION_PROPERTY') {
this.dimensionProperties.push(property['runtimeName'])
@@ -271,6 +272,11 @@ export class ExplorerComponent implements OnInit {
this.dataKeys.push(property['runtimeName']);
}
+ else if (this.isLabelProperty(property) &&
+ (property['domainProperties'] === undefined || (property.domainProperty !== 'http://schema.org/DateTime' &&
+ property['domainProperties'][0] != 'http://schema.org/DateTime'))) {
+ this.dataKeys.push(property['runtimeName']);
+ }
} else {
//list and nested properties
this.dataKeys.push(property['runtimeName'])
@@ -402,6 +408,16 @@ export class ExplorerComponent implements OnInit {
}
}
+ isLabelProperty(prop) {
+ if (prop.runtimeType === 'http://www.w3.org/2001/XMLSchema#string' &&
+ prop.runtimeName === 'sp_internal_label') {
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+
zoomEventHandler(timeRange) {
this.selectedTimeUnit = 'Custom';
if (timeRange[0] !== undefined) {
