The JavaScript logic to set the ChartType to a Line if the check box is checked is:
JavaScript tests whether the Checked property of the check box matches true. When the condition test returns true (yes, the Checked property matches true), it executes the body of the if statement block. When the condition test returns false (no, the Checked property does not match true), it skips the if statement block.
With this JavaScript logic, when the check box is selected, the pie chart changes to a line chart. When the check box is cleared, the chart does not change because the condition test (chk_ChartType.Checked==true) is false.
Use an if...else statement to expand the if to change the chart back to a pie chart when the condition test is false. JavaScript tests the Checked property of the check box. When the check box is checked, the body of the if executes. When the check box is not checked, the body of the else executes.