labelFormat(key: string) {
return key + "test";
}
// the user defines a function named `renderCharts` to encapsulate chart rendering
renderCharts(json: string) {
// Global registration function
VChart.registerFunction("labelFormat",this.labelFormat);
const vchart = new VChart(json, { dom: CONTAINER_ID });
vchart.renderSync();
}
labelFormat(key: string) {
return key + "test";
}
// the user defines a function named `renderCharts` to encapsulate chart rendering
renderCharts(json: string) {
const vchart = new VChart(json, { dom: CONTAINER_ID });
// Instance registration function
vchart.registerFunction("labelFormat",this.labelFormat);
vchart.renderSync();
}