ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Running on .NET core
Posted by David Thielen on May-04-2019 01:15
Hi;

We are trying to run our code on .NET Core and there are some issues in netchartdir. Is there a newer version that is compatible with .NET Core?

If not, is this planned?

thanks - dave

  Re: Running on .NET core
Posted by Peter Kwan on May-06-2019 16:36
Hi David,

I am not too sure of your requirement. In your chart, you have 17 symbols from x = 130 to x = 151. The following x-values have no symbols x = 132, 136, 142, 143, 144, 152, 153.

Do you want to remove x = 152 and x = 153 only? In this case, the chart will be from x = 130 to x = 151, which has a total of 22 x-values.

Or do you want to remove x = 132, 136, 142, 143, 144, 152, 153?

If you want to show only the values with data, then the axis is not "linear". You can use Axis.setLabels instead.

double[] xLabels = {130, 131, 133, 134, 135, 137, 138, 139, 140, 141, 145, 146, 147, 148, 149, 150, 151};
double[] yData = {250, 250, 250, 250, .....};

c.xAxis().setLabels(xLabels);

// Use null for the xData array, or use {0, 1, 2, 3, .... 16} as the xData array
c.addScatterLayer(null, yData, .....);

Hope this can help.

Regards
Peter Kwan

  Re: Running on .NET core
Posted by System Administrator on May-06-2019 18:23
Hi David,

The last message is posted incorrectly. Please ignore it.

The current version of ChartDirector does not support .NET Core.

For the .NET Core, the last time we look at it, it is still too limited to support the code in ChartDirector. We plan to revisit it when Microsoft releases .NET Core 3.0.

Regards
Peter Kwan

  Re: Running on .NET core
Posted by David Thielen on Jul-16-2019 00:39
Hi;

.NET Core 3.0 has its early release out. Have you looked at can you convert to run under it yet?

Also, Microsoft has stated that the future for them is .NET Core and they'll be end of lifeing their version.

thanks - dave

  Re: Running on .NET core
Posted by Peter Kwan on Jul-17-2019 04:27
Hi David,

We have done a preliminary review, and it seems .NET Core 3.0 is sufficient to support ChartDirector. We will definitely try to port ChartDirector to .NET Core 3.0.

Regards
Peter Kwan

  Re: Running on .NET core
Posted by David Thielen on Jul-17-2019 22:23
Fantastic - thanks - dave

ps - can you post here when it's available. Also, if you use IKVM (Jave -> .NET), we're going to be making IKVM 8 .NET Core compatible.

  Re: Running on .NET core
Posted by David Thielen on Sep-24-2019 23:58
Hi Peter;

First off, I hope things get better for you all in Hong Kong.

Any update on porting to .NET Core 3.0? We hope to have the rest of our code ported by the end of this year.

thanks - dave

  Re: Running on .NET core
Posted by Peter Kwan on Sep-25-2019 22:17
Hi David,

Would you mind to clarify which GUI or web frameworks you are using? ChartDirector for .NET currently supports Windows Forms, WPF, ASP.NET and ASP.NET MVC. Or are you using ChartDirector just for generating images and not using any particular GUI features?

.NET Core 3.0 will likely not support ASP.NET or ASP.NET MVC. It claims to support Windows Forms and WPF. However, the development tools for Windows Forms are not fully ready yet. (The Visual Studio Windows Forms designer for .NET Core 3.0 is still in "preview" mode and not officially release, while the WPF support is formally released.) So even if we can compile ChartDirector only for Windows Forms and WPF support, we may encounter problem in testing the Windows Forms sample code due to the non-readiness of Visual Studio.

If you just need to use ChartDirector to generate images, then we just need to test it using WPF to confirm all chart types are working.

Regards
Peter Kwan

  Re: Running on .NET core
Posted by David Thielen on Sep-25-2019 23:36
We use it in the .Net (and Java) engine where we use it to generate a PNG that we then place in a PDF, HTML, etc. file. Our customers can be calling it in the context of a lot of these different frameworks. But there is no dependency in our code for any of those frameworks.

So just testing a-in WPF to see that it generates charts should be fine for our use.

thanks - dave

  Re: Running on .NET core
Posted by Peter Kwan on Oct-05-2019 11:40
Hi David,

We have removed all GUI/Web framework dependencies from ChartDirector, and we are able to compiled a .NET Standard 2.0. According to Microsoft's web site, it can work with .NET Core 2.0 and also .NET Framework 4.6.1 or above.

On .NET Core 2.0, it needs another assembly "System.Drawing.Common", which is a Microsoft assembly to support graphics and can be downloaded as a nuget package.

https://www.nuget.org/packages/System.Drawing.Common/4.6.0

On .NET Core 3.0, the "System.Drawing.Common" is included as the Microsoft.WindowsDesktop.App.WindowsForms framework, so the project just needs to reference that framework.

The ChartDirector for .NET Standard 2.0 assembly can be downloaded from:

https://www.advsofteng.com/netchartdir_std2.zip

Please let me know if it meets your requriements.

Regards
Peter Kwan

  Re: Running on .NET core
Posted by David Thielen on Oct-05-2019 19:38
Peter - I think this is everything we need. We're still converting our code so final testing will be in a month or two.

thanks - dave

  Re: Running on .NET core
Posted by David on Feb-16-2020 07:32
Hi Peter;

Ok, trying to get this working now. Two housekeeping question first:

1. Java has not changed - correct? 6.0.0 is still the latest version?

2. Do we need to pay you for the .NET Core version or are we up to date with our license?

Now for using the new library, we can't use NuGet because we use ChartDirector in conjunction with our Java library that is then built for .NET using IKVM and so it's a command line compile. There is no C# project we link to ChartDirector.

So how do we get the DLL? And is it the same DLL for .NET Core and .NET Standard?

thanks - dave

  Re: Running on .NET core
Posted by Peter Kwan on Feb-17-2020 02:19
Hi David,

Yes, for Java, ChartDirector 6.0.0 is still the latest version. The ChartDirector 6.1 - 6.4 are for features that are already supported in Java, or for features not applicable for Java. They include support for new platforms (WPF, ASP.NET MVC, .NET core) and for using "Resources" instead of files for input images (such as background images).

If you have a license to use any programming language edition of ChartDirector 6.x, then you can use the same license for ChartDirector for .NET. It is because all ChartDirector licenses include all programming language editions of ChartDirector. So for your case, you can use your existing license.

You can download the .NET Core version from the official NuGet web site using a browser. Just go to "https://www.nuget.org/" and search for "ChartDirector.Net". You should find two NuGet packages. One is for web and console applications. The other is for .NET Desktop applications (WPF and Windows Forms). From my understanding, your applicaiton does not use .NET Desktop features, so the "ChartDirector.Net" package should be what you need. On the page for the ChartDirector.Net package, on the right side, there is a link for "download package".

The package file is just a zip file. You can rename it as a zip file and open it. You can find the "ChartDirector.Net.dll" at "lib/netstandard2.0" inside the zip file. Note that it requires the Microsoft package "System.Drawing.Common" (version 4.5.0 or above), which can also be downloaded from the nuget.org web site.

We use nuget for ,Net Core because due to the nature of .Net Core, it is more convenient to use nuget to handle dependencies.

For a ".Net Framework" application, the machine must have .Net Framework installed. The .Net Framework includes everything supported by the .Net Framework, such as ASP.NET, WPF, Windows Forms, etc..

For a "Net Core" application, the machine does not need have .Net Core installed. Visual Studio will download the bare minimum part of .Net Core depending on the project type. For example, for ASP.NET Core project, it will download the bare minimum just enough to support ASP.NET Core. It makes it practical to distribute the resulting ASP.NET application bundled with the downloaded .NET Core parts. In this way, the machine that runs the application does not need to have the necessary .Net Core versions installed.

Now, the bare minimum may not be enough for many applications. So the applications or its libraries (such as ChartDirector) must declare what it needs (such as "System.Drawing.Common"), so that Visual Studio will include them as well, and these included libraries may in turn need other libraries, etc.. The nuget system helps to manage these things.

For the "Net Framework", because it includes everything, ChartDirector for the .NET Framework can be distributed just as a DLL can include everything without worrying about dependencies.

Regards
Peter Kwan