Changing dhtmlxchart legend's text property dynamically

I needed to change a dhtmlxchart legend’s text property dynamically and
i couldn’t find it in the forum.

I have solved it by this way and you can use if you need too.

dashBarChart1.legendObj.childNodes[0].innerHTML = new_value

Hello,

Thank you for sharing your solution!