UNPKG

3.62 kBJavaScriptView Raw
1import { f as InterpolationFunctions, U as Utils, D as DataTypes, a as EventElementTypes } from './Utils-38a0872e.js';
2
3var DEFAULT_HEIGHT = 40;
4// Represents an expression that is suitable for use as the expression options parameter in a chart component
5var ChartDataOptions = /** @class */ (function () {
6 function ChartDataOptions(optionsObject) {
7 this.interpolationFunction = InterpolationFunctions.None;
8 this.yExtent = null;
9 this.includeEnvelope = false;
10 this.includeDots = false;
11 this.visibilityState = null;
12 this.connectPoints = false;
13 this.pointConnectionMeasure = '';
14 this.searchSpan = Utils.getValueOrDefault(optionsObject, 'searchSpan');
15 this.measureTypes = Utils.getValueOrDefault(optionsObject, 'measureTypes');
16 this.color = Utils.getValueOrDefault(optionsObject, 'color');
17 this.alias = Utils.getValueOrDefault(optionsObject, 'alias');
18 this.contextMenu = Utils.getValueOrDefault(optionsObject, 'contextMenu', []);
19 this.interpolationFunction = Utils.getValueOrDefault(optionsObject, 'interpolationFunction', InterpolationFunctions.None);
20 this.includeEnvelope = Utils.getValueOrDefault(optionsObject, 'includeEnvelope', false);
21 this.includeDots = Utils.getValueOrDefault(optionsObject, 'includeDots', false);
22 this.visibilityState = Utils.getValueOrDefault(optionsObject, 'visibilityState');
23 this.yExtent = Utils.getValueOrDefault(optionsObject, 'yExtent');
24 this.timeShift = Utils.getValueOrDefault(optionsObject, 'timeShift', '');
25 this.dataType = Utils.getValueOrDefault(optionsObject, 'dataType', DataTypes.Numeric);
26 this.valueMapping = Utils.getValueOrDefault(optionsObject, 'valueMapping', {});
27 this.height = Utils.getValueOrDefault(optionsObject, 'height', DEFAULT_HEIGHT);
28 this.onElementClick = Utils.getValueOrDefault(optionsObject, 'onElementClick', null);
29 this.eventElementType = Utils.getValueOrDefault(optionsObject, 'eventElementType', EventElementTypes.Diamond);
30 this.rollupCategoricalValues = Utils.getValueOrDefault(optionsObject, 'rollupCategoricalValues', false);
31 this.tooltipAttributes = Utils.getValueOrDefault(optionsObject, 'tooltipAttributes', []);
32 this.positionX = Utils.getValueOrDefault(optionsObject, 'positionX', 0);
33 this.positionY = Utils.getValueOrDefault(optionsObject, 'positionY', 0);
34 this.swimLane = Utils.getValueOrDefault(optionsObject, 'swimLane', null);
35 this.variableAlias = Utils.getValueOrDefault(optionsObject, 'variableAlias', null);
36 this.connectPoints = Utils.getValueOrDefault(optionsObject, "connectPoints", false);
37 this.pointConnectionMeasure = Utils.getValueOrDefault(optionsObject, 'pointConnectionMeasure', '');
38 this.positionXVariableName = Utils.getValueOrDefault(optionsObject, 'positionXVariableName', null);
39 this.positionYVariableName = Utils.getValueOrDefault(optionsObject, 'positionYVariableName', null);
40 this.image = Utils.getValueOrDefault(optionsObject, 'image', null);
41 this.startAt = Utils.getValueOrDefault(optionsObject, 'startAt', null);
42 this.isRawData = Utils.getValueOrDefault(optionsObject, 'isRawData', false);
43 this.isVariableAliasShownOnTooltip = Utils.getValueOrDefault(optionsObject, 'isVariableAliasShownOnTooltip', true);
44 this.horizontalMarkers = Utils.getValueOrDefault(optionsObject, 'horizontalMarkers', []);
45 }
46 return ChartDataOptions;
47}());
48
49export { ChartDataOptions as C };