-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Labels
Help WantedScott won't do this soon, but PRs from the community are welcome!Scott won't do this soon, but PRs from the community are welcome!⚠️ HIGH PRIORITY
Description
Issue:
I am using ScottPlot to render plots in PDFs using QuestPdf. I was confused why the render time in QuestPdf was so much higher than expected - until I noticed that the SVG produced by GetSvgXml and GetSvgHtml is duplicated fives times! That is, it contains the initial svg element and then the content is repeated five times
<?xml version="1.0" encoding="utf-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="300">
<rect fill="white" width="400" height="300"/>
...
<rect fill="white" width="400" height="300"/>
...
<rect fill="white" width="400" height="300"/>
...
<rect fill="white" width="400" height="300"/>
...
<rect fill="white" width="400" height="300"/>
...
</svg>ScottPlot Version:
5.0.43
Code Sample:
using ScottPlot;
var plt = new Plot();
var svgString = plt.GetSvgXml(400, 300);
Console.WriteLine(svgString);The repeated content overlays each other perfectly, so it is not visually noticeable. You have to inspect the SVG output.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Help WantedScott won't do this soon, but PRs from the community are welcome!Scott won't do this soon, but PRs from the community are welcome!⚠️ HIGH PRIORITY