Closed MarcoLazzoni closed 7 months ago
did you solve it?
@MarcoLazzoni @antonioreyna All zingchart methods are readily available on the component's instance to call. For example, to add get a label's information from the chart:
function getLabelInfo() {
let output = chart.value.getlabelinfo({
id: 'demoLabel'
})
console.log(output)
}
<ZingChartVue ref="chart" :data="chartData" />
<button class="primary" @click="getLabelInfo">Get Label Info</button>
Please use this demo for reference. You need to install dependencies with npm install
and the npm run dev
to see the demo in the browser.
Using zingchart-vue as explained in the readme I noticed that the method 'getlabelinfo' from zingchart docs (https://www.zingchart.com/docs/api/methods#getlabelinfo) is not part of the zingchart vue component.
Checking this repo's examples I found out that in this instance is all good, but still it's missing from other examples of zingchart-vue usage (i.e. https://codesandbox.io/s/ms7ml, changing the code to try and call 'getlabelinfo' from the component shows a missing function error).