0
試圖extract data embed in Raphael SVGs,並通過選項獲取數據。目前,我發現SVG文件中包含數據(基於使用Firebug並觀察數據交換時間線的變化),並嘗試將SVG轉換爲stand alone SVG以確認至少可視化該文件似乎是我正在看的圖形。如何從Raphael SVG創建獨立的SVG?
這裏的拉斐爾SVGs(或者至少是SVG,我不能轉儲到我使用SVG模板文件和負載無誤差):
<svg height="67" version="1.1" width="840" xmlns="http://www.w3.org/2000/svg" style="overflow: hidden; position: relative; left: 0px; top: 0px;">
<desc>Created with Raphaël 2.1.0</desc>
<defs>
<rect x="0" y="0" width="840" height="67" r="0" rx="0" ry="0" fill="#ebebeb" stroke="none" style="">
<path style="opacity: 1;" fill="none" stroke="#ffffff" d="M0,1.5L67,1.5Z" stroke-width="1" opacity="1">
<path style="opacity: 1;" fill="none" stroke="#ffffff" d="M0,3.5L67,3.5Z" stroke-width="1" opacity="1">
<path style="opacity: 1;" fill="none" stroke="#ffffff" d="M0,7.5L67,7.5Z" stroke-width="1" opacity="1">
<path style="opacity: 1;" fill="none" stroke="#ffffff" d="M0,15.5L67,15.5Z" stroke-width="1" opacity="1">
<path style="opacity: 1;" fill="none" stroke="#ffffff" d="M0,32.5L67,32.5Z" stroke-width="1" opacity="1">
<path style="opacity: 1;" fill="#aaaaaa" stroke="none" d="M0,67L0,0L0,31L2.310344827586207,34L4.620689655172414,35L6.931034482758621,38L9.241379310344827,39L11.551724137931034,41L13.862068965517242,41L16.17241379310345,41L18.482758620689655,37L20.79310344827586,39L23.103448275862068,40L25.413793103448274,41L27.724137931034484,41L30.03448275862069,45L32.3448275862069,45L34.6551724137931,44L36.96551724137931,41L39.275862068965516,41L41.58620689655172,43L43.89655172413793,43L46.206896551724135,44L48.51724137931034,44L50.82758620689655,41L53.137931034482754,34L55.44...2068965517241,17L785.5172413793103,16L787.8275862068965,17L790.1379310344828,21L792.448275862069,22L794.7586206896551,23L797.0689655172414,21L799.3793103448276,20L801.6896551724137,17L804,12L806.3103448275862,15L808.6206896551724,16L810.9310344827586,17L813.2413793103448,15L815.551724137931,16L817.8620689655172,17L820.1724137931035,17L822.4827586206897,18L824.7931034482758,19L827.1034482758621,19L829.4137931034483,17L831.7241379310344,16L834.0344827586207,16L836.3448275862069,17L838.6551724137931,2L840,67" stroke-width="0" opacity="1" transform="matrix(1,0,0,1,-554.3785,0)">
<path style="opacity: 1;" fill="none" stroke="#666666" d="M0,31L2.310344827586207,34L4.620689655172414,35L6.931034482758621,38L9.241379310344827,39L11.551724137931034,41L13.862068965517242,41L16.17241379310345,41L18.482758620689655,37L20.79310344827586,39L23.103448275862068,40L25.413793103448274,41L27.724137931034484,41L30.03448275862069,45L32.3448275862069,45L34.6551724137931,44L36.96551724137931,41L39.275862068965516,41L41.58620689655172,43L43.89655172413793,43L46.206896551724135,44L48.51724137931034,44L50.82758620689655,41L53.137931034482754,34L55.44827586206...17L783.2068965517241,17L785.5172413793103,16L787.8275862068965,17L790.1379310344828,21L792.448275862069,22L794.7586206896551,23L797.0689655172414,21L799.3793103448276,20L801.6896551724137,17L804,12L806.3103448275862,15L808.6206896551724,16L810.9310344827586,17L813.2413793103448,15L815.551724137931,16L817.8620689655172,17L820.1724137931035,17L822.4827586206897,18L824.7931034482758,19L827.1034482758621,19L829.4137931034483,17L831.7241379310344,16L834.0344827586207,16L836.3448275862069,17L838.6551724137931,2" stroke-width="2" opacity="1" transform="matrix(1,0,0,1,-554.3785,0)">
</svg>
如何編輯的SVG在最新版本的FireFox中將其作爲獨立的SVG文件加載?
非常感謝,這對於追蹤數據非常有幫助。所以,你是正確的,事實證明,SVG只是數據的顯示容器,[數據在DOM元素中](http://stackoverflow.com/a/11956324/471255)。 – blunders 2012-08-14 16:06:09