
|
<template>
<div class="control-section">
<div align='center'>
<ejs-chart :annotations='annotations'> // add additional code here
</ejs-chart>
</div>
</div>
</template>
<script>
import Vue from "vue";
import { Browser } from '@syncfusion/ej2-base';
import { ChartPlugin, StackingColumnSeries, ChartAnnotation, DataLabel, Legend, Category, Tooltip} from "@syncfusion/ej2-vue-charts";
let contentVue = Vue.component("contentTemplate", {
template: '<div id="text">Chart Title</div>',
data() {
return {
data: {}
};
}
});
let contentTemplate = function() {
return { template: contentVue };
};
Vue.use(ChartPlugin);
let selectedTheme = location.hash.split("/")[1];
selectedTheme = selectedTheme ? selectedTheme : "Material";
let theme = (selectedTheme.charAt(0).toUpperCase() + selectedTheme.slice(1)).replace(/-dark/i, "Dark");
export default Vue.extend({
data: function() {
return { // add additional code here
annotations:[{
content: contentTemplate,
coordinateUnits: 'Pixel',
x: '50%',
y: 10,
region: 'Chart'
}],
};
},
provide: {
chart: [StackingColumnSeries, Legend, ChartAnnotation, Category, DataLabel, Tooltip]
},
}); </script>
|
|
// add additional code here
{
title: 'Sales',
lineStyle: { width: 0 },
minimum: -100,
maximum: 350,
interval: 100,
majorTickLines: { width: 0 },
majorGridLines: { width: 1 },
minorGridLines: { width: 1 },
minorTickLines: { width: 0 },
labelFormat: '{value}B', },// add additional code here |

