0

Raphael SVGに埋め込まれたデータを抽出しようとし、データにアクセスするためのオプションをハッキングします。現在、データを含むSVGファイルのように見えるものを見つけました(これはFirebugを使用し、タイムラインの変更に応じてデータスワップを監視することに基づいています)-そしてSVGをスタンドアロンSVGに変換して、少なくとも視覚的には、ファイルは私が見ているグラフのように見えます。

Raphael SVG(または少なくとも私が使用している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ファイルとしてロードするにはどうすればよいですか?

4

1 に答える 1

2

私のFirefoxには2つの問題があります。

  • タグのë内側は<desc>有効な文字ではありません。文字または全体を削除し<desc>ます。
  • 使用されているタグ(、、)のほとんど<defs><rect>閉じ<path>られていません。>最後のをに変更するだけ/>です。

ただし、この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;">
<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>
于 2012-08-14T15:06:42.770 に答える