@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
61 lines (60 loc) • 1.68 kB
JavaScript
import { gh, isExecute, vueDefineComponent } from '@syncfusion/ej2-vue-base';
import { isNullOrUndefined } from '@syncfusion/ej2-base';
export 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';
}
}
});
export 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>
* ```
*/
export var AnnotationDirective = vueDefineComponent({
render: function () {
return;
},
methods: {
getTag: function () {
return 'e-annotation';
}
}
});
export var AnnotationPlugin = {
name: 'e-annotation',
install: function (Vue) {
Vue.component(AnnotationPlugin.name, AnnotationDirective);
}
};