Dynamically generate graphs' buttons