Help needed for a beginner question
let myOptions: {
chart: {
height: 350,
type: 'bar'
},
colors: ["#800000"]
};
let vueExample = new Vue({
el: '#example',
components: {
apexchart: VueApexCharts
},
data: {
myName: 'my Test graph',
chartOptions: myOptions,
chartSeries: [{
name: "Series 1",
data: [45, 52, 38, 24, 33, 26, 21, 20, 6, 8, 15, 10]
}]
}
});
In need of assistance regarding the assignment of chartOptions
chartOptions: myOptions
I have created the myOptions object before the vue object globally, but unsure how to assign the options to the data property chartOptions in the vue instance.
Seems like I'm facing a typescript(javascript) issue, and struggling to find a quick solution.
If I skip using the myOptions object and directly create the object in the vue instance chartOptions: {...}, everything works fine