     }
			        }]
				}
			}
		});

		/*
		 * Function that receives the item that called it (checkbox or radiobutton) and the dataset type to add (line or chart)
		 * This function add the dataset corresponding to the selected column to the mainChart with the order and direction specified
		 */
		function selectData(selected_item, chart_type) {
			// Data collected from Flask
			var data_list = {{data_list | safe}};						// Data in a list of lists
			var data_columns = {{data_columns | safe}};					// Co