Fix graph barchart error

Don't try to generate barchart if there are no data series
available, as this causes an error.

Change-Id: I4e8d016e636fb7d37beaaf320ddf4b9866cdffeb