From OpenNMS
Introduction
The XSL stylesheet used to lay out the File:SVGAvailReport.pdf can be a challenge to modify if your XSL and SVG skills are a bit sub-optimal. Here are a few recipes for tweaks one might want to make to this stylesheet.
Long node names bleed into Last Month's Top 20 Offenders chart
When some or all of the nodes included in this chart are longer than about thirty characters, the name labels tend to bleed over into the chart itself, which looks fairly untidy. I found that nudging the chart to the right by 25 units made things look better. Here are the edits necessary in SVGAvailReport.xsl to accomplish this change:
1. Move the path that draws the X and Y axes, changing the three occurrences of 175 to 200 and the single occurrence of 700 to 725
<!-- Draw the x-axis and y-axis -->
<svg:g style="stroke-width:2; stroke:black">
<svg:path d="M 200 355 L 200 50 L 200 355 L 725 355 Z"/>
</svg:g>
2. Move the dashed vertical lines that delineate ten-percent units
<svg:g style="fill:none; stroke:#B0B0B0; stroke-width:1; stroke-dasharray:2 4">
<svg:path d="M 248 50 L 248 350 Z"/>
<svg:path d="M 298 50 L 298 350 Z"/>
<svg:path d="M 348 50 L 348 350 Z"/>
<svg:path d="M 398 50 L 398 350 Z"/>
<svg:path d="M 448 50 L 448 350 Z"/>
<svg:path d="M 498 50 L 498 350 Z"/>
<svg:path d="M 548 50 L 548 350 Z"/>
<svg:path d="M 598 50 L 598 350 Z"/>
<svg:path d="M 648 50 L 648 350 Z"/>
<svg:path d="M 698 50 L 698 350 Z"/>
</svg:g>
3. Move the ten-percent unit labels and description elements
<svg:g style="font-size:9">
<svg:text style="text-anchor:end" x="673" y="365">100%</svg:text>
<svg:text style="text-anchor:end" x="623" y="365">90</svg:text>
<svg:text style="text-anchor:end" x="573" y="365">80</svg:text>
<svg:text style="text-anchor:end" x="523" y="365">70</svg:text>
<svg:text style="text-anchor:end" x="473" y="365">60</svg:text>
<svg:text style="text-anchor:end" x="423" y="365">50</svg:text>
<svg:text style="text-anchor:end" x="373" y="365">40</svg:text>
<svg:text style="text-anchor:end" x="323" y="365">30</svg:text>
<svg:text style="text-anchor:end" x="273" y="365">20</svg:text>
<svg:text style="text-anchor:end" x="223" y="365">10</svg:text>
<svg:text style="text-anchor:end" x="173" y="365">0</svg:text>
<!-- Drawing the description -->
<svg:text style="font-size:9" x="20" y="380"><xsl:value-of select="../sectionDescr"/></svg:text>
<svg:text style="font-size:9" x="20" y="400"><xsl:value-of select="../period"/></svg:text>
</svg:g>
4. Move the horizontal bars themselves (line 880 in r9158 / release 1.5.91):
<xsl:with-param name="x-offset-hor">
<xsl:choose>
<xsl:when test="$graphtype='lastMoTop20offenders'">
<xsl:value-of select="50"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="25"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
5. Move the otherwise assignment of x-offset-ver at the bottom of the classicTable template:
<xsl:value-of select="50 + $position * 15"/>






