Hide apex-chart with button
Posted: Mon Apr 01, 2024 10:42 am
There are 3 diagrams on the page. Two of them are in the same position. I need to switch their visibility using a button. Only one of them should be visible at a time.
With this approach, everything works as it should, but in the console I see errors -
Code: Select all
function visi(event) {
if (nuIsHidden('dia_sh_m')==false) {
nuHide('dia_sh_m');
nuShow('dia_sh_m1');
}else {
nuHide('dia_sh_m1');
nuShow('dia_sh_m');
}
}
Code: Select all
nucommon.js?ts=20240401105906:1311 Uncaught TypeError: Cannot read properties of undefined (reading 'id')
at nuShow (nucommon.js?ts=20240401105906:1311:73)
at visi (<anonymous>:23:9)
at HTMLButtonElement.onclick (index.php:1:37)