Author Topic: Visio SVG issue (again)  (Read 6881 times)

0 Members and 1 Guest are viewing this topic.


  • Hero Member
  • *****
  • Posts: 1101
    • UnmanagedVisio
Visio SVG issue (again)
« on: September 30, 2010, 03:41:23 PM »
In Firefox/Chrome/Opera/IE9, the arrows are not shown on Visio-generated SVG diagrams (see picture below)

The reason is, Visio does not specify "overflow:visible" style for arrow markers. I believe this is a bug, and needs to be addressed somehow.
I mean, Visio-generated marker style definition in SVG may look like this:
.st2 {fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;stroke-width:0.43103448275862}

Whereas to work properly it actually should look like this (or Visio should define markers differently) -
note that "overflow:visible" style, it took me half a day to figure out what the problem was :)

.st2 {fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:1;stroke-width:0.43103448275862; overflow:visible}

Browsers respect "overflow" CSS attribute when calculating if marker should be made visible or not.
Unfortunately Visio uses negative coordinates to define markers, and after a few transforms this results in markers thrown out-of-the screen and then cut off by browser.
Means, Visio defines markers like this (note negative numbers, which cause the problem when overflow:visible is not set):
	<defs id="Markers">
<g id="lend13">
<path d="M 3 1 L 0 0 L 3 -1 L 3 1 " style="stroke:none"></path>
<marker id="mrkr13-6" class="st2" refX="-6.96" orient="auto" markerUnits="strokeWidth">
<use xlink:href="#lend13" transform="scale(-2.32,-2.32) "></use>

Another SVG issue with Visio not specifying default units (which results in poor SVG rendering in browser) is described here.
I mean, unfortunately these problems still exist in Visio 2010. And since native SVG support is being introduced by Microsoft in IE9, wouldn't it be nice to have these annoying issues fixed by the time IE9 is released?
« Last Edit: September 30, 2010, 03:50:50 PM by Nikolay »