I'm working on a (.net core 2.0) Console Application and now i need to generate a chart (it will contain 2 lines from given values, on X/Y axis) and save it as image (png, jpg). I've read some ideas about referencing Forms assembly to be able to use .net charts, but I can't even find Assemblies Tab in this VS.Net Core 2.0 console App. Anybody know a tool or whatever that would allow me to create the chart then save it as image?
Asked
Active
Viewed 1,974 times
5
-
[This](https://stackoverflow.com/questions/46815546/how-to-add-external-assembly-dll-to-net-core-2-0-on-visual-studio-code) or [this](https://www.hanselman.com/blog/ReferencingNETStandardAssembliesFromBothNETCoreAndNETFramework.aspx) may help with adding assemblies. [this](https://stackoverflow.com/questions/35719586/dynamic-graphs-using-c-sharp-to-be-saved-as-a-png-format/35722366?s=1|31.4665#35722366) should help with the chart.. – TaW Mar 14 '18 at 08:43
-
Windows Forms doesn't generate images. The *System.Drawing.Graphics* object does, and it's not part of Windows Forms. – Panagiotis Kanavos Mar 14 '18 at 10:33
-
The System.Drawing namespace is available as part of the [Windows Compatibility Pack](https://blogs.msdn.microsoft.com/dotnet/2017/11/16/announcing-the-windows-compatibility-pack-for-net-core/) even though it's *not* Windows specific. The [System.Drawing.Common](https://www.nuget.org/packages/System.Drawing.Common/4.5.0-preview1-26216-02) nuget package offers cross-platform versions of the most common objects, eg Bitmap, Image and Graphics. – Panagiotis Kanavos Mar 14 '18 at 10:40