Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Ajax LineChart Rollover causes JavaScript error

$
0
0

When I rollover my chart to see a tooltip I get an error message pop up in debugging mode.

JavaScript runtime error: 'ShowTooltip' is undefined

JavaScript runtime error: 'HideTooltip' is undefined

<cc1:LineChart ID="LCCallCenterWeeklyComparison" runat="server" EnableViewState="True" ImageStorageMode="UseImageLocation"
                                                        BaseLineColor="#A156AB" CategoryAxisLineColor="#D08AD9" ChartHeight="300"
                                                        ChartTitleColor="#0E426C" ChartType="Basic" ChartWidth="400"
                                                        ValueAxisLineColor="#D08AD9" Visible="false">
                                                    </cc1:LineChart>

void loadcallcenterweeklycomparisonchart()
  {
      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 CALL_CENTER = '" + ddlcallcenters.SelectedItem.Text + "' " +
     "GROUP BY datepart(week,Start_Date) ORDER 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]);
      }
      LCCallCenterWeeklyComparison.Series.Add(new AjaxControlToolkit.LineChartSeries { Name = ddlcallcenters.SelectedItem.Text, Data = y, LineColor = "#000000" });
      LCCallCenterWeeklyComparison.CategoriesAxis = string.Join(",", x);
      LCCallCenterWeeklyComparison.ChartTitle = "Weekly Comparison";
      
      
      if (x.Length > 3)
      {
          LCCallCenterWeeklyComparison.ChartWidth = (x.Length * 75).ToString();
      }
      LCCallCenterWeeklyComparison.Visible = true;
  }


Viewing all articles
Browse latest Browse all 5678

Trending Articles