This sample is using the string type layout and the array type dataset.
ā—¸Script
document.getElementById(id).setLayout(layoutStr);
document.getElementById(id).setData(chartData);