Skip to content

Chart issues migrating to net6

New Discussion
Kevin O'Donvovan
Kevin O'Donvovan asked on Sep 19, 2022 1:14 PM

I’m migrating a winforms project from .net 4.7.2 to dotnet 6. The 4.7.2 project is using  v22.1 of the controls. In as much as I’m not getting compilation errors, it seems to have mostly worked, but I’m having a few errors relating to the chart controls. I’ve added Infragistics.WinForms.Charts 22.1.71 via our private nuget feed, but I’m getting the following compile time errors:

  • Type Infragistics.Win.UltrWinChart.UltraChart’ is not defined
  • Type ‘ChartDataEventArgs’ is not defined
  • Event ‘ChartDataClicked’ cannot be found

Any suggestions as to what might be the issue? Looking in a new project and dropping a chart control on a form, it looks like the chart controls might now be under Infragistics.Win.DataVisualization? I’m a little confused by that, as I’d have expected APIs to be more or less the same for the same major/minor version?

Sign In to post a reply

Replies

  • 0
    Divya Jain
    Divya Jain answered on Sep 16, 2022 8:28 PM

    Hello Kavin,

    Thank you for the post.

    I totally understand the confusion about the chart packages, here I am trying to explain , so we had ultraChart which is old control and almost retired , ultraChart is been replaced by ultraDataChart which is a new control and comparatively more efficient. We have dlls available for both the controls but for the NuGet we have packages for only UltraDataChart.

    So for UltraDataChart you would need to include chart package which will include dataVisulaization and portable core assemblies. Attached screenshot for the reference.(adding packages from the license feed)

    So may I know 1st which chart control you are using ultraChart or UltraDatachart?

    • 0
      Kevin O'Donvovan
      Kevin O'Donvovan answered on Sep 16, 2022 9:10 PM

      Hi Divya,

      thanks for your reply. We’re currently using the ultraChart control. I’ll be honest, I’d sooner not be switching components at this stage. This is a large multi-project application, and the less I have to change during the migration itself, the better. Do I have any option to stick with the ultraChart or do I need switch?

      Kevin

      • 0
        Divya Jain
        Divya Jain answered on Sep 16, 2022 9:17 PM

        Hello,  

        Unfortunately, we dont gave packages for the UltraChart so its upto you.

      • 0
        Kevin O'Donvovan
        Kevin O'Donvovan answered on Sep 18, 2022 10:41 PM

        Okay, thanks. Just seen how long since ultradatachart was released, so guess it was about time we updated. We don't make massive use of charting in the application, so I guess it was never revisited. Anyway, I've migrated all of our charts successfully in the .net framework version and copied the classes to the net 6 version

        Hope you don't mind me taking a slight tangent? Now that's resolved I see we have another issue. We use code like the following to load and save the user's customisations to each grid control:

        grid.DisplayLayout.LoadFromXml(ms, _categories);

        where ms is a stream. Using .net framework 22.1 this method is supported, but using the same code in net 6 it tells me that this member does not exist?

      • 0
        Divya Jain
        Divya Jain answered on Sep 19, 2022 1:14 PM

        Hello,

        I have been investigating into your requirement, and you are correct that the LoadFromXml and SaveAsXml methods are not present on the UltraGrid.DisplayLayout in .NET 6. The reason for this is because Microsoft discontinued the SoapFormatter class in .NET Core, which the methods in question used extensively.

        Luckily, we do expose other methods to save and load the layout of the UltraGridLayout via the Save and Load methods. These will save to binary, and so if you have an XML file that needs to be loaded, I would recommend that you first load it in a .NET Framework application and then re-save it using the Save method.

        Regards

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Kevin O'Donvovan
Favorites
0
Replies
5
Created On
Sep 19, 2022
Last Post
3 years, 5 months ago

Suggested Discussions

Tags

Created by

Created on

Sep 19, 2022 1:14 PM

Last activity on

Feb 25, 2026 10:41 AM