fixed d3 view error if no data exists