fix PieChart with no data set

if data not set, it will crash in calculate offset, cause at this time,
legend is null