Parametrize style format when generating SVG

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
MirroZV
Posts: 36
Joined: Wed May 13, 2020 10:41 am

Parametrize style format when generating SVG

Post by MirroZV » Thu Dec 08, 2022 12:01 pm

Hello,
currently when we're generating SVG to use in our PDF reports, the items of SVG have styles defined by reference. Meaning that styles are defined at the top of the file, and then the items reference them by style name, as you can see in attachment SVGWithStyleReferences.png.

What we'd like to have is to have the styles stated explicitly with each item, as you can see in attachment SVGWithoutStyleReferences.png.

Is it possible to parametrize this somehow? In current API I did not find anything, we use version 8.5.1.1.
If it's not possible, is it maybe planned for some next release?

Thank you for your answer.
Attachments
SVGWithStyleReferences.PNG
SVGWithStyleReferences.PNG (91.15 KiB) Viewed 39 times
SVGWithoutStyleReferences.PNG
SVGWithoutStyleReferences.PNG (133.59 KiB) Viewed 39 times

ArctionKestutis
Posts: 475
Joined: Mon Mar 14, 2016 9:22 am

Re: Parametrize style format when generating SVG

Post by ArctionKestutis » Thu Dec 08, 2022 2:53 pm

I don't recall that in the past few years we would modified significantly SVG export routines. At least not about styling. Therefore, whatever behavior you see in version 8.5, probably still will be similar in 10.3.
LightningChart SVG export is using some SvgNet project code from 2003 version. However, I don't know is the styles you asked is supported then or later.
But in general, I have opinion that SVG format is not very reliable, if you want to produce consistent image. That is, probably specifications allow some freedom of in interpretation, because different rendering software (Chrome, PowerPoint, Edge etc.) could produce different result from the same SVG file. In that regard, other vector image format LightningChart support (.WMF, .EMF) should produce more consistent results. Of course, raster formats would create one-to-one copy of image from display.

Hope this helps.

MirroZV
Posts: 36
Joined: Wed May 13, 2020 10:41 am

Re: Parametrize style format when generating SVG

Post by MirroZV » Tue Jan 03, 2023 3:03 pm

It answered my question, thanks.

Post Reply