SVG import Group style - stroke-dasharray issue

I am creating a SVG file from a Freebasic program I have wrtitten, I have a small issue where one of the SVG styles for a group will only apply to the first item in the group.

The group is for the XY grid of lines (paste the text at the end of this message & save as xxx.html will show what it should look like.

The style with issue is stroke-dasharray="4 4" to produce a dashed line, the other styles in the group apply ok to the group elements(grid lines).

I am using CDRX4, if anyone can test with a newer version or if my format of the Group style can be tweaked it would be most helpful.

I can reformat the SVG to include style on each line but the group makes it neater & simple.

It is not to hard to apply the dashed style after import so its not a brick wall.

The SVG Group start & end is defined by... 

<g

</g> 

Here is my style code...

<g
   stroke="rgb(90,90,90)"
   stroke-dasharray="4 4"
   stroke-width="0.5"
>

<line x1="132" y1="100" x2="132" y2="705"/>
<line x1="189" y1="100" x2="189" y2="705"/>
<line x1="246" y1="100" x2="246" y2="705"/>

</g>

SVG File below (just delete the HTML header[first 3 lines] & last 2 lines  for SVG file)

With the html we can see the graph, grid & plot lines

------------------------------------------------------------------------

<!DOCTYPE html>
<html>
<body>

<svg height="755" width="1864">

<rect x="0" y="0" width="1864" height="755"
style="fill:silver;stroke:black;stroke-width:1;fill-opacity:1;stroke-opacity:1" />

<rect x="75" y="100" width="1714" height="605"
style="fill:#e9faff;stroke:black;stroke-width:2;fill-opacity:1;stroke-opacity:1" />

<g
   stroke="rgb(90,90,90)"
   stroke-dasharray="4 4"
   stroke-width="0.5"
>

<line x1="132" y1="100" x2="132" y2="705"/>
<line x1="189" y1="100" x2="189" y2="705"/>
<line x1="246" y1="100" x2="246" y2="705"/>
<line x1="304" y1="100" x2="304" y2="705"/>
<line x1="361" y1="100" x2="361" y2="705"/>
<line x1="418" y1="100" x2="418" y2="705"/>
<line x1="475" y1="100" x2="475" y2="705"/>
<line x1="532" y1="100" x2="532" y2="705"/>
<line x1="589" y1="100" x2="589" y2="705"/>
<line x1="646" y1="100" x2="646" y2="705"/>
<line x1="703" y1="100" x2="703" y2="705"/>
<line x1="761" y1="100" x2="761" y2="705"/>
<line x1="818" y1="100" x2="818" y2="705"/>
<line x1="875" y1="100" x2="875" y2="705"/>
<line x1="932" y1="100" x2="932" y2="705"/>
<line x1="989" y1="100" x2="989" y2="705"/>
<line x1="1046" y1="100" x2="1046" y2="705"/>
<line x1="1103" y1="100" x2="1103" y2="705"/>
<line x1="1161" y1="100" x2="1161" y2="705"/>
<line x1="1218" y1="100" x2="1218" y2="705"/>
<line x1="1275" y1="100" x2="1275" y2="705"/>
<line x1="1332" y1="100" x2="1332" y2="705"/>
<line x1="1389" y1="100" x2="1389" y2="705"/>
<line x1="1446" y1="100" x2="1446" y2="705"/>
<line x1="1503" y1="100" x2="1503" y2="705"/>
<line x1="1560" y1="100" x2="1560" y2="705"/>
<line x1="1618" y1="100" x2="1618" y2="705"/>
<line x1="1675" y1="100" x2="1675" y2="705"/>
<line x1="1732" y1="100" x2="1732" y2="705"/>
<line x1="75" y1="130" x2="1789" y2="130"/>
<line x1="75" y1="160" x2="1789" y2="160"/>
<line x1="75" y1="191" x2="1789" y2="191"/>
<line x1="75" y1="221" x2="1789" y2="221"/>
<line x1="75" y1="251" x2="1789" y2="251"/>
<line x1="75" y1="282" x2="1789" y2="282"/>
<line x1="75" y1="312" x2="1789" y2="312"/>
<line x1="75" y1="342" x2="1789" y2="342"/>
<line x1="75" y1="372" x2="1789" y2="372"/>
<line x1="75" y1="402" x2="1789" y2="402"/>
<line x1="75" y1="433" x2="1789" y2="433"/>
<line x1="75" y1="463" x2="1789" y2="463"/>
<line x1="75" y1="493" x2="1789" y2="493"/>
<line x1="75" y1="524" x2="1789" y2="524"/>
<line x1="75" y1="554" x2="1789" y2="554"/>
<line x1="75" y1="584" x2="1789" y2="584"/>
<line x1="75" y1="614" x2="1789" y2="614"/>
<line x1="75" y1="644" x2="1789" y2="644"/>
<line x1="75" y1="675" x2="1789" y2="675"/>
</g>

<polyline points= "75,612 81,612 86,599 92,586 98,573 104,560 109,547 115,534 121,521 126,508 132,495 138,482 144,469 149,456 155,443 161,430 166,417 172,404 178,391 184,378 189,365 195,352 201,339 206,327 212,314 218,302 224,291 229,281 235,271 241,263 246,255 252,249 258,243 264,239 269,234 275,230 281,227 286,223 292,221 298,218 304,215 309,213 315,211 321,209 326,207 332,205 338,204 344,202 349,201 355,199 361,198 366,197 372,195 378,194 384,193 389,192 395,191 401,190 406,189 412,188 418,187 424,186 429,186 435,185 441,184 446,183 452,183 458,182 464,181 469,181 475,180 481,179 486,179 492,178 498,178 504,177 509,177 515,176 521,176 526,175 532,175 538,174 543,174 549,173 555,173 561,173 566,172 572,172 578,171 583,171 589,171 595,170 601,170 606,170 612,169 618,169 623,169 629,168 635,168 641,168 646,167 652,167 658,167 663,166 669,166 675,166 681,166 686,165 692,165 698,165 703,165 709,164 715,164 721,164 726,164 732,164 738,163 743,163 749,163 755,163 761,162 766,162 772,162 778,162 783,162 789,161 795,161 801,161 806,161 812,161 818,161 823,160 829,160 835,160 841,160 846,160 852,160 858,159 863,159 869,159 875,159 881,159 886,159 892,158 898,158 903,158 909,158 915,158 921,158 926,158 932,158 938,157 943,157 949,157 955,157 961,157 966,157 972,157 978,156 983,156 989,156 995,156 1001,156 1006,156 1012,156 1018,156 1023,156 1029,156 1035,155 1041,155 1046,155 1052,155 1058,155 1063,155 1069,155 1075,155 1081,155 1086,155 1092,154 1098,154 1103,154 1109,154 1115,154 1121,154 1126,154 1132,154 1138,154 1143,154 1149,154 1155,153 1161,153 1166,153 1172,153 1178,153 1183,153 1189,153 1195,153 1201,153 1206,153 1212,153 1218,153 1223,152 1229,152 1235,152 1241,152 1246,152 1252,152 1258,152 1263,152 1269,152 1275,152 1281,152 1286,152 1292,152 1298,152 1303,152 1309,152 1315,151 1321,151 1326,151 1332,151 1338,151 1343,151 1349,151 1355,151 1360,151 1366,151 1372,151 1378,151 1383,151 1389,151 1395,151 1400,151 1406,150 1412,150 1418,150 1423,150 1429,150 1435,150 1440,150 1446,150 1452,150 1458,150 1463,150 1469,150 1475,150 1480,150 1486,150 1492,150 1498,150 1503,150 1509,150 1515,150 1520,149 1526,149 1532,149 1538,149 1543,149 1549,149 1555,149 1560,149 1566,149 1572,149 1578,149 1583,149 1589,149 1595,149 1600,149 1606,149 1612,149 1618,149 1623,149 1629,149 1635,149 1640,149 1646,148 1652,148 1658,148 1663,148 1669,148 1675,148 1680,148 1686,148 1692,148 1698,148 1703,148 1709,148 1715,148 1720,148 1726,148 1732,148 1738,148 1743,148 1749,148 1755,148 1760,148 1766,148 1772,148 1778,148 "
style="fill:none;stroke:#0000FF;stroke-width:2"/>

<polyline points= "75,174 81,174 86,174 92,174 98,174 104,174 109,174 115,174 121,174 126,174 132,174 138,174 144,174 149,174 155,174 161,174 166,174 172,174 178,174 184,174 189,174 195,174 201,174 206,175 212,176 218,177 224,179 229,182 235,186 241,191 246,197 252,204 258,211 264,219 269,226 275,234 281,242 286,249 292,257 298,265 304,272 309,279 315,286 321,293 326,300 332,306 338,313 344,319 349,325 355,331 361,336 366,342 372,347 378,353 384,357 389,363 395,367 401,372 406,377 412,381 418,386 424,390 429,394 435,398 441,402 446,406 452,409 458,413 464,417 469,420 475,424 481,427 486,430 492,433 498,436 504,439 509,442 515,445 521,448 526,451 532,454 538,456 543,459 549,461 555,464 561,467 566,469 572,471 578,474 583,476 589,478 595,480 601,482 606,484 612,487 618,489 623,491 629,493 635,494 641,496 646,498 652,500 658,502 663,504 669,505 675,507 681,509 686,510 692,512 698,514 703,515 709,517 715,518 721,520 726,521 732,523 738,524 743,525 749,527 755,528 761,530 766,531 772,532 778,533 783,535 789,536 795,537 801,538 806,540 812,541 818,542 823,543 829,544 835,545 841,546 846,547 852,548 858,550 863,550 869,551 875,553 881,553 886,554 892,556 898,556 903,557 909,558 915,559 921,560 926,561 932,562 938,563 943,564 949,564 955,565 961,566 966,567 972,568 978,569 983,569 989,570 995,571 1001,572 1006,573 1012,573 1018,574 1023,575 1029,576 1035,576 1041,577 1046,578 1052,578 1058,579 1063,580 1069,580 1075,581 1081,582 1086,582 1092,583 1098,584 1103,584 1109,585 1115,586 1121,586 1126,587 1132,587 1138,588 1143,589 1149,589 1155,590 1161,590 1166,591 1172,591 1178,592 1183,592 1189,593 1195,593 1201,594 1206,595 1212,595 1218,595 1223,596 1229,597 1235,597 1241,598 1246,598 1252,599 1258,599 1263,600 1269,600 1275,601 1281,601 1286,602 1292,602 1298,602 1303,603 1309,603 1315,604 1321,604 1326,605 1332,605 1338,605 1343,606 1349,606 1355,607 1360,607 1366,608 1372,608 1378,609 1383,609 1389,609 1395,610 1400,610 1406,610 1412,611 1418,611 1423,612 1429,612 1435,612 1440,613 1446,613 1452,613 1458,614 1463,614 1469,615 1475,615 1480,615 1486,615 1492,616 1498,616 1503,616 1509,617 1515,617 1520,618 1526,618 1532,618 1538,618 1543,619 1549,619 1555,619 1560,620 1566,620 1572,620 1578,621 1583,621 1589,621 1595,622 1600,622 1606,622 1612,622 1618,623 1623,623 1629,623 1635,624 1640,624 1646,624 1652,625 1658,625 1663,625 1669,625 1675,625 1680,626 1686,626 1692,626 1698,627 1703,627 1709,627 1715,628 1720,628 1726,628 1732,628 1738,628 1743,629 1749,629 1755,629 1760,629 1766,630 1772,630 1778,630 "
style="fill:none;stroke:#008000;stroke-width:2"/>

<polyline points= "75,586 81,586 86,570 92,553 98,536 104,520 109,503 115,487 121,470 126,453 132,437 138,420 144,404 149,387 155,370 161,354 166,337 172,321 178,304 184,287 189,271 195,255 201,239 206,223 212,208 218,194 224,182 229,172 235,164 241,159 246,156 252,156 258,157 264,159 269,163 275,167 281,172 286,178 292,183 298,189 304,195 309,201 315,207 321,214 326,220 332,226 338,232 344,238 349,244 355,250 361,255 366,261 372,267 378,272 384,277 389,283 395,288 401,293 406,298 412,303 418,307 424,312 429,317 435,321 441,325 446,330 452,334 458,338 464,342 469,346 475,350 481,354 486,357 492,361 498,365 504,368 509,372 515,375 521,378 526,381 532,385 538,388 543,391 549,394 555,397 561,400 566,403 572,405 578,408 583,411 589,414 595,416 601,419 606,421 612,424 618,426 623,429 629,431 635,433 641,435 646,438 652,440 658,442 663,444 669,446 675,448 681,450 686,452 692,454 698,456 703,458 709,460 715,462 721,464 726,466 732,467 738,469 743,471 749,473 755,474 761,476 766,478 772,479 778,481 783,482 789,484 795,485 801,487 806,488 812,490 818,491 823,493 829,494 835,496 841,497 846,498 852,500 858,501 863,502 869,503 875,505 881,506 886,507 892,508 898,510 903,511 909,512 915,513 921,514 926,515 932,517 938,518 943,519 949,520 955,521 961,522 966,523 972,524 978,525 983,526 989,527 995,528 1001,529 1006,530 1012,531 1018,532 1023,533 1029,534 1035,535 1041,536 1046,537 1052,537 1058,538 1063,539 1069,540 1075,541 1081,542 1086,543 1092,543 1098,544 1103,545 1109,546 1115,547 1121,547 1126,548 1132,549 1138,550 1143,551 1149,551 1155,552 1161,553 1166,553 1172,554 1178,555 1183,556 1189,556 1195,557 1201,558 1206,558 1212,559 1218,560 1223,560 1229,561 1235,562 1241,562 1246,563 1252,564 1258,564 1263,565 1269,565 1275,566 1281,567 1286,567 1292,568 1298,568 1303,569 1309,570 1315,570 1321,571 1326,571 1332,572 1338,572 1343,573 1349,574 1355,574 1360,575 1366,575 1372,576 1378,576 1383,577 1389,577 1395,578 1400,578 1406,579 1412,579 1418,580 1423,580 1429,581 1435,581 1440,582 1446,582 1452,583 1458,583 1463,584 1469,584 1475,585 1480,585 1486,585 1492,586 1498,586 1503,587 1509,587 1515,588 1520,588 1526,589 1532,589 1538,589 1543,590 1549,590 1555,591 1560,591 1566,591 1572,592 1578,592 1583,593 1589,593 1595,593 1600,594 1606,594 1612,595 1618,595 1623,595 1629,596 1635,596 1640,597 1646,597 1652,597 1658,598 1663,598 1669,598 1675,599 1680,599 1686,599 1692,600 1698,600 1703,600 1709,601 1715,601 1720,601 1726,602 1732,602 1738,603 1743,603 1749,603 1755,603 1760,604 1766,604 1772,604 1778,605 "
style="fill:none;stroke:#FF0000;stroke-width:2"/>

</svg>

</body>
</html>

  • ok, I have given up trying to import directly the SVG.

    I got to add some text elements but the only style that would pickup is fill=.   anything font related was ignored.

    I even tried importing SVG element lines(with style) from a CDRX4 export to SVG. same issue.

    So an easy workaround is open SVG with FireFox browser, print to vector pdf & suck that into CDR. Its perfect, even retains  the element groups.