[CLOSED] Problem when upgrading to EXT.NET 2.5.1

  1. #1

    [CLOSED] Problem when upgrading to EXT.NET 2.5.1

    When I try that code with Ext.Net last official version:

    <%@ Page Language="C#" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <script runat="server">
        public string[] COLORS = new string[]{"rgb(47, 162, 223)", "rgb(60, 133, 46)", "rgb(234, 102, 17)", "rgb(154, 176, 213)", "rgb(186, 10, 25)", "rgb(40, 40, 40)", "rgb(60, 60, 60)"};
        
        protected void Page_Load(object sender, EventArgs e)
        {
            List<object> data = new List<object> 
            { 
                new { Date = new DateTime(2009, 1, 1),  IE = 44.8, Firefox = 45.5, Chrome = 3.9,  Safari = 3,   Opera = 2.3, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 2, 1),  IE = 43.6, Firefox = 46.4, Chrome = 4,    Safari = 3,   Opera = 2.2, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 3, 1),  IE = 43.3, Firefox = 46.5, Chrome = 4.2,  Safari = 3.1, Opera = 2.3, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 4, 1),  IE = 42.1, Firefox = 47.1, Chrome = 4.9,  Safari = 3,   Opera = 2.2, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 5, 1),  IE = 41,   Firefox = 47.7, Chrome = 5.5,  Safari = 3,   Opera = 2.2, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 6, 1),  IE = 40.7, Firefox = 47.3, Chrome = 6,    Safari = 3.1, Opera = 2.1, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 7, 1),  IE = 39.4, Firefox = 47.9, Chrome = 6.5,  Safari = 3.3, Opera = 2.1, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 8, 1),  IE = 39.3, Firefox = 47.4, Chrome = 7,    Safari = 3.3, Opera = 2.1, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 9, 1),  IE = 39.6, Firefox = 46.6, Chrome = 7.1,  Safari = 3.6, Opera = 2.2, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 10, 1), IE = 37.5, Firefox = 47.5, Chrome = 8,    Safari = 3.8, Opera = 2.3, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 11, 1), IE = 37.7, Firefox = 47,   Chrome = 8.5,  Safari = 3.8, Opera = 2.3, Other = 25, Max=50 },
                new { Date = new DateTime(2009, 12, 1), IE = 37.2, Firefox = 46.4, Chrome = 9.8,  Safari = 3.6, Opera = 2.3, Other = 25, Max=50 },                
                new { Date = new DateTime(2010, 1, 1),  IE = 36.2, Firefox = 46.3, Chrome = 10.8, Safari = 3.7, Opera = 2.2, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 2, 1),  IE = 35.3, Firefox = 46.5, Chrome = 11.6, Safari = 3.8, Opera = 2.1, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 3, 1),  IE = 34.9, Firefox = 46.2, Chrome = 12.3, Safari = 3.7, Opera = 2.2, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 4, 1),  IE = 33.4, Firefox = 46.4, Chrome = 13.6, Safari = 3.7, Opera = 2.2, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 5, 1),  IE = 32.2, Firefox = 46.9, Chrome = 14.5, Safari = 3.5, Opera = 2.2, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 6, 1),  IE = 31,   Firefox = 46.6, Chrome = 15.9, Safari = 3.6, Opera = 2.1, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 7, 1),  IE = 30.4, Firefox = 46.4, Chrome = 16.7, Safari = 3.4, Opera = 2.3, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 8, 1),  IE = 30.7, Firefox = 45.8, Chrome = 17,   Safari = 3.5, Opera = 2.3, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 9, 1),  IE = 31.1, Firefox = 45.1, Chrome = 17.3, Safari = 3.7, Opera = 2.2, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 10, 1), IE = 29.7, Firefox = 44.1, Chrome = 19.2, Safari = 3.9, Opera = 2.2, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 11, 1), IE = 28.6, Firefox = 44,   Chrome = 20.5, Safari = 4.0, Opera = 2.3, Other = 25, Max=50 },
                new { Date = new DateTime(2010, 12, 1), IE = 27.5, Firefox = 43.5, Chrome = 22.4, Safari = 3.8, Opera = 2.2, Other = 25, Max=50 }
            };
    
            Store store = this.Chart1.GetStore();
            
            store.DataSource = data;
            store.DataBind();
        }
    </script> 
        <script>
            var fixeMaxValueForChart = function (store, data) {
                App.Chart1.axes.items[0].maximum = 10;
                App.Chart1.redraw();
            }
        </script>
    
    <!DOCTYPE html>
    
    <html>
    <head id="Head1" runat="server">
        <title>Area BrowserStats - Ext.NET Examples</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />   
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
    
            <h1>Area - BrowserStats</h1>
    
            <p>Display browser usage trends in an area series.</p>
            
            <p>This chart uses custom gradients for the colors and the legend is interactive.</p>
            
            <p>Click or hover on the legend items to highlight and remove them from the chart</p>
    
            <ext:ChartTheme ID="ChartTheme1" 
                runat="server" 
                ThemeName="Browser" 
                Colors="<%# COLORS %>"
                AutoDataBind="true"
                />            
    
            <ext:Panel ID="Panel1" 
                runat="server"
                Title="What is the trend in Browser Usage?"
                Width="800"
                Height="600"
                Layout="FitLayout">           
                <Items>
                    <ext:Chart 
                        ID="Chart1" 
                        runat="server"
                        StyleSpec="background:#fff;"                   
                        Animate="true">
                        <LegendConfig Position="Right" />
                        <Store>
                            <ext:Store ID="Store1" runat="server">                           
                                <Model>
                                    <ext:Model ID="Model1" runat="server">
                                        <Fields>
                                            <ext:ModelField Name="Date" Type="Date" />
                                            <ext:ModelField Name="IE" />
                                            <ext:ModelField Name="Chrome" />
                                            <ext:ModelField Name="Firefox" />
                                            <ext:ModelField Name="Safari" />
                                            <ext:ModelField Name="Opera" />
                                            <ext:ModelField Name="Other" />
                                            <ext:ModelField Name="Max" />
                                        </Fields>
                                    </ext:Model>
                                </Model>
                                <Listeners>
                                    <Load Fn="fixeMaxValueForChart"></Load>
                                </Listeners>
                            </ext:Store>
                        </Store>
                        <Axes>
                            <ext:NumericAxis                             
                                Fields="IE,Chrome,Firefox,Safari,Opera,Other, Max"
                                Title="Usage %"
                                Grid="true"
                                Decimals="0"
                                />
                            <ext:CategoryAxis 
                                Position="Bottom"
                                Fields="Date"
                                Title="Month of the Year"
                                Grid="true">
                                <Label>
                                    <Renderer Handler="return Ext.Date.format(value, 'M d');" />
                                </Label>
                            </ext:CategoryAxis>
                        </Axes>
                        <Series>
                            <ext:LineSeries Axis="Left" XField="Date" YField="IE" Title="IE">
                            </ext:LineSeries>
                            <ext:LineSeries Axis="Left" XField="Date" YField="Chrome" Title="Chrome">
                            </ext:LineSeries>
                            <ext:LineSeries Axis="Left" XField="Date" YField="Firefox" Title="Firefox">
                            </ext:LineSeries>
                            <ext:LineSeries Axis="Left" XField="Date" YField="Safari" Title="Safari">
                            </ext:LineSeries>
                            <ext:LineSeries Axis="Left" XField="Date" YField="Opera" Title="Opera">
                            </ext:LineSeries>
                            <ext:LineSeries Axis="Left" XField="Date" YField="Max" Title="Max">
                            </ext:LineSeries>
                            <ext:AreaSeries 
                                Axis="Left"
                                Highlight="true"
                                YField="Other, Max">
                                    <Style Opacity="0.86" StrokeWidth="1" Stroke="#666"  />
                                </ext:AreaSeries>
                        </Series>
                    </ext:Chart>
                </Items>
            </ext:Panel>
        </form>    
    </body>
    </html>
    I get this error:


    Server Error in '/' Application.

    Parser Error
    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Cannot create an object of type 'System.String[]' from its string representation 'INT_Reception, INT_PrepaModelCAD, INT_CAM, INT_SCAN, INT_CAD, INT_PrepaModelTRAD, INT_TRAD, INT_Qualite, INT_Logistique, INT_Shipped, INT_ToShipped, INT_SAV, INT_WaitSPEC, INT_WaitDOC, INT_WaitFTP' for the 'Fields' property.

    Source Error:



    Line 1125:
    Line 1126: <Axes>
    Line 1127: <ext:NumericAxis Fields="INT_Reception, INT_PrepaModelCAD, INT_CAM, INT_SCAN, INT_CAD, INT_PrepaModelTRAD, INT_TRAD, INT_Qualite, INT_Logistique, INT_Shipped, INT_ToShipped, INT_SAV, INT_WaitSPEC, INT_WaitDOC, INT_WaitFTP" Grid="true" >
    Line 1128: <Label Font="10px Arial">
    Line 1129: <Renderer Handler="return Ext.util.Format.number(value, '0.0');" />


    Source File: /default.aspx Line: 1127


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446
    All works well with previous version? Can you help please?

    And is it normal there is only ext.net.dll in the zip doanwloaded? Where are ext.net.utilities, Newtonsoft.json and Transformer.net?
    Last edited by Daniil; May 06, 2014 at 6:58 AM. Reason: [CLOSED]
  2. #2
    Hi

    For me, online sample works fine
    https://examples2.ext.net/#/Chart/Area/Browser_Stats/

    Please post simple test sample reproduces the issue
  3. #3
    Quote Originally Posted by Vladimir View Post
    Hi

    For me, online sample works fine
    https://examples2.ext.net/#/Chart/Area/Browser_Stats/

    Please post simple test sample reproduces the issue
    I hope example works, for me too it works, but when I upgrade into my solution to 2.5.1 version, it didn't, but perhaps because I have not the dull package once downloaded (lack of the 3 DLLs I mentioned before)
  4. #4
    Hi,

    it didn't, but perhaps because I have not the dull package once downloaded (lack of the 3 DLLs I mentioned before)
    Those assemblies should be automatically retrieved by Nuget manager
    How did you upgrade your application to 2.5.1?
  5. #5
    Quote Originally Posted by Vladimir View Post
    Hi,


    Those assemblies should be automatically retrieved by Nuget manager
    How did you upgrade your application to 2.5.1?
    Very curious, Nuget install make it works.... Until now, I always use the reference swithc by changing the dll into the solution's refernce part with zip file I donwload from your site and never use nuget...I did not understand.
  6. #6

Similar Threads

  1. Replies: 3
    Last Post: Jan 28, 2014, 12:04 PM
  2. [CLOSED] GridPanel problem after upgrading to version 2.2
    By ermanni.info in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 10, 2013, 4:09 AM
  3. Need help upgrading from 1.x to 2.x
    By wexman in forum 2.x Help
    Replies: 1
    Last Post: Jun 06, 2013, 11:28 AM
  4. Upgrading from V1.3 to V2.0
    By Birgit in forum 2.x Help
    Replies: 1
    Last Post: Mar 29, 2012, 4:47 PM
  5. upgrading from 0.8.1 to 0.8.2
    By Kamal in forum 1.x Help
    Replies: 4
    Last Post: Apr 08, 2010, 5:52 PM

Posting Permissions