Microsoft Chart Controls

Posted by kaoru1 on 08-Mar-2010 19:57

Hello fellow developers,

Apologize if this has been asked before, didn't see a thread on it.

Are the Microsoft Chart controls supported in Openedge .NET?  If not, do we know if the plan is to support them at a later date?

It seems like a very powerful component for generating a variety of graphs and charts.

I can add the component to the control list but the intialize component method has compliation errors.

        DEFINE VARIABLE chartArea1 AS System.Windows.Forms.DataVisualization.Charting.ChartArea NO-UNDO.
        chartArea1 = NEW System.Windows.Forms.DataVisualization.Charting.ChartArea().

        THIS-OBJECT:chart1:ChartAreas:
        THIS-OBJECT:chart1:ChartAreas:Add(chartArea1).  <- Progress thinks that the ADD method of ChartAreas wants a character when the documentation wants the ChartArea object as defined above.

Links:

http://www.microsoft.com/downloads/details.aspx?FamilyId=130F7986-BF49-4FE5-9CA8-910AE6EA442C&displaylang=en

http://msdn.microsoft.com/en-us/library/dd456632%28VS.100%29.aspx

Thanks,

Eric

All Replies

Posted by Admin on 09-Mar-2010 00:37

Apologize if this has been asked before, didn't see a thread on it.

I don't seem to remember...

Are the Microsoft Chart controls supported in Openedge .NET?  If not, do we know if the plan is to support them at a later date?

According to this document http://communities.progress.com/pcom/docs/DOC-104055 they are not supported. And according to this list http://communities.progress.com/pcom/docs/DOC-104285 Progress supports the UltraChart from Ingragistics. So I personally would be surprised if there are plans to support the MS Chart in the near future (especially since it's a separate download and not part of the Controls shipped with the core framework). But someone from Progress should make this clear!

I can add the component to the control list but the intialize component method has compliation errors.

As usual the actual error message and/or sample code might help.

Progress thinks that the ADD method of ChartAreas wants a character when the documentation wants the ChartArea object as defined above.

I can see that in the class browser as well which seems to be an issue.

But, you did not mention the OpenEdge Version. The following code was generated to initializeComponents here on 10.2B and seems to work fine.

        /*  */

        /* chart1 */

        /*  */

        chartArea1:Name = "ChartArea1".

        THIS-OBJECT:chart1:ChartAreas:Add(chartArea1).

        legend1:Name = "Legend1".

        THIS-OBJECT:chart1:Legends:Add(legend1).

        THIS-OBJECT:chart1:Location = NEW System.Drawing.Point(28, 31).

        THIS-OBJECT:chart1:Name = "chart1".

        series1:ChartArea = "ChartArea1".

        series1:Legend = "Legend1".

        series1:Name = "Series1".

        THIS-OBJECT:chart1:Series:Add(series1).

        THIS-OBJECT:chart1:Size = NEW System.Drawing.Size(416, 304).

        THIS-OBJECT:chart1:TabIndex = 0.

        THIS-OBJECT:chart1:Text = "chart1".

Posted by kaoru1 on 09-Mar-2010 11:42

Thanks for the reply Mike and links to supported controls.

I'm using version 10.2A01.

I get the same generated code:

        DEFINE VARIABLE chartArea1 AS System.Windows.Forms.DataVisualization.Charting.ChartArea NO-UNDO.
        chartArea1 = NEW System.Windows.Forms.DataVisualization.Charting.ChartArea().
        DEFINE VARIABLE legend1 AS System.Windows.Forms.DataVisualization.Charting.Legend NO-UNDO.
        legend1 = NEW System.Windows.Forms.DataVisualization.Charting.Legend().
        DEFINE VARIABLE series1 AS System.Windows.Forms.DataVisualization.Charting.Series NO-UNDO.
        series1 = NEW System.Windows.Forms.DataVisualization.Charting.Series().
        THIS-OBJECT:chart1 = NEW System.Windows.Forms.DataVisualization.Charting.Chart().
        CAST(THIS-OBJECT:chart1, System.ComponentModel.ISupportInitialize):BeginInit().

        chartArea1:Name = "ChartArea1".
        THIS-OBJECT:chart1:ChartAreas:Add(chartArea1).
        legend1:Name = "Legend1".
        THIS-OBJECT:chart1:Legends:Add(legend1).
        THIS-OBJECT:chart1:Location = NEW System.Drawing.Point(248, 73).
        THIS-OBJECT:chart1:Name = "chart1".
        series1:ChartArea = "ChartArea1".
        series1:Legend = "Legend1".
        series1:Name = "Series1".
        THIS-OBJECT:chart1:Series:Add(series1).

The errors I get are  (dealing with the three ADD statements above):

Severity and Description    Path    Resource    Location    Creation time    Id
Parameter 1 for METHOD Add is not type compatible with its definition. (12905)    PM Reporting    GUIDashboard.cls    line 62    1268156245628    4993
Parameter 1 for METHOD Add is not type compatible with its definition. (12905)    PM Reporting    GUIDashboard.cls    line 64    1268156245628    4995
Parameter 1 for METHOD Add is not type compatible with its definition. (12905)    PM Reporting    GUIDashboard.cls    line 70    1268156245628    4997

Perhaps this was corrected in version 10.2B, will upgrade and investigate.

Thanks,

Eric

Posted by kaoru1 on 15-Mar-2010 12:45

Note to anyone reading this thread.

Switching to Architect 10.2A02 has corrected the issue with using the Microsoft chart control.

Thanks,

Eric

Posted by trsandoval on 23-Aug-2013 15:00

I am trying to use the Microsoft Control.  When I tried to run the code attached with this post if get the following error:Invalid datatype specified: System.Windows.Forms.DataVisualization.Charting.ChartArea. Specify a datatype such as 'character' or the name of a class. (5638)**  Could not understand line 2. (196)do I need to do something else (like define an object) before i can run this  code?

This thread is closed