[CLOSED] Use Chart ,push data in code behide,it will be hangs up..?

  1. #1

    [CLOSED] Use Chart ,push data in code behide,it will be hangs up..?

    I want to push data,in Page_Load
    It will be hangs up....?
    Click image for larger version. 

Name:	01.JPG 
Views:	76 
Size:	55.1 KB 
ID:	5540
    this is my code
    <%@ Page Language="C#" %>
    
    <%@ Import Namespace="System.Data" %>
    
    <%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store Store1 = this.Chart1.GetStore();
    
                Store1.DataSource = Ext.Net.Examples.ChartData.GenerateData(8);
                Store1.DataBind();
    
            }
        }
    
        protected void ReloadData(object sender, DirectEventArgs e)
        {
            
    
        }
    </script>    
    
    <!DOCTYPE html>
    
    <html>
    <head id="Head1" runat="server">
        <title>Grouped Bar Chart - Ext.NET Examples</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
    
        <script>
            function saveChart(btn) {
                Ext.MessageBox.confirm('Confirm Download', 'Would you like to download the chart as an image?', function (choice) {
                    if (choice == 'yes') {
                        btn.up('panel').down('chart').save({
                            type: 'image/png'
                        });
                    }
                });
            }
        </script>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
    
            <h1>Grouped Bar Sample</h1>
    
            <p>Display 3 sets of random data in a grouped bar series.</p>
            
            <p>Reload data will randomly generate a new set of data in the store. Click or hover on the legend items to highlight and remove them from the chart.</p>
    
            <ext:Panel ID="Panel1" 
                runat="server"
                Title="Grouped Bar Chart"
                Width="800"
                Height="600"
                Layout="FitLayout">
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <ext:Button ID="Button1" 
                                runat="server" 
                                Text="Reload Data" 
                                Icon="ArrowRefresh" 
                                OnDirectClick="ReloadData" 
                                />
    
                            <ext:Button ID="Button2" 
                                runat="server" 
                                Text="Animate" 
                                Icon="ShapesManySelect" 
                                EnableToggle="true" 
                                Pressed="true">
                                <Listeners>
                                    <Toggle Handler="#{Chart1}.animate = pressed ? {easing: 'ease', duration: 500} : false;" />
                                </Listeners>
                            </ext:Button>
    
                            <ext:Button ID="Button3" 
                                runat="server" 
                                Text="Save Chart" 
                                Icon="Disk"
                                Handler="saveChart"
                                />
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                    <ext:Chart 
                        ID="Chart1" 
                        runat="server"
                        StyleSpec="background:#fff;"  
                        StandardTheme="Category1"                  
                        Shadow="true"
                        Animate="true">
                        <LegendConfig Position="Right" />
                        <Store>
                            <ext:Store ID="Store1" 
                                runat="server" 
                                AutoDataBind="true">                           
                                <Model>
                                    <ext:Model ID="Model1" runat="server">
                                        <Fields>
                                            <ext:ModelField Name="Name" />
                                            <ext:ModelField Name="Data1" />
                                            <ext:ModelField Name="Data2" />
                                            <ext:ModelField Name="Data3" />
                                            <ext:ModelField Name="Data4" />
                                        </Fields>
                                    </ext:Model>
                                </Model>
                            </ext:Store>
                        </Store>
                        <Axes>
                            <ext:NumericAxis
                                Position="Left"                             
                                Fields="Data1,Data2,Data3,Data4"
                                Title="Number of Hits"
                                Grid="true"
                                Minimum="0">
                                <Label>
                                    <Renderer Fn="Ext.util.Format.numberRenderer('0,0')" />
                                </Label>
                            </ext:NumericAxis>                            
    
                            <ext:CategoryAxis 
                                Fields="Name"
                                Position="Bottom"
                                Title="Month of the Year"
                                />
                        </Axes>
                        <Series>
                            <ext:ColumnSeries 
                                Axis="Bottom"
                                XField="Name"
                                YField="Data1,Data2,Data3"
                                Stacked="true"
                                />
                            <ext:LineSeries Axis="Bottom" Smooth="3" Fill="true" XField="Name" YField="Data4" />
                        </Series>
                    </ext:Chart>
                </Items>
            </ext:Panel>
        </form>    
    </body>
    </html>




    Is this the same problem?
    Quote Originally Posted by Vladimir View Post
    Hi,

    It is known problem
    Here is bug report
    http://www.sencha.com/forum/showthre...s-up-a-browser

    We will include the fix after Sencha releases it
    Last edited by Daniil; Feb 05, 2013 at 9:42 AM. Reason: [CLOSED]
  2. #2
    Hello!

    Yes, this is the same problem.

Similar Threads

  1. Pie Chart from Code Behind
    By devgaipp in forum 2.x Help
    Replies: 0
    Last Post: Sep 18, 2012, 12:29 PM
  2. Replies: 1
    Last Post: Jun 02, 2012, 7:12 AM
  3. Push techno as CometD
    By Yannis in forum 1.x Help
    Replies: 2
    Last Post: Feb 23, 2012, 12:44 AM
  4. [CLOSED] Loading data in store take too long. browser hangs.
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 21
    Last Post: Nov 22, 2011, 8:42 AM
  5. Comet (http push)
    By ahmadezzeir in forum 1.x Help
    Replies: 9
    Last Post: Mar 10, 2011, 7:43 PM

Tags for this Thread

Posting Permissions