locked
Ajax Charts not working in IE RRS feed

  • Question

  • User1344924657 posted

    Have several charts on my 3.5 .net page and they all display in Chrome and Firefox but not IE. I have added several different things to my web.config and .aspx page but nothing works for IE. Any ideas of how to get the charts to work in IE?

    Tuesday, July 26, 2016 9:29 PM

All replies

  • User1869050296 posted

    press f12 (developer toolbar) to see any javascript is breaking

    Wednesday, July 27, 2016 3:36 AM
  • User61956409 posted

    Hi cgreene.gsu,

    Are you using Ajax contorl toolkit chart controls, PieChart, BarChart etc? or jQuery chart plugins? Please share us more information about the chart you are using now. If you could share us your relevant code, and then we will do our best to find and fix the issue. Besides, as jmpalines said, please check if there are any error in F12 developer tools Console tab.

    Best Regards,

    Fei Han

    Wednesday, July 27, 2016 6:53 AM
  • User1344924657 posted

    I clicked F12 then console tab and it does not show any issues.  Here is my code for the LineChart. It works in Firefox and Chrome with no issues. It also works in debugging mode through VS2010.

    <cc1:LineChart ID="LCTMLweeklycomparison" runat="server"  ChartHeight="300" ChartWidth = "400"
                                            ChartType="Basic" ChartTitleColor="#0E426C" Visible = "false"
                                            CategoryAxisLineColor="#D08AD9" ValueAxisLineColor="#D08AD9" BaseLineColor="#A156AB">
                                        </cc1:LineChart>
                                        <span>Team Lead: </span><asp:DropDownList ID="ddlteamlead" runat="server" AutoPostBack="true"
                                            onselectedindexchanged="ddlteamlead_SelectedIndexChanged"></asp:DropDownList>

    void loadteamleadcomparisonchart()
      {
          DateTime stdt = DateTime.Now.AddDays(-21);
          DateTime eddt = DateTime.Now;
          string query = string.Format("SELECT DATEADD(dd, 7-(DATEPART(dw, min(Start_Date))), min(Start_Date)) as EndOfWeek, " +
             "'Compliance %' = CONVERT(decimal(5,0), 100* SUM([TotaliCareTransfers&Conferences]) / SUM([TotalConferenceAndTransfers])) " +
         "FROM [VoipReporting].[dbo].[Softphone_Compliance] " +
         "WHERE " +
             "Start_Date Between '" + stdt + "' and '" + eddt.AddDays(+1) + "' " +
             "and TM_LEAD_NAME = '" + ddlteamlead.SelectedItem.Text + "' " +
         "GROUP BY datepart(week,Start_Date)");
          DataTable dt = GetData(query);

          string[] x = new string[dt.Rows.Count];
          decimal[] y = new decimal[dt.Rows.Count];
          for (int i = 0; i < dt.Rows.Count; i++)
          {
              x[i] = Convert.ToDateTime(dt.Rows[i][0]).ToShortDateString();
              y[i] = Convert.ToInt32(dt.Rows[i][1]);
          }

          LCTMLweeklycomparison.Series.Add(new AjaxControlToolkit.LineChartSeries {Name = ddlteamlead.SelectedItem.Text, Data = y });
          LCTMLweeklycomparison.CategoriesAxis = string.Join(",", x);
          LCTMLweeklycomparison.ChartTitle = "Team Lead Weekly Comparision";
          LCTMLweeklycomparison.ToolTip = ddlteamlead.SelectedItem.Text;

          if (x.Length > 3)
          {
              LCTMLweeklycomparison.ChartWidth = (x.Length * 75).ToString();
          }
          LCTMLweeklycomparison.Visible = true;
      }

    Wednesday, July 27, 2016 12:49 PM
  • User61956409 posted

    Hi cgreene.gsu,

    I create the sample using AJAX Control Toolkit LineChart, and I find the sample works fine in IE11 on my side. what is the version of your IE browser?

    This article explained with an example how to populate LineChart from database, and the example works fine on my side, you could view demo on your side to make sure if it could work fine.

    http://www.aspsnippets.com/Articles/ASPNet-AJAX-Line-Chart-Control-Populate-from-Database-example.aspx

    besides, you could try to upgrade your AJAX Control Toolkit.

    https://ajaxcontroltoolkit.codeplex.com/wikipage?title=Upgrade%20your%20project%20to%20AjaxControlToolkit%20v15.1&referringTitle=Documentation  

    Best Regards,

    Fei Han

    Thursday, July 28, 2016 9:42 AM
  • User1344924657 posted

    I am not sure what happened but my code began to work on IE. I just deleted some of my pages from the server and readded them and it started to work. Thank you all for your help. @Fei Han - MSFT the page you sent is the exact one I used to get help originally. Thank you.

    Thursday, July 28, 2016 1:59 PM
  • User1344924657 posted

    The issue started to happen again but I see an error now "throw"Browser does not support SVG." when I press F12. Anyone seen this issue before?

    Sunday, August 7, 2016 7:18 PM
  • User61956409 posted

    Hi cgreene.gsu,

    error now "throw"Browser does not support SVG."

    You could check the first browser version that fully supports the <svg> element from this link.

    http://www.w3schools.com/html/html5_svg.asp

    Best Regards,

    Fei Han

    Monday, August 8, 2016 9:37 AM