			mainChart.data.datasets.splice(datasetIndex, 1);
						mainChart.update();
					}

					// If the selected column is now not present in the chart
					if(datasetBarIndex < 0) {
						for (let i = 0; i < Math.min(quantity_data_shown, data_list.length); ++i){
							data_labels.push(data_list[i][data_columns.indexOf("name")]);
							data.push(data_list[i][column_index]);
						}

						eval("var " + selected_column + " = { label: selected_column, data: data, type: 'bar', backgroundColor: backgroundColors[