Open manvfx opened 6 years ago
There is option to update anything in chart, for that you have to store chart instance variable from onload event of chart.
In HTML,
<chart [options]="chartOptions" (load)="saveInstance($event.context)"></chart>
Using that instance, you may use like below
saveInstance(chartInstance) {
this.chartInstance = chartInstance
}
updateChartType() {
this.chartInstance.update({
chart: {
type: chartType // Anything you want
}
});
}
Hope this will help you!
@bheda91 - update methods throws error when we change chart type
@satyendrasinghpanwar Can you please tell me which error you get? And if possible, show me your code?
I want change type highcharts with click button. for example:
html file:
ts file: