Hi,
You can first give the line chart and the bar chart an ID respectively, e.g., "line" and "bar", and put both on the page. By default, use jQuery("#bar").children().hide(); to hide the bar chart. Then you can write logic in the radio button function.
When you choose RD1, do the following:
jQuery("#line").children().show();
jQuery("#bar").children().hide();
When you choose RD2, do the following:
jQuery("#line").children().hide();
jQuery("#bar").children().show();
Best regards,
Wenjun