SVG "header" - Style information

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

SVG "header" - Style information

Post by Mariano » Thu Apr 19, 2007 1:02 pm

hi,

I got a question about the SVG export format.

I'm a newbie in SVG, but I will like the file to be readable by a commun software. (for my users that are not graphics/images experts)

I thought about FireFox since it's free and got support for svg. But when I try to open it, looks like some style information are missing and it display me the xml tree.

After some research, I suppose this refer to the DOCTYPE, svg xmlns= and other format information.

Is it normal? Did I miss something about SVG? about the way to export?

Can you add the doctype information in the export lib?

Context:
winXP SP2,
FireFox 2.0
TeeChart win 7.05
Delphi Architect 9.0

PS:
InkScape read them without problem. (but i suppose that it knows what is reading, not like firefox)


thanks in advance,

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Apr 23, 2007 11:25 am

Hi Mariano,

yes, you're correct, seems like Charts exported to svg file are not supported in Firefox, I've added this issue on our wish list to be considered for further releases.
In meantime the only way I can think of to use them would be by updating the files to a correct format manually.

Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

Post by Mariano » Tue Apr 24, 2007 7:28 am

hi,

thanks for your answer.

I understood that more than one format (version) of SVG exist. And they use some DOCTYPE atttribut (like html) to specifie the format.

Will you be kind and tell me which format the teechart lib use (1.1 full ?)? What is the type declaration I should add??

off course, I can try to add anyone i found on the net, but i will like to add the good one.

thanks in advance for your time,

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Apr 27, 2007 6:23 am

Hi Mariano,

adding the following lines into the <svg> tag should be sufficient :

xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"

xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"

Code: Select all

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg 
xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://web.resource.org/cc/"
   
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   
xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   
width="473px" height="433px" style="text-antialiasing:true">
<rect  x="0" y="0"  width="472" height="432" fill="rgb(240,240,240)"/>
<polyline fill="none"  stroke="white"
points="0,432 0,0 472,0 "/>
<polyline fill="none"  stroke="rgb(160,160,160)"
points="472,0 472,432 -1,432 "/>
....
...

Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

Post by Mariano » Fri Apr 27, 2007 7:39 am

thanks!

I will try this.

see you,

Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

Post by Mariano » Thu May 03, 2007 8:01 am

hi,

it's works great ! thanks.

I changed the code of TSVGCanvas to include it in the export file. (same system as DocType)

see you,

Post Reply