I am using highcharts-angular and typescript and trying to update y-axis type but getting error
Property 'yAxis' does not exist on type 'ExportingButtonsOptionsObject'
This is the code and getting error on
onclick: function () {
this.yAxis[0].update({
type: 'linear'
})
}
Whole code:
yAxis: [
{
labels: {
align: 'left'
},
height: '80%',
resize: {
enabled: true
}
},
{
labels: {
align: 'left'
},
top: '80%',
height: '20%',
offset: 0
}
],
exporting: {
buttons: {
contextButton: {
enabled: false,
align: 'left',
},
customButton: {
text: 'Linear',
onclick: function () {
this.yAxis[0].update({
type: 'linear'
})
}
},
customButton2: {
text: 'Logarithmic',
onclick: function () {
this.yAxis[0].update({
type: 'logarithmic'
})
}
}
}
},