fixed d3 exception when viewing diagrams on empty pages