document.querySelector('button').addEventListener('click',_ => {
let itm1 = series.getDataItemById('Root');// return DataItem
let itm2 = series.getDataItemById('A0');// undefined
series.set("selectedDataItem",itm2); // and not work
});
Ive tried multiple variations of this, but none of them seem to work. Any ideas? Thanks in advance.
After looking at the source code, can use get ('children ') to obtain child nodes
let item = series.getDataItemById('Root');
series.set("selectedDataItem",item.get('children')[0]);