Charting Libraries
Hello,
I've been generating really nices and complex PDFs quite easily with Quest PDF and I'm glad I've found this great library.
I'm exploring Charts and have of course followed the microchart example. Unfortunately microchart is quite limited and doesn't support making a multiline Chart (which is honestly quite surprising).
I'm now exploring other charting libraries but I'm not sure if I can just use any other chart library or do I absolutely need a SKIA charting library.
I tried to find a chart library using SKIA but unfortunately I cannot find one. Where can I find one?
Can I use other charts library (for example high charts or syncfusion) and use it with QuestPDF?
Thanks for your help
Hi 😁 You can use ANY charting library you want as long as it can produce an image. Then, your task is as easy as placing the image inside the PDF document using fluent API. I recommend generating the image in higher resolution (e.g. twice as high as DPI setting) so it looks sharp even when you zoom in.
However, using SkiaSharp powered libraries has additional benefits. All drawing commands performed by the library are translated into PDF commands. That means, by using this method you can achieve vector graphics that looks sharp at any zoom level and reduces file size.
LiveCharts v2 is still in beta, but is another popular charting library that supports multiline charts.
Thanks for your respoonse. I will take a look to livecharts Generally speaking, how can I find all Skia based charting libraries for C#?
Generally speaking, how can I find all Skia based charting libraries for C#?
This is a hard question. The default search mechanism on the official nuget webpage does not help much as far as I see 😥
I'm trying to find a good charting library to render as an image for questPDF (using the canvas object). I was thinking of synfusion but I'm afraid it doesn't work on the server, only on the client side.
Is there a good charting library to use with QuestPDF as an image out there?
Try with OxyPlot (I have used it on my bachelors thesis and was just fine). It has a SkiaSharp engine (I have not tested it). https://www.nuget.org/packages/OxyPlot.SkiaSharp/
If you accept just images (not require pixel perfect vector graphics), just use any c# charting library that can produce an image.
LiveCharts2 can also do this. Details here: https://github.com/beto-rodriguez/LiveCharts2/issues/16
I did a combination of Chart.js and puppeteer-sharp. Handles everything I need, maybe I can give a sample when I find time.
Hi all,
I don't know if this is helpful, but I like to use ScottPlot for plots and charts.
Official Site: https://scottplot.net NuGet: https://www.nuget.org/packages/ScottPlot/
There is a sample for LiveCharts2, it will be included in the site in a future version of the docs:
https://github.com/beto-rodriguez/LiveCharts2/blob/master/samples/QuestPDFSample/Program.cs