Dashboard with multiple threads

8 posts, 0 answers
  1. Rahul Khinvasara
    Rahul Khinvasara avatar
    303 posts
    Member since:
    Aug 2007

    Posted 30 Jul 2008 Link to this post

    Hi,

    I have created the dash board page, using telerik charts

    Telerik version : RadControls for ASPNET AJAX Q1 2008
     and visual studio 2008 / sqlserver.

    I have 10 user controls having charts.
    In the dash board page I am creating the zones and dock controls runtime and inside dock

    control, binding the user controls.

    Now when i moved to the dash board page it calls all the 10 stored proc to bind the  charts

    which is in usercontrol one by one and display the dashboard page simultaneously.

    What i want is to call all the 10 stored proc simultaneously and display that one by one as

    loaded.
    Like igogle they load the dashboard page and uses the loading image to the items which takes

    time to load.

    can any body help me.

  2. Michael Josiah
    Michael Josiah avatar
    92 posts
    Member since:
    Nov 2007

    Posted 30 Jul 2008 Link to this post

    I am also looking for a solution for this. Anyone from the Telerik team able to shed some light on this. Do we need to load each load asyncronasly? If so any ideas how?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 30 Jul 2008 Link to this post

    Rahul-

    Sounds like you need some Ajax. :) I suggest you load your most important chart(s) on initial page load and then use some JavaScript to fire some Ajax methods to load your other charts after the page is fully loaded.

    To do that, you can use ASP.NET AJAX's pageLoad() client event, which always fires when the page is finished loading. From there, you can write some JS that takes advantage of the RadAjaxManager client-side Ajax event. Check out this demo for examples of firing Ajax events from JS code:


    If you want to take an even more advanced approach, you can use ASP.NET AJAX to easily return your chart image data via web services. To access the chart image data, check-out the Save method on RadChart.

    Hope that helps get you started. Let me know if you get stuck.

    -Todd

  5. vivek
    vivek avatar
    5 posts
    Member since:
    Aug 2008

    Posted 27 Aug 2008 Link to this post

    I am creatiing the zones and docks at runtime through database
    the code is below 

    public void BuildTab()

    {

    try

    {

    hvCurrentTabName.Value = RadTabStrip1.SelectedTab.Text.ToString();

    DataSet ds = new DataSet();

    DataAccess objDataAccess = new DataAccess();

    ds = objDataAccess.proc_dashGet_Zones_User(RadTabStrip1.SelectedTab.Text.ToString(), UserID);

    int ZonCount = ds.Tables[0].Rows.Count;

    for (int i = 0; i < ZonCount; i++)

    {

    RadDockZone NewRadZone = new RadDockZone();

    NewRadZone.EnableViewState =

    true;

    NewRadZone.ID = ds.Tables[0].Rows[i][

    "AccountUserZoneId"].ToString() + "_Zone";

    string strZoneType = ds.Tables[0].Rows[i]["ZoneType"].ToString();

    if (strZoneType == "V")

    {

    NewRadZone.Orientation =

    Orientation.Vertical;

    int ZminH = Convert.ToInt32(ds.Tables[0].Rows[i]["VerticalZoneMinHeight"].ToString());

    NewRadZone.MinHeight = ZminH;

    int ZWidth = Convert.ToInt32(ds.Tables[0].Rows[i]["VerticalZoneWidth"].ToString());

    NewRadZone.Width = ZWidth;

    }

    else

    {

    NewRadZone.Orientation =

    Orientation.Horizontal;

    int ZHeight = Convert.ToInt32(ds.Tables[0].Rows[i]["HorizontalZoneHeight"].ToString());

    NewRadZone.MinHeight = ZHeight;

    int ZMinWidth = Convert.ToInt32(ds.Tables[0].Rows[i]["HorizontalZoneMinWidth"].ToString());

    NewRadZone.Width = ZMinWidth;

    }

    NewRadZone.FitDocks =

    true;

    NewRadZone.Style.Add(

    "float", "left");

    NewRadZone.Style.Add(

    "margin-right", "0px");

    NewRadZone.BorderWidth = 0;

    NewRadZone.BackColor = System.Drawing.

    Color.White;

    int AccountUserZoneId = Convert.ToInt32(ds.Tables[0].Rows[i]["AccountUserZoneId"].ToString());

    DataSet dsZone = new DataSet();

    dsZone = objDataAccess.proc_dashGet_DashboardDetails_User(AccountUserZoneId);

    int DockCount = dsZone.Tables[0].Rows.Count;

    for (int j = 0; j < DockCount; j++)

    {

    RadDock NewRadDock = new RadDock();

    NewRadDock.EnableViewState =

    true;

    NewRadDock.ID = dsZone.Tables[0].Rows[j][

    "DashboardItemId"].ToString() + "_" + dsZone.Tables[0].Rows[j]["AccountUserDashboardSettingId"].ToString() + "_Dock";

    NewRadDock.Title = dsZone.Tables[0].Rows[j][

    "DashboardItemName"].ToString() + "-" + dsZone.Tables[0].Rows[j]["DashboardItemId"].ToString();

    NewRadDock.Height = 300;

    NewRadDock.Width = 310;

    NewRadDock.Skin =

    "Web20";

    NewRadDock.DockMode =

    DockMode.Docked;

    NewRadDock.ContentContainer.BackColor = System.Drawing.

    Color.White;

    NewRadDock.DockPositionChanged +=

    new DockPositionChangedEventHandler(NewRadDock_DockPositionChanged);

    NewRadDock.AutoPostBack =

    true;

    NewRadDock.ContentContainer.ScrollBars =

    ScrollBars.None;

    string name ="~/Account/Chart User Controls/" + dsZone.Tables[0].Rows[j]["UserControlName"].ToString() + ".ascx";;

    FileInfo objFileifo = new FileInfo(Server.MapPath(name).ToString());

    if (objFileifo.Exists)

    {

    Control userControl = LoadControl(name);

    NewRadDock.ContentContainer.Controls.Add(userControl);

    }

    NewRadZone.Controls.Add(NewRadDock);

    }

    RadDockLayout1.Controls.Add(NewRadZone);

    }

    int cnt = RadMultiPage1.PageViews.Count;

    RadMultiPage1.PageViews[RadTabStrip1.SelectedIndex].Controls.Add(RadDockLayout1);

    }

    catch (Exception ex)

    {

    Response.Write(

    "Account_Dashboard.aspx_:BuildTab" + ex.Message.ToString());

    }

    }

    and in user controls i am binding the chats through database.

    so when i moved to a dashboard page it creates the zones (get zone info from database) then it creates the docks(get dock info from database) and in dock it adds the user controls
    NewRadDock.ContentContainer.Controls.Add(userControl);

    And inside every usercontrol I have a code to bind the charts( by calling the stored procs).

    But to follow up the above whole procedure it takes lots of time to load/render the charts.
    Please give me any way to start with.
    Let me know if you want more info about the code and structure.
    thanks
    Vivek

  6. vivek
    vivek avatar
    5 posts
    Member since:
    Aug 2008

    Posted 29 Aug 2008 Link to this post

    Can we use iframe in every indidual charts?
    Thanks
    Vivek
  7. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 01 Sep 2008 Link to this post

    Hi vivek,

    How many items do you have in the chart when you are getting the slowdowns? RadChart will have problems with more than 1000 items on screen. While the product was designed to be easily customizable and feature rich it does not cope well with extremely busy charts. There is a trade off to make between high customization and high performance and we've gone the rich features path as it is what most of our customers are interested in.

    To check whether the issue is with the charts rendering you can use ASP.NET trace or CLR Profiler and Firebug or a similar plug-in to investigate the client side performance.


    Regards,
    Ves
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. vivek
    vivek avatar
    5 posts
    Member since:
    Aug 2008

    Posted 02 Sep 2008 Link to this post

    less than 1000 items in the chart but having 6-8 charts in the same page.
  9. Ves
    Admin
    Ves avatar
    2879 posts

    Posted 05 Sep 2008 Link to this post

    Hello vivek,

    Did you try any of the above suggested tools to confirm where the delay comes from? In case it does come from RadChart rendering, did you check Todd's suggestions for async load using AJAX?

    Sincerely,
    Ves
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017