_type == 'line'){
				// If the radiobutton is checked (it will be, but just for a double check)
				if (selected_item.checked){
					// In case there is a 'bar' dataset with the same column, remove the dataset and uncheck the checkbox
					if(datasetIndex >= 0 && datasetIndex != datasetLineIndex) {
						$('#checkbox-'+selected_column).prop("checked", false);
						mainChart.data.datasets.splice(datasetIndex, 1);
						mainChart.update();

						// Adjust the index of the 'line' dataset in case the previou