UNPKG

@syncfusion/ej2-vue-charts

Version:

Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball. for Vue

1,328 lines (1,308 loc) 127 kB
import { Chart, AccumulationChart, RangeNavigator, Sparkline, Smithchart, StockChart, BulletChart, Chart3D, CircularChart3D } from '@syncfusion/ej2-charts'; export * from '@syncfusion/ej2-charts'; import { vueDefineComponent, isExecute, gh, getProps, ComponentBase } from '@syncfusion/ej2-vue-base'; import { isNullOrUndefined, isUndefined } from '@syncfusion/ej2-base'; var TrendlinesDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-trendlines'; } } }); var TrendlinesPlugin = { name: 'e-trendlines', install: function (Vue) { Vue.component(TrendlinesPlugin.name, TrendlinesDirective); } }; var TrendlineDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-trendline'; } } }); var TrendlinePlugin = { name: 'e-trendline', install: function (Vue) { Vue.component(TrendlinePlugin.name, TrendlineDirective); } }; var SegmentsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-segments'; } } }); var SegmentsPlugin = { name: 'e-segments', install: function (Vue) { Vue.component(SegmentsPlugin.name, SegmentsDirective); } }; var SegmentDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-segment'; } } }); var SegmentPlugin = { name: 'e-segment', install: function (Vue) { Vue.component(SegmentPlugin.name, SegmentDirective); } }; var SeriesCollectionDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-series-collection'; } } }); var SeriesCollectionPlugin = { name: 'e-series-collection', install: function (Vue) { Vue.component(SeriesCollectionPlugin.name, SeriesCollectionDirective); } }; var SeriesDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-series'; } } }); var SeriesPlugin = { name: 'e-series', install: function (Vue) { Vue.component(SeriesPlugin.name, SeriesDirective); } }; var StripLinesDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-striplines'; } } }); var StripLinesPlugin = { name: 'e-striplines', install: function (Vue) { Vue.component(StripLinesPlugin.name, StripLinesDirective); } }; var StripLineDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-stripline'; } } }); var StripLinePlugin = { name: 'e-stripline', install: function (Vue) { Vue.component(StripLinePlugin.name, StripLineDirective); } }; var CategoriesDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-categories'; } } }); var CategoriesPlugin = { name: 'e-categories', install: function (Vue) { Vue.component(CategoriesPlugin.name, CategoriesDirective); } }; var CategoryDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-category'; } } }); var CategoryPlugin = { name: 'e-category', install: function (Vue) { Vue.component(CategoryPlugin.name, CategoryDirective); } }; var MultiLevelLabelsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-multilevellabels'; } } }); var MultiLevelLabelsPlugin = { name: 'e-multilevellabels', install: function (Vue) { Vue.component(MultiLevelLabelsPlugin.name, MultiLevelLabelsDirective); } }; var MultiLevelLabelDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-multilevellabel'; } } }); var MultiLevelLabelPlugin = { name: 'e-multilevellabel', install: function (Vue) { Vue.component(MultiLevelLabelPlugin.name, MultiLevelLabelDirective); } }; var AxesDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-axes'; } } }); var AxesPlugin = { name: 'e-axes', install: function (Vue) { Vue.component(AxesPlugin.name, AxesDirective); } }; var AxisDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-axis'; } } }); var AxisPlugin = { name: 'e-axis', install: function (Vue) { Vue.component(AxisPlugin.name, AxisDirective); } }; var RowsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-rows'; } } }); var RowsPlugin = { name: 'e-rows', install: function (Vue) { Vue.component(RowsPlugin.name, RowsDirective); } }; var RowDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-row'; } } }); var RowPlugin = { name: 'e-row', install: function (Vue) { Vue.component(RowPlugin.name, RowDirective); } }; var ColumnsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-columns'; } } }); var ColumnsPlugin = { name: 'e-columns', install: function (Vue) { Vue.component(ColumnsPlugin.name, ColumnsDirective); } }; var ColumnDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-column'; } } }); var ColumnPlugin = { name: 'e-column', install: function (Vue) { Vue.component(ColumnPlugin.name, ColumnDirective); } }; var RangeColorSettingsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-rangecolorsettings'; } } }); var RangeColorSettingsPlugin = { name: 'e-rangecolorsettings', install: function (Vue) { Vue.component(RangeColorSettingsPlugin.name, RangeColorSettingsDirective); } }; var RangeColorSettingDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-rangecolorsetting'; } } }); var RangeColorSettingPlugin = { name: 'e-rangecolorsetting', install: function (Vue) { Vue.component(RangeColorSettingPlugin.name, RangeColorSettingDirective); } }; var AnnotationsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-annotations'; } } }); var AnnotationsPlugin = { name: 'e-annotations', install: function (Vue) { Vue.component(AnnotationsPlugin.name, AnnotationsDirective); } }; /** * `e-annotation` directive represent a annotation of the VueJS Chart. * It must be contained in a Chart component(`ejs-chart`). * ```vue * <ejs-chart> * <e-annotations> * <e-annotation content='ID' /> * <e-annotation content='ID' /> * </e-annotations> * </ejs-chart> * ``` */ var AnnotationDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-annotation'; } } }); var AnnotationPlugin = { name: 'e-annotation', install: function (Vue) { Vue.component(AnnotationPlugin.name, AnnotationDirective); } }; var SelectedDataIndexesDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-selecteddataindexes'; } } }); var SelectedDataIndexesPlugin = { name: 'e-selecteddataindexes', install: function (Vue) { Vue.component(SelectedDataIndexesPlugin.name, SelectedDataIndexesDirective); } }; var SelectedDataIndexDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-selecteddataindex'; } } }); var SelectedDataIndexPlugin = { name: 'e-selecteddataindex', install: function (Vue) { Vue.component(SelectedDataIndexPlugin.name, SelectedDataIndexDirective); } }; var IndicatorsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-indicators'; } } }); var IndicatorsPlugin = { name: 'e-indicators', install: function (Vue) { Vue.component(IndicatorsPlugin.name, IndicatorsDirective); } }; var IndicatorDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-indicator'; } } }); var IndicatorPlugin = { name: 'e-indicator', install: function (Vue) { Vue.component(IndicatorPlugin.name, IndicatorDirective); } }; var properties = ['isLazyUpdate', 'plugins', 'accessibility', 'allowExport', 'allowMultiSelection', 'annotations', 'axes', 'background', 'backgroundImage', 'border', 'chartArea', 'columns', 'crosshair', 'currencyCode', 'dataSource', 'description', 'enableAnimation', 'enableAutoIntervalOnBothAxis', 'enableCanvas', 'enableExport', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'enableSideBySidePlacement', 'focusBorderColor', 'focusBorderMargin', 'focusBorderWidth', 'height', 'highlightColor', 'highlightMode', 'highlightPattern', 'indicators', 'isMultiSelect', 'isTransposed', 'legendSettings', 'locale', 'margin', 'palettes', 'primaryXAxis', 'primaryYAxis', 'rangeColorSettings', 'rows', 'selectedDataIndexes', 'selectionMode', 'selectionPattern', 'series', 'stackLabels', 'subTitle', 'subTitleStyle', 'tabIndex', 'theme', 'title', 'titleStyle', 'tooltip', 'useGroupingSeparator', 'width', 'zoomSettings', 'afterExport', 'animationComplete', 'annotationRender', 'axisLabelClick', 'axisLabelRender', 'axisMultiLabelRender', 'axisRangeCalculated', 'beforeExport', 'beforePrint', 'beforeResize', 'chartDoubleClick', 'chartMouseClick', 'chartMouseDown', 'chartMouseLeave', 'chartMouseMove', 'chartMouseUp', 'drag', 'dragComplete', 'dragEnd', 'dragStart', 'legendClick', 'legendRender', 'load', 'loaded', 'multiLevelLabelClick', 'onZooming', 'pointClick', 'pointDoubleClick', 'pointMove', 'pointRender', 'resized', 'scrollChanged', 'scrollEnd', 'scrollStart', 'selectionComplete', 'seriesRender', 'sharedTooltipRender', 'textRender', 'tooltipRender', 'zoomComplete']; var modelProps = ['dataSource']; var testProp = getProps({ props: properties }); var props = testProp[0], watch = testProp[1], emitProbs = Object.keys(watch); emitProbs.push('modelchanged', 'update:modelValue'); for (var _i = 0, modelProps_1 = modelProps; _i < modelProps_1.length; _i++) { var props_1 = modelProps_1[_i]; emitProbs.push('update:' + props_1); } /** * Represents Vuejs chart Component * ```vue * <ejs-chart></ejs-chart> * ``` */ var ChartComponent = vueDefineComponent({ name: 'ChartComponent', mixins: [ComponentBase], props: props, watch: watch, emits: emitProbs, model: { event: 'modelchanged' }, provide: function () { return { custom: this.custom }; }, data: function () { return { ej2Instances: new Chart({}), propKeys: properties, models: modelProps, hasChildDirective: true, hasInjectedModules: true, tagMapper: { "e-series-collection": { "e-series": { "e-trendlines": "e-trendline", "e-segments": "e-segment" } }, "e-axes": { "e-axis": { "e-striplines": "e-stripline", "e-multilevellabels": { "e-multilevellabel": { "e-categories": "e-category" } } } }, "e-rows": "e-row", "e-columns": "e-column", "e-rangecolorsettings": "e-rangecolorsetting", "e-annotations": "e-annotation", "e-selecteddataindexes": "e-selecteddataindex", "e-indicators": "e-indicator" }, tagNameMapper: { "e-series-collection": "e-series", "e-striplines": "e-stripLines", "e-multilevellabels": "e-multiLevelLabels", "e-rangecolorsettings": "e-rangeColorSettings", "e-selecteddataindexes": "e-selectedDataIndexes" }, isVue3: !isExecute, templateCollection: {}, }; }, created: function () { this.ej2Instances._trigger = this.ej2Instances.trigger; this.ej2Instances.trigger = this.trigger; this.bindProperties(); this.ej2Instances._setProperties = this.ej2Instances.setProperties; this.ej2Instances.setProperties = this.setProperties; this.ej2Instances.clearTemplate = this.clearTemplate; this.updated = this.updated; }, render: function (createElement) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', slots); }, methods: { clearTemplate: function (templateNames) { if (!templateNames) { templateNames = Object.keys(this.templateCollection || {}); } if (templateNames.length && this.templateCollection) { for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) { var tempName = templateNames_1[_i]; var elementCollection = this.templateCollection[tempName]; if (elementCollection && elementCollection.length) { for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) { var ele = elementCollection_1[_a]; this.destroyPortals(ele); } delete this.templateCollection[tempName]; } } } }, setProperties: function (prop, muteOnChange) { var _this = this; if (this.isVue3) { this.models = !this.models ? this.ej2Instances.referModels : this.models; } if (this.ej2Instances && this.ej2Instances._setProperties) { this.ej2Instances._setProperties(prop, muteOnChange); } if (prop && this.models && this.models.length) { Object.keys(prop).map(function (key) { _this.models.map(function (model) { if ((key === model) && !(/datasource/i.test(key))) { if (_this.isVue3) { _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]); } else { _this.$emit('update:' + key, prop[key]); _this.$emit('modelchanged', prop[key]); } } }); }); } }, trigger: function (eventName, eventProp, successHandler) { if (!isExecute) { this.models = !this.models ? this.ej2Instances.referModels : this.models; } if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) { var key = this.models.toString().match(/checked|value/) || []; var propKey = key[0]; if (eventProp && key && !isUndefined(eventProp[propKey])) { if (!isExecute) { this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]); this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]); this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]); } else { if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) { this.$emit('update:' + propKey, eventProp[propKey]); this.$emit('modelchanged', eventProp[propKey]); } } } } else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) { var key = this.models.toString().match(/currentView|selectedDate/) || []; var propKey = key[0]; if (eventProp && key && !isUndefined(eventProp[propKey])) { if (!isExecute) { this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]); this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]); } else { this.$emit('update:' + propKey, eventProp[propKey]); this.$emit('modelchanged', eventProp[propKey]); } } } if ((this.ej2Instances && this.ej2Instances._trigger)) { this.ej2Instances._trigger(eventName, eventProp, successHandler); } }, custom: function () { this.updated(); }, FindXYPointValue: function (mouseX, mouseY) { return this.ej2Instances.FindXYPointValue(mouseX, mouseY); }, addAxes: function (axisCollection) { return this.ej2Instances.addAxes(axisCollection); }, addSeries: function (seriesCollection) { return this.ej2Instances.addSeries(seriesCollection); }, clearSeries: function () { return this.ej2Instances.clearSeries(); }, destroy: function () { return this.ej2Instances.destroy(); }, export: function (type, fileName) { return this.ej2Instances.export(type, fileName); }, getLocalizedLabel: function (key) { return this.ej2Instances.getLocalizedLabel(key); }, hideCrosshair: function () { return this.ej2Instances.hideCrosshair(); }, hideTooltip: function () { return this.ej2Instances.hideTooltip(); }, isSecondaryAxis: function (axis) { return this.ej2Instances.isSecondaryAxis(axis); }, print: function (id) { return this.ej2Instances.print(id); }, processData: function (render) { return this.ej2Instances.processData(render); }, refreshLiveData: function () { return this.ej2Instances.refreshLiveData(); }, removeSeries: function (index) { return this.ej2Instances.removeSeries(index); }, setAnnotationValue: function (annotationIndex, content) { return this.ej2Instances.setAnnotationValue(annotationIndex, content); }, showCrosshair: function (x, y) { return this.ej2Instances.showCrosshair(x, y); }, showTooltip: function (x, y, isPoint) { return this.ej2Instances.showTooltip(x, y, isPoint); }, } }); var ChartPlugin = { name: 'ejs-chart', install: function (Vue) { Vue.component(ChartPlugin.name, ChartComponent); Vue.component(SeriesPlugin.name, SeriesDirective); Vue.component(SeriesCollectionPlugin.name, SeriesCollectionDirective); Vue.component(TrendlinePlugin.name, TrendlineDirective); Vue.component(TrendlinesPlugin.name, TrendlinesDirective); Vue.component(SegmentPlugin.name, SegmentDirective); Vue.component(SegmentsPlugin.name, SegmentsDirective); Vue.component(AxisPlugin.name, AxisDirective); Vue.component(AxesPlugin.name, AxesDirective); Vue.component(StripLinePlugin.name, StripLineDirective); Vue.component(StripLinesPlugin.name, StripLinesDirective); Vue.component(MultiLevelLabelPlugin.name, MultiLevelLabelDirective); Vue.component(MultiLevelLabelsPlugin.name, MultiLevelLabelsDirective); Vue.component(CategoryPlugin.name, CategoryDirective); Vue.component(CategoriesPlugin.name, CategoriesDirective); Vue.component(RowPlugin.name, RowDirective); Vue.component(RowsPlugin.name, RowsDirective); Vue.component(ColumnPlugin.name, ColumnDirective); Vue.component(ColumnsPlugin.name, ColumnsDirective); Vue.component(RangeColorSettingPlugin.name, RangeColorSettingDirective); Vue.component(RangeColorSettingsPlugin.name, RangeColorSettingsDirective); Vue.component(AnnotationPlugin.name, AnnotationDirective); Vue.component(AnnotationsPlugin.name, AnnotationsDirective); Vue.component(SelectedDataIndexPlugin.name, SelectedDataIndexDirective); Vue.component(SelectedDataIndexesPlugin.name, SelectedDataIndexesDirective); Vue.component(IndicatorPlugin.name, IndicatorDirective); Vue.component(IndicatorsPlugin.name, IndicatorsDirective); } }; var AccumulationSeriesCollectionDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-accumulation-series-collection'; } } }); var AccumulationSeriesCollectionPlugin = { name: 'e-accumulation-series-collection', install: function (Vue) { Vue.component(AccumulationSeriesCollectionPlugin.name, AccumulationSeriesCollectionDirective); } }; var AccumulationSeriesDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-accumulation-series'; } } }); var AccumulationSeriesPlugin = { name: 'e-accumulation-series', install: function (Vue) { Vue.component(AccumulationSeriesPlugin.name, AccumulationSeriesDirective); } }; var AccumulationAnnotationsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-accumulation-annotations'; } } }); var AccumulationAnnotationsPlugin = { name: 'e-accumulation-annotations', install: function (Vue) { Vue.component(AccumulationAnnotationsPlugin.name, AccumulationAnnotationsDirective); } }; var AccumulationAnnotationDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-accumulation-annotation'; } } }); var AccumulationAnnotationPlugin = { name: 'e-accumulation-annotation', install: function (Vue) { Vue.component(AccumulationAnnotationPlugin.name, AccumulationAnnotationDirective); } }; var properties$1 = ['isLazyUpdate', 'plugins', 'accessibility', 'allowExport', 'annotations', 'background', 'backgroundImage', 'border', 'center', 'centerLabel', 'currencyCode', 'dataSource', 'enableAnimation', 'enableBorderOnMouseMove', 'enableExport', 'enableHtmlSanitizer', 'enablePersistence', 'enableRtl', 'enableSmartLabels', 'focusBorderColor', 'focusBorderMargin', 'focusBorderWidth', 'height', 'highlightColor', 'highlightMode', 'highlightPattern', 'isMultiSelect', 'legendSettings', 'locale', 'margin', 'selectedDataIndexes', 'selectionMode', 'selectionPattern', 'series', 'subTitle', 'subTitleStyle', 'theme', 'title', 'titleStyle', 'tooltip', 'useGroupingSeparator', 'width', 'afterExport', 'animationComplete', 'annotationRender', 'beforeExport', 'beforePrint', 'beforeResize', 'chartDoubleClick', 'chartMouseClick', 'chartMouseDown', 'chartMouseLeave', 'chartMouseMove', 'chartMouseUp', 'legendClick', 'legendRender', 'load', 'loaded', 'pointClick', 'pointMove', 'pointRender', 'resized', 'selectionComplete', 'seriesRender', 'textRender', 'tooltipRender']; var modelProps$1 = ['dataSource']; var testProp$1 = getProps({ props: properties$1 }); var props$1 = testProp$1[0], watch$1 = testProp$1[1], emitProbs$1 = Object.keys(watch$1); emitProbs$1.push('modelchanged', 'update:modelValue'); for (var _i$1 = 0, modelProps_1$1 = modelProps$1; _i$1 < modelProps_1$1.length; _i$1++) { var props_1$1 = modelProps_1$1[_i$1]; emitProbs$1.push('update:' + props_1$1); } /** * Represents Vuejs AccumulationChart Component * ```vue * <ejs-accumulationchart></ejs-accumulationchart> * ``` */ var AccumulationChartComponent = vueDefineComponent({ name: 'AccumulationChartComponent', mixins: [ComponentBase], props: props$1, watch: watch$1, emits: emitProbs$1, model: { event: 'modelchanged' }, provide: function () { return { custom: this.custom }; }, data: function () { return { ej2Instances: new AccumulationChart({}), propKeys: properties$1, models: modelProps$1, hasChildDirective: true, hasInjectedModules: true, tagMapper: { "e-accumulation-series-collection": "e-accumulation-series", "e-accumulation-annotations": "e-accumulation-annotation" }, tagNameMapper: { "e-accumulation-series-collection": "e-series", "e-accumulation-annotations": "e-annotations" }, isVue3: !isExecute, templateCollection: {}, }; }, created: function () { this.ej2Instances._trigger = this.ej2Instances.trigger; this.ej2Instances.trigger = this.trigger; this.bindProperties(); this.ej2Instances._setProperties = this.ej2Instances.setProperties; this.ej2Instances.setProperties = this.setProperties; this.ej2Instances.clearTemplate = this.clearTemplate; this.updated = this.updated; }, render: function (createElement) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', slots); }, methods: { clearTemplate: function (templateNames) { if (!templateNames) { templateNames = Object.keys(this.templateCollection || {}); } if (templateNames.length && this.templateCollection) { for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) { var tempName = templateNames_1[_i]; var elementCollection = this.templateCollection[tempName]; if (elementCollection && elementCollection.length) { for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) { var ele = elementCollection_1[_a]; this.destroyPortals(ele); } delete this.templateCollection[tempName]; } } } }, setProperties: function (prop, muteOnChange) { var _this = this; if (this.isVue3) { this.models = !this.models ? this.ej2Instances.referModels : this.models; } if (this.ej2Instances && this.ej2Instances._setProperties) { this.ej2Instances._setProperties(prop, muteOnChange); } if (prop && this.models && this.models.length) { Object.keys(prop).map(function (key) { _this.models.map(function (model) { if ((key === model) && !(/datasource/i.test(key))) { if (_this.isVue3) { _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]); } else { _this.$emit('update:' + key, prop[key]); _this.$emit('modelchanged', prop[key]); } } }); }); } }, trigger: function (eventName, eventProp, successHandler) { if (!isExecute) { this.models = !this.models ? this.ej2Instances.referModels : this.models; } if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) { var key = this.models.toString().match(/checked|value/) || []; var propKey = key[0]; if (eventProp && key && !isUndefined(eventProp[propKey])) { if (!isExecute) { this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]); this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]); this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]); } else { if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) { this.$emit('update:' + propKey, eventProp[propKey]); this.$emit('modelchanged', eventProp[propKey]); } } } } else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) { var key = this.models.toString().match(/currentView|selectedDate/) || []; var propKey = key[0]; if (eventProp && key && !isUndefined(eventProp[propKey])) { if (!isExecute) { this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]); this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]); } else { this.$emit('update:' + propKey, eventProp[propKey]); this.$emit('modelchanged', eventProp[propKey]); } } } if ((this.ej2Instances && this.ej2Instances._trigger)) { this.ej2Instances._trigger(eventName, eventProp, successHandler); } }, custom: function () { this.updated(); }, calculateBounds: function () { return this.ej2Instances.calculateBounds(); }, export: function (type, fileName) { return this.ej2Instances.export(type, fileName); }, print: function (id) { return this.ej2Instances.print(id); }, setAnnotationValue: function (annotationIndex, content) { return this.ej2Instances.setAnnotationValue(annotationIndex, content); }, titleTooltip: function (event, x, y, isTouch) { return this.ej2Instances.titleTooltip(event, x, y, isTouch); }, } }); var AccumulationChartPlugin = { name: 'ejs-accumulationchart', install: function (Vue) { Vue.component(AccumulationChartPlugin.name, AccumulationChartComponent); Vue.component(AccumulationSeriesPlugin.name, AccumulationSeriesDirective); Vue.component(AccumulationSeriesCollectionPlugin.name, AccumulationSeriesCollectionDirective); Vue.component(AccumulationAnnotationPlugin.name, AccumulationAnnotationDirective); Vue.component(AccumulationAnnotationsPlugin.name, AccumulationAnnotationsDirective); } }; var RangenavigatorSeriesCollectionDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', { class: 'e-directive' }, slots); } return; }, updated: function () { if (!isExecute && this.custom) { this.custom(); } }, methods: { getTag: function () { return 'e-rangenavigator-series-collection'; } } }); var RangenavigatorSeriesCollectionPlugin = { name: 'e-rangenavigator-series-collection', install: function (Vue) { Vue.component(RangenavigatorSeriesCollectionPlugin.name, RangenavigatorSeriesCollectionDirective); } }; var RangenavigatorSeriesDirective = vueDefineComponent({ render: function () { return; }, methods: { getTag: function () { return 'e-rangenavigator-series'; } } }); var RangenavigatorSeriesPlugin = { name: 'e-rangenavigator-series', install: function (Vue) { Vue.component(RangenavigatorSeriesPlugin.name, RangenavigatorSeriesDirective); } }; var properties$2 = ['isLazyUpdate', 'plugins', 'allowIntervalData', 'allowSnapping', 'animationDuration', 'background', 'dataSource', 'disableRangeSelector', 'enableDeferredUpdate', 'enableGrouping', 'enablePersistence', 'enableRtl', 'groupBy', 'height', 'interval', 'intervalType', 'labelFormat', 'labelIntersectAction', 'labelPlacement', 'labelPosition', 'labelStyle', 'locale', 'logBase', 'majorGridLines', 'majorTickLines', 'margin', 'maximum', 'minimum', 'navigatorBorder', 'navigatorStyleSettings', 'periodSelectorSettings', 'query', 'secondaryLabelAlignment', 'series', 'skeleton', 'skeletonType', 'theme', 'tickPosition', 'tooltip', 'useGroupingSeparator', 'value', 'valueType', 'width', 'xName', 'yName', 'beforePrint', 'beforeResize', 'changed', 'labelRender', 'load', 'loaded', 'resized', 'selectorRender', 'tooltipRender']; var modelProps$2 = ['dataSource']; var testProp$2 = getProps({ props: properties$2 }); var props$2 = testProp$2[0], watch$2 = testProp$2[1], emitProbs$2 = Object.keys(watch$2); emitProbs$2.push('modelchanged', 'update:modelValue'); for (var _i$2 = 0, modelProps_1$2 = modelProps$2; _i$2 < modelProps_1$2.length; _i$2++) { var props_1$2 = modelProps_1$2[_i$2]; emitProbs$2.push('update:' + props_1$2); } /** * Represents Vuejs RangeNavigator Component * ```vue * <ejs-rangenavigator></ejs-rangenavigator> * ``` */ var RangeNavigatorComponent = vueDefineComponent({ name: 'RangeNavigatorComponent', mixins: [ComponentBase], props: props$2, watch: watch$2, emits: emitProbs$2, model: { event: 'modelchanged' }, provide: function () { return { custom: this.custom }; }, data: function () { return { ej2Instances: new RangeNavigator({}), propKeys: properties$2, models: modelProps$2, hasChildDirective: true, hasInjectedModules: true, tagMapper: { "e-rangenavigator-series-collection": "e-rangenavigator-series" }, tagNameMapper: { "e-rangenavigator-series-collection": "e-series" }, isVue3: !isExecute, templateCollection: {}, }; }, created: function () { this.ej2Instances._trigger = this.ej2Instances.trigger; this.ej2Instances.trigger = this.trigger; this.bindProperties(); this.ej2Instances._setProperties = this.ej2Instances.setProperties; this.ej2Instances.setProperties = this.setProperties; this.ej2Instances.clearTemplate = this.clearTemplate; this.updated = this.updated; }, render: function (createElement) { var h = !isExecute ? gh : createElement; var slots = null; if (!isNullOrUndefined(this.$slots.default)) { slots = !isExecute ? this.$slots.default() : this.$slots.default; } return h('div', slots); }, methods: { clearTemplate: function (templateNames) { if (!templateNames) { templateNames = Object.keys(this.templateCollection || {}); } if (templateNames.length && this.templateCollection) { for (var _i = 0, templateNames_1 = templateNames; _i < templateNames_1.length; _i++) { var tempName = templateNames_1[_i]; var elementCollection = this.templateCollection[tempName]; if (elementCollection && elementCollection.length) { for (var _a = 0, elementCollection_1 = elementCollection; _a < elementCollection_1.length; _a++) { var ele = elementCollection_1[_a]; this.destroyPortals(ele); } delete this.templateCollection[tempName]; } } } }, setProperties: function (prop, muteOnChange) { var _this = this; if (this.isVue3) { this.models = !this.models ? this.ej2Instances.referModels : this.models; } if (this.ej2Instances && this.ej2Instances._setProperties) { this.ej2Instances._setProperties(prop, muteOnChange); } if (prop && this.models && this.models.length) { Object.keys(prop).map(function (key) { _this.models.map(function (model) { if ((key === model) && !(/datasource/i.test(key))) { if (_this.isVue3) { _this.ej2Instances.vueInstance.$emit('update:' + key, prop[key]); } else { _this.$emit('update:' + key, prop[key]); _this.$emit('modelchanged', prop[key]); } } }); }); } }, trigger: function (eventName, eventProp, successHandler) { if (!isExecute) { this.models = !this.models ? this.ej2Instances.referModels : this.models; } if ((eventName === 'change' || eventName === 'input') && this.models && (this.models.length !== 0)) { var key = this.models.toString().match(/checked|value/) || []; var propKey = key[0]; if (eventProp && key && !isUndefined(eventProp[propKey])) { if (!isExecute) { this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]); this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]); this.ej2Instances.vueInstance.$emit('update:modelValue', eventProp[propKey]); } else { if (eventName === 'change' || (this.$props && !this.$props.isLazyUpdate)) { this.$emit('update:' + propKey, eventProp[propKey]); this.$emit('modelchanged', eventProp[propKey]); } } } } else if ((eventName === 'actionBegin' && eventProp.requestType === 'dateNavigate') && this.models && (this.models.length !== 0)) { var key = this.models.toString().match(/currentView|selectedDate/) || []; var propKey = key[0]; if (eventProp && key && !isUndefined(eventProp[propKey])) { if (!isExecute) { this.ej2Instances.vueInstance.$emit('update:' + propKey, eventProp[propKey]); this.ej2Instances.vueInstance.$emit('modelchanged', eventProp[propKey]); } else { this.$emit('update:' + propKey, eventProp[propKey]); this.$emit('modelchanged', eventProp[propKey]); } } } if ((this.ej2Instances && this.ej2Instances._trigger)) { this.ej2Instances._trigger(eventName, eventProp, successHandler); } }, custom: function () { this.updated(); }, createSecondaryElement: function () { return this.ej2Instances.createSecondaryElement(); }, destroy: function () { return this.ej2Instances.destroy(); }, export: function (type, fileName, orientation, controls, width, height, isVertical) { return this.ej2Instances.export(type, fileName, orientation, controls, width, height, isVertical); }, print: function (id) { return this.ej2Instances.print(id); }, renderChart: function (resize) { return this.ej2Instances.renderChart(resize); }, } }); var RangeNavigatorPlugin = { name: 'ejs-rangenavigator', install: function (Vue) { Vue.component(RangeNavigatorPlugin.name, RangeNavigatorComponent); Vue.component(RangenavigatorSeriesPlugin.name, RangenavigatorSeriesDirective); Vue.component(RangenavigatorSeriesCollectionPlugin.name, RangenavigatorSeriesCollectionDirective); } }; var RangeBandSettingsDirective = vueDefineComponent({ inject: { custom: { default: null } }, render: function (createElement) { if (!isExecute) { var h = !isExec