Widget:StatsGraph: Difference between revisions
Jump to navigation
Jump to search
Added more attributes to SVG and fixed issues with the radar definition |
Removed width/height for now and fixed wrong attribute key |
||
Line 38: | Line 38: | ||
var svgNS = svg.namespaceURI; | var svgNS = svg.namespaceURI; | ||
svg.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"); | svg.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink"); | ||
svg.setAttribute('viewBox', "0 0 800 800"); | svg.setAttribute('viewBox', "0 0 800 800"); | ||
svg.setAttribute('preserveAspectRatio', "none"); | svg.setAttribute('preserveAspectRatio', "none"); | ||
Line 88: | Line 86: | ||
// Now start drawing | // Now start drawing | ||
var gDrawing = document.createElementNS(svgNS, 'g'); | var gDrawing = document.createElementNS(svgNS, 'g'); | ||
gDrawing.setAttribute(' | gDrawing.setAttribute('transform', 'translate(400 400)'); | ||
var degreeSpacing = 360 / data.length; | var degreeSpacing = 360 / data.length; |