updating chart based on dataset selection