Widget:StatsGraph: Difference between revisions
Jump to navigation
Jump to search
m Orange is a text, not a variable |
Added more attributes to SVG and fixed issues with the radar definition |
||
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('width', "500px"); | |||
svg.setAttribute('height', "500px"); | |||
svg.setAttribute('viewBox', "0 0 800 800"); | |||
svg.setAttribute('preserveAspectRatio', "none"); | |||
svg.setAttribute('version', "1.1"); | |||
/* Inline styling; maybe export to common.css? */ | /* Inline styling; maybe export to common.css? */ | ||
Line 78: | Line 83: | ||
radialLine.setAttribute('stroke-width', "3pt"); | radialLine.setAttribute('stroke-width', "3pt"); | ||
wedge.appendChild(radialLine); | wedge.appendChild(radialLine); | ||
defs.appendChild(wedge); | |||
svg.appendChild(defs); | svg.appendChild(defs); | ||