I am creating 3 Pie charts, in my code with in different Divs. I hide
the panel containing these charts on a user action "Hide" , it throws
this error: "Microsoft JScript runtime error: Container is not
defined" (while i debug my code). And when i reload the charts with a
user action 'Show charts" - it just does not load. Page display does
not change at all. Please advise asap. Thanks.
*****************Below is my design:
<div id="NotificationPie" style="float:right; width:350px; height:
190px;">
<p></p>
</div>
<div style="float:right; width:290px; height: 190px;">
<p>Email Sent: <strong><asp:Literal runat="server"
ID="litEmailsSent"></asp:Literal></strong></p>
<p>Text Sent: <strong><asp:Literal runat="server"
ID="litSMSsSent"></asp:Literal></strong></p>
<p>Surveys Sent: <strong><asp:Literal runat="server"
ID="litSurveysSent"></asp:Literal></strong></p>
<p>Birthday Messages Sent: <strong><asp:Literal
runat="server" ID="litBirthdayEmails"></asp:Literal></strong></p>
</div>
</div>
<hr style="clear:both; position:relative; z-index:100;" /
>
<div style="width:654px; height:63px; padding:0 10px 0
0;">
<h3>People Metrics</h3>
<p>For your appointments today, <asp:Literal
ID="litPeopleNotSentMessageCount" runat="server"></asp:Literal> People
were not sent a reminder.
<asp:LinkButton ID="lbViewUnnotifiedPeoples"
runat="server" >Click here to view them.</asp:LinkButton></p>
<div id="SMSUserPie" style="float:right; width:327px;
height: 190px;"></div>
<div id="ValidEmailPie" style="float:right; width:327px;
height: 190px;"></div>
</div>
************And my code behind:
Private Sub BuildDashboard(ByVal TYDashboard As cTYDashboard)
Try
BuildPieChart("Notifications", "Peoples",
TYDashboard.PeoplesSentNotificationsCount, "Sent",
TYDashboard.PeoplesNotSentNotificationsCount, "Not Sent", "People Base
Sent Notifications", "NotificationPie")
BuildPieChart("Text Users", "Peoples",
TYDashboard.SMSOptInCount, "Opted In", TYDashboard.SMSNotOptInCount,
"Not Opted In", "People Base Opted in for Text", "SMSUserPie")
BuildPieChart("Valid Emails", "Peoples",
TYDashboard.ValidEmailAddresses, "Valid Emails",
TYDashboard.NoValidEmailAddress, "No Email", "People Base with Valid
Emails", "ValidEmailPie")
If TYDashboard.PeoplesNotNotifiedForAppointmentCount < 1
Then
lbViewUnnotifiedPeoples.Visible = False
End If
litPeopleNotSentMessageCount.Text =
TYDashboard.PeoplesNotNotifiedForAppointmentCount.ToString()
litEmailRemindersSent.Text =
TYDashboard.EmailRemindersSent.ToString()
litSMSRemindersSent.Text =
TYDashboard.SMSRemindersSent.ToString()
litSurveysSent.Text = TYDashboard.SurveysSent.ToString()
litBirthdayEmails.Text =
TYDashboard.BirthdayEmailsSent.ToString()
lvPeopleList.DataSource =
TYDashboard.PeoplesNotNotifiedForAppointment()
lvPeopleList.DataBind()
If TYDashboard.TYAmount > 0 Then
TYClass.Attributes.Item("class") = "PosAmount"
Else
TYClass.Attributes.Item("class") = "NegAmount"
End If
litTYAmmount.Text = String.Format("{0:C}",
TYDashboard.TYAmount)
ShowDashboard()
Catch ex As Exception
Response.Write("<script language=javascript>alert('" +
ex.Message + "')</script>")
End Try
End Sub
Private Sub BuildPieChart(ByVal ColumnNameTitle As String, ByVal
ColumnValueTitle As String, ByVal Value1 As Int32, ByVal Value1Name As
String, ByVal Value2 As Int32, ByVal Value2Name As String, ByVal
ChartTitle As String, ByVal ChartID As String)
Dim Column1 As New GoogleCharts.Column With {.ColumnName =
ColumnNameTitle, .ColumnType =
GoogleCharts.cGoogleCharts.ColumnType.Text}
Dim Column2 As New GoogleCharts.Column With {.ColumnName =
ColumnValueTitle, .ColumnType =
GoogleCharts.cGoogleCharts.ColumnType.Number}
Dim Row1 As New GoogleCharts.Row With {.RowName =
Value1Name, .RowValue = Value1}
Dim Row2 As New GoogleCharts.Row With {.RowName =
Value2Name, .RowValue = Value2}
Dim RowList As New List(Of GoogleCharts.Row)
RowList.Add(Row1)
RowList.Add(Row2)
Dim gChart As New GoogleCharts.cGoogleCharts(Column1, Column2,
RowList, ChartID, ChartTitle)
ScriptManager.RegisterClientScriptBlock(Me.Page,
GetType(Page), System.Guid.NewGuid.ToString,
gChart.BuildPieChartJS(IsPostBack), True)
End Sub
--
You received this message because you are subscribed to the Google Groups
"Google Chart API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-chart-api?hl=en.