* On Hold until 22 Dec 2024: Scaleable Vector Graphic (SVG) output for charts

For Wish List Requests that need more work before they can be progressed to the Wish List, because after 3 months, discussions have not arrived at a clear specification of the requirement such that one or more Wish List items can be raised. Items On Hold that are not subsequently refined to a state suitable for the Wish List within a year by the OP or other interested parties will be closed. If the OP feels unable to progress the request, they should ask for volunteers among other interested users to assist.
Post Reply
avatar
redvanman
Diamond
Posts: 80
Joined: 10 Jun 2010 10:51
Family Historian: V7
Location: Dalbeattie, Kirkcudbrightshire

On Hold until 22 Dec 2024: Scaleable Vector Graphic (SVG) output for charts

Post by redvanman »

This is a proposal for a wish list item for saving or exporting a FH chart in SVG (Scaleable Vector Graphics) format.

The idea came to mind when I started to migrate from a print-based presentation of my family history to a web-based version. I found that the complex, multi-page charts that I had produced couldn't easily and seamlessly be used in the new environment.

SVG is a language based on XML for describing two-dimensional vector and mixed vector/raster graphics. SVG content is stylable, scalable to different display resolutions, and can be viewed stand-alone, mixed with HTML content, or embedded using XML namespaces within other XML languages. SVG also supports dynamic changes; script can be used to create interactive documents, and animations can be performed using declarative animation features or by using script. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999.

This proposal would provide the following benefits to FH users:
  • Incorporation of charts into web sites. Currently, FH charts are not included in the pages that can be incorporated in a FH-produced web site - or at any rate, there is nothing in the web site wizard to support this. The only options are:
    • Export to one of the raster formats, and incorporate this as an image in a web page
    • Export as PDF, and display the PDF as part of the web site
    SVG files can be displayed in web browsers as stand-alone pages, or embedded in HTML pages. With suitable markup, elements in SVG files can link to HTML pages and vice versa. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999. All major modern web browsers—including Mozilla Firefox, Internet Explorer, Google Chrome, Opera, Safari, and Microsoft Edge—have SVG rendering support.
    SVG files can be styled using CSS (cascading stylesheets) which could augment or override formatting generated in FH.
  • The option to edit charts outside FH. FH provides excellent charting capability, but there are occasions when users may wish to go beyond this, for example:
    • combining charts and other graphical elements
    • re-arranging boxes or lines in a way that FH doesn't support.
    • creating multiple smaller charts from a single large chart generated in FH
    This is anagagous to what is already possible for reports using export to RTF. Many SVG editors are available, commercial products and free software.
  • Chart images that are crisp and clear at any resolution or size. FH's existing formats (other than PDF) are raster formats which do not have this property.
  • Incorporation of charts into reports. When reports are exported to RTF, they can be processed by external word-processing software. Most modern word processors include support for SVG files, so this would make it possible to incorporate charts (or parts of them) into the body of a report (with all the benefits of scalabilty).
For the full benefits to be realised, any solution should:
  • generate markup that links from boxes on the SVG chart to the corresponding text file. In a FH generated website, the format is indnnn.html but a solution should recognise that that many users export from FH to other products, and permit the user to specify a different format.
  • support the the 'class' and 'style' attributes on all elements to support element-specific styling, using CSS (cascading style sheets).
  • generate SVG charts in the website wizard, with minimal configuration, as a quick way for users to explore the benefits of SVG.
  • export SVG charts to permit their use in the contexts described above.
I'd be interested to see what others think about this proposal.
Alyn
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Scaleable Vector Graphic (SVG) output for charts

Post by ColeValleyGirl »

Alyn, have you investigated SVG Family Tree Generator.
avatar
redvanman
Diamond
Posts: 80
Joined: 10 Jun 2010 10:51
Family Historian: V7
Location: Dalbeattie, Kirkcudbrightshire

Re: Scaleable Vector Graphic (SVG) output for charts

Post by redvanman »

Helen,
Yes I did investigate it - it was mentioned here not long ago, so I downloaded it and gave it a go. IMO its capabilities are way below what FH can offer in terms of producing trees (and the text that goes with them), and it was that experience which led me to think about what should be in this wish list request.
Alyn
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Scaleable Vector Graphic (SVG) output for charts

Post by ColeValleyGirl »

avatar
redvanman
Diamond
Posts: 80
Joined: 10 Jun 2010 10:51
Family Historian: V7
Location: Dalbeattie, Kirkcudbrightshire

Re: Scaleable Vector Graphic (SVG) output for charts

Post by redvanman »

So what happens next? What is the process that gets this suggestion onto the wish list so that people can vote for it?

Alyn
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Scaleable Vector Graphic (SVG) output for charts

Post by ColeValleyGirl »

The process is that I (or Mike T) have to find some time to review this and how it overlaps with the existing wish list items I've mentioned before adding a version of it to the wish list. Ideally, I'd like to see some more discussion first about whether there are viable alternatives in existence already.
User avatar
Valkrider
Megastar
Posts: 1563
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Scaleable Vector Graphic (SVG) output for charts

Post by Valkrider »

I think that this idea certainly has merit.

I don't know any LUA so don't know if this would be possible as a plugin and if not it would have to be a major implementation by Calico Pie to fulfil all of @Alyn's suggestions. If converting a report to SVG using a plugin this would be a start. I suspect the linking and incorporation into the website wizard would require Calico Pie.

One thing to consider though is that some CMS systems, like Wordpress, do not allow SVG images by default due to the inherent security risk that such code causes.

This is not an insignificant enhancement I know from creating an interactive tree in my Wordpress plugin.

I would suggest that this suggestion is maybe split into two parts one to create an SVG as a chart output option. The second the all singing all dancing that @Alyn suggested in his OP.
avatar
redvanman
Diamond
Posts: 80
Joined: 10 Jun 2010 10:51
Family Historian: V7
Location: Dalbeattie, Kirkcudbrightshire

Re: Scaleable Vector Graphic (SVG) output for charts

Post by redvanman »

Colin
One thing to consider though is that some CMS systems, like Wordpress, do not allow SVG images by default due to the inherent security risk that such code causes.
It is certainly the case that SVG files can potentially contain unsafe code, and that is why Wordpress has this restriction. But this is not unique to SVG - many other file types (including HTML) can contain scripts that are potentially harmful. Wordpress wisely takes precautions against all of them, but doesn't prohibit them entirely.
Alyn
User avatar
Valkrider
Megastar
Posts: 1563
Joined: 04 Jun 2012 19:03
Family Historian: V7
Location: Lincolnshire
Contact:

Re: Scaleable Vector Graphic (SVG) output for charts

Post by Valkrider »

redvanman wrote: 29 Jul 2021 08:41 It is certainly the case that SVG files can potentially contain unsafe code, and that is why Wordpress has this restriction. But this is not unique to SVG - many other file types (including HTML) can contain scripts that are potentially harmful. Wordpress wisely takes precautions against all of them, but doesn't prohibit them entirely.
Alyn
Alyn

You and I are aware of that but maybe others who might want to use this aren't and to prevent complaints I felt it wise to put it out there now whilst we are still looking at this.

Do you have any comments about breaking your original suggestions into deliverable chunks?
avatar
redvanman
Diamond
Posts: 80
Joined: 10 Jun 2010 10:51
Family Historian: V7
Location: Dalbeattie, Kirkcudbrightshire

Re: Scaleable Vector Graphic (SVG) output for charts

Post by redvanman »

Colin
I would suggest that this suggestion is maybe split into two parts one to create an SVG as a chart output option.
This would certainly be a good start.
I would also argue that linking from a box on a chart to the individual text file is important, otherwise all you get is "yet another graphic format". Indeed, it's possible to acheive exactly that by exporting the chart to PDF, and then using one of many PDF to SVG conversions that are available. What FH can add to the process is the association between a box on the chart and information about the individual represented in the box.

Alyn
avatar
fhmoore
Newbie
Posts: 1
Joined: 18 Nov 2022 07:24
Family Historian: V7

Re: Scaleable Vector Graphic (SVG) output for charts

Post by fhmoore »

I think this is what I want to do. Currently, I am creating family history charts and then snipping them to add to photoshop layouts for printing in a photobook. The trouble is that the snipped jpeg of the family tree is not clear unless sized really big. I have changed my font sizes in diagram options, but I think it would be better and clearer if I could export the chart rather than taking a snip of it. I don't have the correct jargon but hope that my request is understood. Fiona
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Scaleable Vector Graphic (SVG) output for charts

Post by tatewise »

Fiona, I agree that Diagrams saved in graphic image formats need to be very large to get high-resolution images.
(I assume you are saving to an image file and not snipping a screenshot directly from the FH Diagram which is limited to your monitor screen resolution.)
Instead, try saving to a single-page PDF (yes PDF), which produces remarkedly higher-resolution results.
Then use a utility such as IrfanView to open and snip/crop the image before saving as PNG (which is lossless unlike JPG).
Finally, if necessary use Photoshop for any detail adjustments.
Don't forget that you can perform a lot of Diagram editing directly within FH by hiding branches, boxes, etc. So you may not need to perform any external snip/crop at all.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5465
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Scaleable Vector Graphic (SVG) output for charts

Post by ColeValleyGirl »

This stalled over a year ago. There was support from one other person, with the sensible suggestion that the Request be split into two items, but nothing has been done to achieve that.

I'm putting it on hold until it's done.
Post Reply