How to set dataset to a chart

You may find this of interest.