fluoronator

Members
  • Content count

    7
  • Joined

  • Last visited

About fluoronator

  • Rank
    Forum Newbie
  1. I'm trying to display a piece of text on an MSLine chart using an annotation. Here's my XML... <annotations> <annotationgroup> <annotation id='MyText' type='text' fillcolor='#ffffff' fontsize='50' x='10' y='10' text='This is my sample text' /> </annotationgroup> </annotations> I can't seem to get it to display on the chart. What have I done wrong? Below is my complete chart XML. It works except for the annotation text. <chart> bgcolor='#000000' bgalpha='100' showborder='0' tooltipbgcolor='#333333' showvalues='0' showLabels='0' forceYAxisValueDecimals='1' YAxisValueDecimals='2' adjustDiv='0' numdivlines='9' yAxisMinValue='1.50' yAxisMaxValue='2.50' LegendBgColor='#000000' basefontcolor='#FFFFFF' showAlternateHGridColor='0' canvasBgColor='020202,777777,020202' canvasBgAlpha='100'> <trendlines> <line startvalue='1.50' endValue='1.83' color='B1FFB1' isTrendZone='1' showOnTop='0' alpha='15' valueOnRight='1' displayvalue=' ' /> <line startvalue='1.83' endValue='1.85' color='F6F164' isTrendZone='1' showOnTop='0' alpha='15' valueOnRight='1' displayvalue=' ' /> <line startvalue='1.85' endValue='2.50' color='F70118' isTrendZone='1' showOnTop='0' alpha='15' valueOnRight='1' displayvalue=' ' /> </trendlines> <categories> <category label='3/31/2015' /> <category label='4/1/2015' /> <category label='4/2/2015' /> <category label='4/3/2015' /> <category label='4/4/2015' /> <category label='4/5/2015' /> <category label='4/6/2015' /> <category label='4/7/2015' /> <category label='4/8/2015' /> <category label='4/9/2015' /> </categories> <dataset seriesname='Daily' > <set value='1.913' /> <set value='1.76304' /> <set value='1.72354' /> <set value='1.99839' /> <set value='1.89005' /> <set value='1.67417' /> <set value='1.71277' /> <set value='1.86934' /> <set value='1.87298' /> <set value='1.82006' /> </dataset> <dataset seriesname='Month-to-Date'> <set value='1.81756' /> <set value='1.76304' /> <set value='1.74235' /> <set value='1.82372' /> <set value='1.8406' /> <set value='1.80302' /> <set value='1.78813' /> <set value='1.79906' /> <set value='1.80849' /> <set value='1.80986' /> </dataset> <annotations> <annotationgroup> <annotation id='MyText' type='text' fillcolor='#ffffff' fontsize='50' x='10' y='10' text='This is my sample text' /> </annotationgroup> </annotations> </chart>
  2. Webpage Works In Ie But Not In Chrome

    Here's the HTML for one of the pages... <%@ Page Language="VB" AutoEventWireup="false" CodeFile="J1.aspx.vb" Inherits="J1Charts" Debug="true" %> <html> <head runat="server"> <title>J1 Process Data</title> <style type="text/css"> .toolbar { background-color: #313031; padding: 5px 0px 5px 0px; } .menu { border-right: 1px solid White; text-decoration: none; background-color: #313031; padding: 5px; color: white; font-family: Tahoma; font-size: 8pt; font-weight: bold; } .menu:hover { background-color: #5A8EC6; } </style> </head> <body style="background-color: #336699;"> <form id="form1" runat="server"> <center> <!-- ******************************************************************************************* Set-up the Menu table *********************************************************************************************--> <table style="background-color: #313031; border: thin solid #c0c0c0; width: 900px; margin-top: 1px; margin-bottom: 5px" cellpadding="0" cellspacing="0" bgcolor="White"> <tr> <td> <div style="background-color: #000000; padding: 5px 1px 5px 6px"> <asp:Menu ID="Menu1" runat="server" BackColor="#000000" Font-Bold="True" ForeColor="#ffffff" Orientation="Horizontal" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" StaticSubMenuIndent="10px" DisappearAfter="200"> <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <DynamicHoverStyle BackColor="#0099FF" ForeColor="White" /> <DynamicMenuStyle BackColor="#0033CC" /> <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <StaticHoverStyle ForeColor="White" /> <Items> <asp:MenuItem NavigateUrl="~/Utilities.aspx" Text="Utilities" Value="Utilities" SeparatorImageUrl="~/Seperator.GIF"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/J1.aspx" Text="J1" Value="J1" SeparatorImageUrl="~/Seperator.GIF"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/J2.aspx" SeparatorImageUrl="~/Seperator.GIF" Text="J2" Value="J2"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/Mx.aspx" SeparatorImageUrl="~/Seperator.GIF" Text="M1/M2" Value="M1/M2"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/OIME.aspx" SeparatorImageUrl="~/Seperator.GIF" Text="OIME" Value="OIME"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/PTFE.aspx" SeparatorImageUrl="~/Seperator.GIF" Text="PTFE" Value="PTFE"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/N1.aspx" SeparatorImageUrl="~/Seperator.GIF" Text="N1" Value="N1"></asp:MenuItem> <asp:MenuItem SeparatorImageUrl="~/Seperator.GIF" Text="Environmental" Value="Environmental" PopOutImageUrl="~/Arrow.GIF" Selectable="False"> <asp:MenuItem NavigateUrl="~/TOXFuel.aspx" Text="U1 TOX Fuel Consumption" Value="U1 TOX Fuel Consumption"></asp:MenuItem> <asp:MenuItem NavigateUrl="~/OutfallToRiver.aspx" Text="Utilities Outfall to River" Value="Utilities Outfall to River"> </asp:MenuItem> <asp:MenuItem NavigateUrl="~/VCMMonitor.aspx" Text="Unidyne VCM Monitor" Value="Unidyne VCM Monitor"></asp:MenuItem> </asp:MenuItem> </Items> </asp:Menu> </div> </td> </tr> </table> <!-- ******************************************************************************************* Real-time table *********************************************************************************************--> <table style="margin-top: 5px; margin-bottom: 0px; background-color: White; width: 900px" border="0" cellpadding="0" cellspacing="0"> <!-- Header Row --> <tr> <td style="border: thin solid #C0C0C0; background-color: #5A8EC6; text-align: center" colspan="5"> <span style="font-size: large">J1 Current Production Rate and Inventories</span> - (As of <asp:Label ID="lblTimeStamp" runat="server" Text="lblTimeStamp"></asp:Label> ) </td> </tr> <!-- DPR and Inventory Headers --> <tr id="as" style="border: thin solid #c0c0c0"> <td align="center" style="border-style: solid; border-width: thin" rowspan="2"> <asp:Literal ID="litDPR" runat="server"></asp:Literal> </td> <td align="center" style="border-style: solid; border-width: thin; font-size: medium; font-weight: bold;" colspan="2"> J1 Finished Goods Inventory </td> <td align="center" style="border-style: solid; border-width: thin; font-size: medium; font-weight: bold;" colspan="2"> J1 Raw Materials </td> </tr> <!-- Inventories --> <tr id="dd" style="border: thin solid #c0c0c0"> <!-- R22 Inventory --> <td align="center" style="border-style: solid; border-width: thin; font-size: medium; font-weight: bold; padding: 5px 1px 5px 1px"> R22 Inventory <hr width="95%" /> <asp:Literal ID="litV411" runat="server"></asp:Literal> <asp:Literal ID="litV421" runat="server"></asp:Literal> </td> <!-- HCl Inventory --> <td align="center" style="border-style: solid; border-width: thin; font-size: medium; font-weight: bold; padding: 5px 1px 5px 1px"> HCl Inventory <hr width="95%" /> <asp:Literal ID="litV412" runat="server"></asp:Literal> <asp:Literal ID="litV422" runat="server"></asp:Literal> </td> <!-- HF Inventory --> <td align="center" style="border-style: solid; border-width: thin; font-size: medium; font-weight: bold; padding: 5px 1px 5px 1px"> HF Inventory <hr width="95%" /> <asp:Literal ID="litV011" runat="server"></asp:Literal> <asp:Literal ID="litV021" runat="server"></asp:Literal> </td> <!-- CHCl3 Inventory --> <td align="center" style="border-style: solid; border-width: thin; font-size: medium; font-weight: bold; padding: 5px 1px 5px 1px"> CHCl3 <hr width="95%" /> <asp:Literal ID="litV014" runat="server"></asp:Literal> </td> </tr> </table> <!-- ******************************************************************************************* Historical data table *********************************************************************************************--> <table style="width: 900px; margin-top: 5px; margin-bottom: 5px; background-color: White" border="0" cellpadding="0" cellspacing="0"> <!-- Header Row --> <tr> <td style="border: thin solid #C0C0C0; height: 8px; background-color: #5A8EC6; text-align: center; font-size: large" colspan="2"> J1 Historical Data </td> </tr> <!-- Month and Year Picker Row --> <tr> <td colspan="2" style="text-align: right; padding-bottom: 1"> <asp:DropDownList ID="ddMonth" runat="server"> </asp:DropDownList> <asp:DropDownList ID="ddYear" runat="server"> </asp:DropDownList> <asp:Button ID="Button1" runat="server" Text="Submit" /> </td> </tr> <tr> <!-- Production History --> <td align="center" style="border: thin solid #C0C0C0; padding: 5px 1px 5px 1px"> <h3> <asp:Label ID="lblProduction" runat="server" Text="lblProduction"></asp:Label> </h3> <asp:Literal ID="litProduction" runat="server"></asp:Literal> </td> <!-- Factors --> <td align="center" style="border: thin solid #C0C0C0; padding: 5px 1px 5px 1px"> <h3> <asp:Label ID="lblFactors" runat="server" Text="lblFactors"></asp:Label> </h3> <asp:Literal ID="litHFFact" runat="server"></asp:Literal> <br /> <asp:Literal ID="litCHCl3Fact" runat="server"></asp:Literal> <br /> <asp:Literal ID="litHClFact" runat="server"></asp:Literal> </td> </tr> <tr> <!-- Caustic Usage --> <td align="center" style="border: thin solid #C0C0C0; padding: 5px 1px 5px 1px"> <h3> <asp:Label ID="lblCaustic" runat="server" Text="lblCaustic"></asp:Label> </h3> <asp:Literal ID="litCaustic" runat="server"></asp:Literal> </td> <!-- Steam Usage --> <td align="center" style="border: thin solid #C0C0C0; padding: 5px 1px 5px 1px"> <h3> <asp:Label ID="lblSteam" runat="server" Text="lblSteam"></asp:Label> </h3> <asp:Literal ID="litSteam" runat="server"></asp:Literal> </td> </tr> </table> </center> </form> </body> </html> And here's the code-behind for the same page... Imports InfoSoftGlobal Imports System.Data.Odbc Partial Class J1Charts Inherits System.Web.UI.Page Dim MyConnection As OdbcConnection Dim MyConnectString As String Dim MyCommand As New OdbcCommand Dim MyQueryString As String Dim MyReader As OdbcDataReader Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load '*************************************************************************************** '*** Don't Cache the page '*************************************************************************************** Response.CacheControl = "no-cache" Response.AddHeader("Pragma", "no-cache") Response.Expires = -1 '*************************************************************************************** '*** Populate month and year pickers '*************************************************************************************** PopulateMonthYearPicker() '*************************************************************************************** '*** Establish Database connections '*************************************************************************************** MyConnectString = "DSN=J1J2 on GasQuantum;uid=********;pwd=********" MyConnection = New OdbcConnection(MyConnectString) MyConnection.Open() MyCommand.Connection = MyConnection '*************************************************************************************** '*** Create Charts '*************************************************************************************** litDPR.Text = J1CurrentDPR() litV411.Text = Vxxx("J1L4111", "J1L4111X", "V411") litV421.Text = Vxxx("J1L4211", "J1L4211X", "V421") litV412.Text = Vxxx("J1L4121", "J1L4121X", "V412") litV422.Text = Vxxx("J1L4221", "J1L4221X", "V422") litV011.Text = Vxxx("J1L0111", "J1W0111", "V011") litV021.Text = Vxxx("J1L0211", "J1W0211", "V021") litV014.Text = Vxxx("J1L0141", "J1L0141X", "V014") litProduction.Text = J1ProductionMonth() litHFFact.Text = J1HFFactMonth() litCHCl3Fact.Text = J1CHCL3FactMonth() litHClFact.Text = J1HCLFactMonth() litCaustic.Text = J1CausticMonth() litSteam.Text = J1SteamMonth() SharedFunctions.LogHit(Request.UserHostName, _ Page.ToString().Substring(4, Page.ToString().Substring(4).Length - 5) + ".aspx") End Sub Private Sub PopulateMonthYearPicker() '*************************************************************************************** '*** Populate Month Picker '*************************************************************************************** If ddMonth.Items.Count < 1 Then ddMonth.Items.Add("Jan") ddMonth.Items.Add("Feb") ddMonth.Items.Add("Mar") ddMonth.Items.Add("Apr") ddMonth.Items.Add("May") ddMonth.Items.Add("Jun") ddMonth.Items.Add("Jul") ddMonth.Items.Add("Aug") ddMonth.Items.Add("Sep") ddMonth.Items.Add("Oct") ddMonth.Items.Add("Nov") ddMonth.Items.Add("Dec") 'If (Month(Now) = 1) Then 'ddMonth.Items.Item(11).Selected = True 'Else ddMonth.Items.Item(Month(Now) - 1).Selected = True 'End If End If '*************************************************************************************** '*** Populate Year Picker '*************************************************************************************** If ddYear.Items.Count < 1 Then For i = Year(Now) To 2005 Step -1 ddYear.Items.Add(i) Next i ddYear.Items.Item(0).Selected = True End If End Sub Public Function J1ProductionMonth() As String Dim MyDay As New ArrayList() Dim MyDaily As New ArrayList() Dim MyTotal As Double Dim strXML As String Dim i As Integer lblProduction.Text = "J1 R22 Production, " & ddMonth.Text & " " & ddYear.Text '***************************************************************************************************************** '*** Query Database '***************************************************************************************************************** MyQueryString = "select dDate, J1F3034SUM from j1midnight where month(dDate)=" & (ddMonth.SelectedIndex + 1) & " and year(dDate)=" & ddYear.Text & " order by dDate" MyCommand.CommandText = MyQueryString MyReader = MyCommand.ExecuteReader() '***************************************************************************************************************** '*** Load Array from reader '***************************************************************************************************************** While MyReader.Read() MyDay.Add(MyReader("dDate")) MyDaily.Add(MyReader("J1F3034SUM")) End While MyReader.Close() '***************************************************************************************************************** '*** XML Header '***************************************************************************************************************** strXML = "" strXML = strXML & "<graph " strXML = strXML & "bgColor='ffffff' " strXML = strXML & "bgAlpha='100' " strXML = strXML & "PYAxisName='Daily Production' " strXML = strXML & "SYAxisName='Monthly Total' " strXML = strXML & "shownames='1' " strXML = strXML & "showvalues='0' " strXML = strXML & "showLegend='1' " strXML = strXML & "rotateNames='0' " strXML = strXML & "formatNumberScale='1' " strXML = strXML & "sFormatNumberScale='1' " strXML = strXML & "decimalPrecision='2' " strXML = strXML & "limitsDecimalPrecision='0' " strXML = strXML & "divLineDecimalPrecision='1' " strXML = strXML & "formatNumber='1' " strXML = strXML & "chartTopMargin='15' " strXML = strXML & "borderColor='ffffff' " strXML = strXML & "borderAlpha='100'" strXML = strXML & ">" '***************************************************************************************************************** '*** XML Cagatories '***************************************************************************************************************** strXML = strXML & "<categories>" For i = 1 To MyDay.Count strXML = strXML & "<category name='" & Day(MyDay(i - 1)) & "' hoverText='" & MyDay(i - 1) & "'/>" Next i strXML = strXML & "</categories>" '***************************************************************************************************************** '*** XML P-Series (Left Axis) '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='Daily Production' showValues='0' color='AFD8F8' parentYAxis='P'>" For i = 1 To MyDay.Count strXML = strXML & "<set value='" & MyDaily(i - 1) & "'/>" Next i strXML = strXML & "</dataset>" '***************************************************************************************************************** '*** XML S-Series (Right Axis) '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='Monthly Total' showValues='0' color='FF8000' anchorBorderColor='FF8000' parentYAxis='S' lineThickness='4'>" For i = 1 To MyDay.Count If IsDBNull(MyDaily(i - 1)) = False Then MyTotal = MyTotal + MyDaily(i - 1) End If strXML = strXML & "<set value='" & MyTotal & "'/>" Next i strXML = strXML & "</dataset>" 'strXML = strXML & "<dataset seriesname='Schedule' showValues='0' color='00ff00' anchorBorderColor='FF8000' parentYAxis='S' lineThickness='4'>" 'For i = 1 To MyDay.Count 'MyTarget = MyTarget + 150000 'strXML = strXML & "<set value='" & MyTarget & "'/>" 'Next i 'strXML = strXML & "</dataset>" strXML = strXML & "</graph>" Return FusionCharts.RenderChartHTML("../Charts/MSCombiDY2D.swf", "", strXML, "J1Prod1", "480", "200", False) End Function Public Function J1CurrentDPR() As String Dim strXML As String Dim dDPR As Double Dim dDPRSet As Double '***************************************************************************************************************** '*** Query Database '***************************************************************************************************************** MyQueryString = "select timestamp, J1F1011E, J1DPR from j1realtime" MyCommand.CommandText = MyQueryString MyReader = MyCommand.ExecuteReader() MyReader.Read() dDPR = MyReader("J1DPR") dDPRSet = MyReader("J1F1011E") lblTimeStamp.Text = MyReader("timestamp") MyReader.Close() '***************************************************************************************************************** '*** XML '***************************************************************************************************************** strXML = "" strXML = strXML & "<Chart" strXML = strXML & " bgColor='FFFFFF'" strXML = strXML & " borderColor='FFFFFF'" strXML = strXML & " bgAlpha='0'" strXML = strXML & " borderAlpha='0'" strXML = strXML & " fillAngle='90'" strXML = strXML & " upperLimit='200000'" strXML = strXML & " lowerLimit='0'" strXML = strXML & " majorTMNumber='10'" strXML = strXML & " majorTMHeight='8'" strXML = strXML & " showGaugeBorder='1'" strXML = strXML & " gaugeOuterRadius='75'" strXML = strXML & " gaugeOriginX='110'" strXML = strXML & " gaugeOriginY='130'" strXML = strXML & " gaugeInnerRadius='40'" strXML = strXML & " formatNumberScale='1'" strXML = strXML & " displayValueDistance='20'" strXML = strXML & " pivotRadius='3'" strXML = strXML & " showPivotBorder='1'" strXML = strXML & " pivotBorderColor='000000'" strXML = strXML & " pivotBorderThickness='3'" strXML = strXML & " pivotFillMix='FFFFFF,000000'>" strXML = strXML & "<colorRange>" strXML = strXML & "<color minValue='0' maxValue='80000' code='E48739' />" strXML = strXML & "<color minValue='80000' maxValue='185000' code='399E38' />" strXML = strXML & "<color minValue='185000' maxValue='200000' code='B41527' />" strXML = strXML & "</colorRange>" strXML = strXML & "<dials>" strXML = strXML & "<dial value='" & dDPRSet & "'" strXML = strXML & " toolText='DPR Setpoint " & dDPRSet & "'" strXML = strXML & " borderAlpha='0'" strXML = strXML & " bgColor='e87500'" strXML = strXML & " baseWidth='2'" strXML = strXML & " topWidth='1'" strXML = strXML & " radius='65' />" strXML = strXML & " <dial value='" & dDPR & "'" strXML = strXML & " toolText='Actual DPR " & Format(dDPR, "#,#") & "'" strXML = strXML & " borderAlpha='0'" strXML = strXML & " bgColor='000000'" strXML = strXML & " baseWidth='5'" strXML = strXML & " topWidth='1'" strXML = strXML & " radius='65' />" strXML = strXML & "</dials>" strXML = strXML & "<styles>" strXML = strXML & "<definition>" strXML = strXML & "<style type='font' name='myValueFont' size='10' />" strXML = strXML & "</definition>" strXML = strXML & "<application>" strXML = strXML & "<apply toObject='tickValues' styles='myValueFont' />" strXML = strXML & "</application>" strXML = strXML & "</styles>" strXML = strXML & "<annotations>" strXML = strXML & "<annotationGroup id='Grp1' >" strXML = strXML & "<annotation type='text' x='110' y='10' font='Verdana' bold='1' label='Current J1 Production Rate' fontsize='12' color='000000'/>" strXML = strXML & "<annotation type='text' x='110' y='150' font='Verdana' label='(" & Format(dDPR, "#,#") & " lbs per day)' fontsize='10' color='000000'/>" strXML = strXML & "</annotationGroup>" strXML = strXML & "</annotations>" strXML = strXML & "</Chart>" Return FusionCharts.RenderChartHTML("../Charts/AngularGauge.swf", "", strXML, "J1DPR", "230", "165", False) End Function Public Function Vxxx(ByVal sLevel As String, ByVal sWeight As String, ByVal sLabel As String) As String Dim strXML As String Dim tnkColor As String Dim tnkLevel As Double Dim tnkWeight As Integer '***************************************************************************************************************** '*** Query Database '***************************************************************************************************************** MyQueryString = "select " & sLevel & ", " & sWeight & " from j1realtime" MyCommand.CommandText = MyQueryString MyReader = MyCommand.ExecuteReader() MyReader.Read() tnkLevel = MyReader(sLevel) tnkWeight = MyReader(sWeight) * 100 MyReader.Close() If tnkLevel < 20 Or tnkLevel > 80 Then tnkColor = "ff0000" Else tnkColor = "00ff00" End If If tnkLevel < 0 Then tnkLevel = 0 '***************************************************************************************************************** '*** XML '***************************************************************************************************************** strXML = "" strXML = strXML & "<chart" strXML = strXML & " bgColor='FFFFFF'" strXML = strXML & " bgAlpha='0'" strXML = strXML & " borderColor='FFFFFF'" strXML = strXML & " borderAlpha='0'" strXML = strXML & " showTickMarks='1'" strXML = strXML & " showTickValues='1'" strXML = strXML & " showLimits='1'" strXML = strXML & " bgAlpha='100'" strXML = strXML & " lowerLimit='0'" strXML = strXML & " upperLimit='100'" strXML = strXML & " showTickMarks='0'" strXML = strXML & " showTickValues='0'" strXML = strXML & " showLimits='0'" strXML = strXML & " showValue='0'" strXML = strXML & " numberSuffix='%25'" strXML = strXML & " decimalPrecision='1'" strXML = strXML & " cylFillColor='" & tnkColor & "'" strXML = strXML & " baseFont='Verdana'" strXML = strXML & " baseFontSize='11'" strXML = strXML & " baseFontColor='000000'" strXML = strXML & " chartLeftMargin='6'" strXML = strXML & " chartRightMargin='4'" strXML = strXML & " chartTopMargin='15'" strXML = strXML & " chartBottomMargin='30'" strXML = strXML & " >" strXML = strXML & "<value>" & tnkLevel & "</value>" strXML = strXML & "<annotations>" strXML = strXML & "<annotationGroup showBelow='0'>" strXML = strXML & "<annotation type='text' x='34' y='84' font='Verdana' bold='1' label='" & Format(tnkLevel, "#,#.0") & " %25' fontsize='10' color='000000'/>" strXML = strXML & "<annotation type='text' x='32' y='5' font='Verdana' bold='1' label='" & sLabel & "' fontsize='12' color='000000'/>" strXML = strXML & "<annotation type='text' x='38' y='95' font='Verdana' label='" & Format(tnkWeight, "#,#") & " lbs' fontsize='10' color='000000'/>" strXML = strXML & "</annotationGroup>" strXML = strXML & "</annotations>" strXML = strXML & "</chart>" Return FusionCharts.RenderChartHTML("../Charts/Cylinder.swf", "", strXML, sLabel, "80", "100", False) End Function Public Function J1HFFactMonth() As String Dim MyDay As New ArrayList() Dim MyHF_R22 As New ArrayList() Dim strXML As String Dim i As Integer lblFactors.Text = "J1 R22 Production Factors, " & ddMonth.Text & " " & ddYear.Text '***************************************************************************************************************** '*** Query Database '***************************************************************************************************************** MyQueryString = "select dDate, HF_R22 from j1dayfactor where month(dDate)=" & (ddMonth.SelectedIndex + 1) & " and year(dDate)=" & ddYear.Text & " order by dDate" MyCommand.CommandText = MyQueryString MyReader = MyCommand.ExecuteReader() '***************************************************************************************************************** '*** Load Array from reader '***************************************************************************************************************** While MyReader.Read() MyDay.Add(MyReader("dDate")) MyHF_R22.Add(MyReader("HF_R22")) End While MyReader.Close() '***************************************************************************************************************** '*** XML graph header for MSCombiDY2D.swf '***************************************************************************************************************** strXML = "" strXML = strXML & "<graph " strXML = strXML & "YAxisMaxValue='.52' " ' strXML = strXML & "YAxisMinValue='.47' " ' strXML = strXML & "YAxisName='HF/R22' " ' Primary Y-Axis title. strXML = strXML & "showBorder='0' " ' 0/1 strXML = strXML & "borderColor='ffffff' " ' strXML = strXML & "borderThickness='0' " ' In Pixels strXML = strXML & "borderAlpha='100' " ' 0-100 strXML = strXML & "bgColor='ffffff' " ' strXML = strXML & "bgAlpha='100' " ' 0-100 strXML = strXML & "decimals='4' " ' 0-10 strXML = strXML & "forceDecimals='1' " ' 0-1 strXML = strXML & "setAdaptiveYMin='0' " strXML = strXML & "showLegend='0' " strXML = strXML & "chartTopMargin='0' " strXML = strXML & "chartBottomMargin='3' " strXML = strXML & "showLabels='0' " 'strXML = strXML & "caption='HF per R22' " strXML = strXML & "chartLeftMargin='5' " strXML = strXML & "chartRightMargin='5' " strXML = strXML & "showLimits='0' " strXML = strXML & ">" '***************************************************************************************************************** '*** XML Cagatories '***************************************************************************************************************** strXML = strXML & "<categories>" For i = 1 To MyDay.Count strXML = strXML & "<category name='" & Day(MyDay(i - 1)) & "' hoverText='" & MyDay(i - 1) & "'/>" Next i strXML = strXML & "</categories>" '***************************************************************************************************************** '*** XML P-Series (Left Axis) - HF per R22 Target '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='' showValues='0' color='ff0000' drawAnchors='0' lineThickness='1'>" For i = 1 To MyDay.Count strXML = strXML & "<set value='.4895'/>" Next i strXML = strXML & "</dataset>" '***************************************************************************************************************** '*** XML P-Series (Left Axis) - HF per R22 '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='HF per R22' showValues='0' color='AF45F8'>" For i = 1 To MyDay.Count If IsDBNull(MyHF_R22(i - 1)) = False Then If MyHF_R22(i - 1) < 0.47 Then strXML = strXML & "<set value='0.47'/>" ElseIf MyHF_R22(i - 1) > 0.52 Then strXML = strXML & "<set value='0.52'/>" Else strXML = strXML & "<set value='" & MyHF_R22(i - 1) & "'/>" End If Else If (i - 1) = 1 Then strXML = strXML & "<set value='.47'/>" Else strXML = strXML & "<set value=''/>" End If End If Next i strXML = strXML & "</dataset>" strXML = strXML & "<trendlines>" strXML = strXML & "<line startvalue='.4895' endValue='.52' color='ff0000' isTrendZone='1' showOnTop='0' alpha='30' valueOnRight='1' displayvalue=' ' />" strXML = strXML & "<line startvalue='.47' endValue='.4895' color='00ff00' isTrendZone='1' showOnTop='0' alpha='50' valueOnRight='1' displayvalue=' ' />" strXML = strXML & "</trendlines>" strXML = strXML & "<styles>" strXML = strXML & "<definition>" strXML = strXML & "<style name='Anim1' type='animation' param='_alpha' start='0' duration='1' /> " strXML = strXML & "</definition>" strXML = strXML & "<application>" strXML = strXML & " <apply toObject='TRENDLINES' styles='Anim1' /> " strXML = strXML & " </application>" strXML = strXML & " </styles>" strXML = strXML & "</graph>" Return FusionCharts.RenderChartHTML("../Charts/MSLine.swf", "", strXML, 3, "300", "60", False) End Function Public Function J1CHCL3FactMonth() As String Dim MyDay As New ArrayList() Dim MyCHCl3_R22 As New ArrayList() Dim strXML As String Dim i As Integer '***************************************************************************************************************** '*** Query Database '***************************************************************************************************************** MyQueryString = "select dDate, CHCl3_R22 from j1dayfactor where month(dDate)=" & (ddMonth.SelectedIndex + 1) & " and year(dDate)=" & ddYear.Text & " order by dDate" MyCommand.CommandText = MyQueryString MyReader = MyCommand.ExecuteReader() '***************************************************************************************************************** '*** Load Array from reader '***************************************************************************************************************** While MyReader.Read() MyDay.Add(MyReader("dDate")) MyCHCl3_R22.Add(MyReader("CHCl3_R22")) End While MyReader.Close() '***************************************************************************************************************** '*** XML graph header for MSCombiDY2D.swf '***************************************************************************************************************** strXML = "" strXML = strXML & "<graph " strXML = strXML & "YAxisMaxValue='1.6' " ' strXML = strXML & "YAxisMinValue='1.35' " ' strXML = strXML & "YAxisName='CHCl3/R22' " ' Primary Y-Axis title. strXML = strXML & "showBorder='0' " ' 0/1 strXML = strXML & "borderColor='ffffff' " ' strXML = strXML & "borderThickness='0' " ' In Pixels strXML = strXML & "borderAlpha='100' " ' 0-100 strXML = strXML & "bgColor='ffffff' " ' strXML = strXML & "bgAlpha='100' " ' 0-100 strXML = strXML & "decimals='4' " ' 0-10 strXML = strXML & "forceDecimals='1' " ' 0-1 strXML = strXML & "setAdaptiveYMin='0' " strXML = strXML & "showLegend='0' " strXML = strXML & "chartTopMargin='0' " strXML = strXML & "chartBottomMargin='3' " strXML = strXML & "chartLeftMargin='5' " strXML = strXML & "chartRightMargin='5' " strXML = strXML & "showLabels='0' " 'strXML = strXML & "caption='CHCl3 per R22' " strXML = strXML & "numDivLines='4' " strXML = strXML & "adjustDiv='0' " strXML = strXML & "showLimits='0' " strXML = strXML & ">" '***************************************************************************************************************** '*** XML Cagatories '***************************************************************************************************************** strXML = strXML & "<categories>" For i = 1 To MyDay.Count strXML = strXML & "<category name='" & Day(MyDay(i - 1)) & "' hoverText='" & MyDay(i - 1) & "'/>" Next i strXML = strXML & "</categories>" '***************************************************************************************************************** '*** XML P-Series (Left Axis) - CHCl3 per R22 Target '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='' showValues='0' color='ff0000' drawAnchors='0' lineThickness='1'>" For i = 1 To MyDay.Count strXML = strXML & "<set value='1.425'/>" Next i strXML = strXML & "</dataset>" '***************************************************************************************************************** '*** XML P-Series (Left Axis) - CHCl3 per R22 '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='CHCl3 per R22' showValues='0' color='445246'>" For i = 1 To MyDay.Count If IsDBNull(MyCHCl3_R22(i - 1)) = False Then If MyCHCl3_R22(i - 1) < 1.35 Then strXML = strXML & "<set value='1.35'/>" ElseIf MyCHCl3_R22(i - 1) > 1.6 Then strXML = strXML & "<set value='1.6'/>" Else strXML = strXML & "<set value='" & MyCHCl3_R22(i - 1) & "'/>" End If Else If (i - 1) = 1 Then strXML = strXML & "<set value='1.35'/>" Else strXML = strXML & "<set value=''/>" End If End If Next i strXML = strXML & "</dataset>" strXML = strXML & "<trendlines>" strXML = strXML & "<line startvalue='1.425' endValue='1.6' color='ff0000' isTrendZone='1' showOnTop='0' alpha='30' valueOnRight='1' displayvalue=' ' />" strXML = strXML & "<line startvalue='1.35' endValue='1.425' color='00ff00' isTrendZone='1' showOnTop='0' alpha='50' valueOnRight='1' displayvalue=' ' />" strXML = strXML & "</trendlines>" strXML = strXML & "<styles>" strXML = strXML & "<definition>" strXML = strXML & "<style name='Anim1' type='animation' param='_alpha' start='0' duration='1' /> " strXML = strXML & "</definition>" strXML = strXML & "<application>" strXML = strXML & " <apply toObject='TRENDLINES' styles='Anim1' /> " strXML = strXML & " </application>" strXML = strXML & " </styles>" strXML = strXML & "</graph>" Return FusionCharts.RenderChartHTML("../Charts/MSLine.swf", "", strXML, "J1CHCl3Fact", "300", "60", False) End Function Public Function J1HCLFactMonth() As String Dim MyDay As New ArrayList() Dim MyHCl_R22 As New ArrayList() Dim strXML As String Dim i As Integer '***************************************************************************************************************** '*** Query Database '***************************************************************************************************************** MyQueryString = "select dDate, HCl_R22 from j1dayfactor where month(dDate)=" & (ddMonth.SelectedIndex + 1) & " and year(dDate)=" & ddYear.Text & " order by dDate" MyCommand.CommandText = MyQueryString MyReader = MyCommand.ExecuteReader() '***************************************************************************************************************** '*** Load Array from reader '***************************************************************************************************************** While MyReader.Read() MyDay.Add(MyReader("dDate")) MyHCl_R22.Add(MyReader("HCl_R22")) End While MyReader.Close() '***************************************************************************************************************** '*** XML graph header for MSCombiDY2D.swf '***************************************************************************************************************** strXML = "" strXML = strXML & "<graph " strXML = strXML & "YAxisMaxValue='2.3' " ' strXML = strXML & "YAxisMinValue='1.7' " ' strXML = strXML & "YAxisName='HCl/R22' " ' Primary Y-Axis title. strXML = strXML & "showBorder='0' " ' 0/1 strXML = strXML & "borderColor='ffffff' " ' strXML = strXML & "borderThickness='0' " ' In Pixels strXML = strXML & "borderAlpha='100' " ' 0-100 strXML = strXML & "bgColor='ffffff' " ' strXML = strXML & "bgAlpha='100' " ' 0-100 strXML = strXML & "decimals='4' " ' 0-10 strXML = strXML & "forceDecimals='1' " ' 0-1 strXML = strXML & "setAdaptiveYMin='0' " strXML = strXML & "showLegend='0' " strXML = strXML & "chartTopMargin='0' " strXML = strXML & "chartBottomMargin='3' " strXML = strXML & "chartLeftMargin='5' " strXML = strXML & "chartRightMargin='5' " strXML = strXML & "showLabels='0' " 'strXML = strXML & "caption='HCl per R22' " strXML = strXML & "numDivLines='4' " strXML = strXML & "adjustDiv='0' " strXML = strXML & "showLimits='0' " strXML = strXML & ">" '***************************************************************************************************************** '*** XML Cagatories '***************************************************************************************************************** strXML = strXML & "<categories>" For i = 1 To MyDay.Count strXML = strXML & "<category name='" & Day(MyDay(i - 1)) & "' hoverText='" & MyDay(i - 1) & "'/>" Next i strXML = strXML & "</categories>" '***************************************************************************************************************** '*** XML P-Series (Left Axis) - HCl per R22 Target '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='' showValues='0' color='ff0000' drawAnchors='0' lineThickness='1'>" For i = 1 To MyDay.Count strXML = strXML & "<set value='2'/>" Next i strXML = strXML & "</dataset>" '***************************************************************************************************************** '*** XML P-Series (Left Axis) - HCl per R22 '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='HCl per R22' showValues='0' color='445246'>" For i = 1 To MyDay.Count If IsDBNull(MyHCl_R22(i - 1)) = False Then If MyHCl_R22(i - 1) < 1.7 Then strXML = strXML & "<set value='1.7'/>" ElseIf MyHCl_R22(i - 1) > 2.3 Then strXML = strXML & "<set value='2.3'/>" Else strXML = strXML & "<set value='" & MyHCl_R22(i - 1) & "'/>" End If Else If (i - 1) = 1 Then strXML = strXML & "<set value='1.7'/>" Else strXML = strXML & "<set value=''/>" End If End If Next i strXML = strXML & "</dataset>" strXML = strXML & "<trendlines>" strXML = strXML & "<line startvalue='2' endValue='2.3' color='00ff00' isTrendZone='1' showOnTop='0' alpha='50' valueOnRight='1' displayvalue=' ' />" strXML = strXML & "<line startvalue='1.7' endValue='2' color='ff0000' isTrendZone='1' showOnTop='0' alpha='30' valueOnRight='1' displayvalue=' ' />" strXML = strXML & "</trendlines>" strXML = strXML & "<styles>" strXML = strXML & "<definition>" strXML = strXML & "<style name='Anim1' type='animation' param='_alpha' start='0' duration='1' /> " strXML = strXML & "</definition>" strXML = strXML & "<application>" strXML = strXML & " <apply toObject='TRENDLINES' styles='Anim1' /> " strXML = strXML & " </application>" strXML = strXML & " </styles>" strXML = strXML & "</graph>" Return FusionCharts.RenderChartHTML("../Charts/MSLine.swf", "", strXML, "J1HClFact", "300", "60", False) End Function Public Function J1CausticMonth() As String Dim MyDay As New ArrayList() Dim MyV505 As New ArrayList() Dim MyF5071 As New ArrayList() Dim strXML As String Dim i As Integer lblCaustic.Text = "J1 Caustic Consumption, " & ddMonth.Text & " " & ddYear.Text '***************************************************************************************************************** '*** Query Database '***************************************************************************************************************** MyQueryString = "select dDate, J1F5071SUM, V505LbsUsed from j1midnight where month(dDate)=" & (ddMonth.SelectedIndex + 1) & " and year(dDate)=" & ddYear.Text & " order by dDate" MyCommand.CommandText = MyQueryString MyReader = MyCommand.ExecuteReader() '***************************************************************************************************************** '*** Load Array from reader '***************************************************************************************************************** While MyReader.Read() MyDay.Add(MyReader("dDate")) MyF5071.Add(MyReader("J1F5071SUM")) MyV505.Add(MyReader("V505LbsUsed")) End While MyReader.Close() '***************************************************************************************************************** '*** XML Header '***************************************************************************************************************** strXML = "" strXML = strXML & "<graph bgColor='ffffff' " strXML = strXML & "bgAlpha='100' " strXML = strXML & "YAxisName='Lbs Caustic Used' " strXML = strXML & "shownames='1' " strXML = strXML & "showvalues='0' " strXML = strXML & "showLegend='1' " strXML = strXML & "rotateNames='0' " strXML = strXML & "formatNumberScale='1' " strXML = strXML & "decimalPrecision='2' " strXML = strXML & "limitsDecimalPrecision='0' " strXML = strXML & "divLineDecimalPrecision='1' " strXML = strXML & "formatNumber='1' " strXML = strXML & "chartTopMargin='15' " strXML = strXML & "borderColor='ffffff' " strXML = strXML & "YAxisMaxValue='0' " ' 'strXML = strXML & "YAxisMinValue='500' " ' strXML = strXML & "chartTopMargin='0' " strXML = strXML & "chartBottomMargin='3' " strXML = strXML & "chartLeftMargin='5' " strXML = strXML & "chartRightMargin='5' " strXML = strXML & "borderAlpha='100'>" '***************************************************************************************************************** '*** XML Cagatories '***************************************************************************************************************** strXML = strXML & "<categories>" For i = 1 To MyDay.Count strXML = strXML & "<category name='" & Day(MyDay(i - 1)) & "' hoverText='" & MyDay(i - 1) & "'/>" Next i strXML = strXML & "</categories>" '***************************************************************************************************************** '*** XML P-Series (Left Axis) - V505 Caustic Used '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='V505 lbs used' showValues='0' color='9999ff'>" For i = 1 To MyDay.Count If IsDBNull(MyV505(i - 1)) = False Then If MyV505(i - 1) < 0 Then strXML = strXML & "<set value='0'/>" Else strXML = strXML & "<set value='" & MyV505(i - 1) & "'/>" End If Else If (i - 1) = 1 Then strXML = strXML & "<set value='0'/>" Else strXML = strXML & "<set value=''/>" End If End If Next i strXML = strXML & "</dataset>" '***************************************************************************************************************** '*** XML P-Series (Left Axis) - F5071 Caustic Used '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='T507 lbs used' showValues='0' color='339966'>" For i = 1 To MyDay.Count If IsDBNull(MyF5071(i - 1)) = False Then If MyF5071(i - 1) < 0 Then strXML = strXML & "<set value='0'/>" Else strXML = strXML & "<set value='" & MyF5071(i - 1) / 10 & "'/>" End If Else If (i - 1) = 1 Then strXML = strXML & "<set value='0'/>" Else strXML = strXML & "<set value=''/>" End If End If Next i strXML = strXML & "</dataset>" strXML = strXML & "</graph>" Return FusionCharts.RenderChartHTML("../Charts/MSLine.swf", "", strXML, "J1Caustic", "390", "150", False) End Function Public Function J1SteamMonth() As String Dim MyDay As New ArrayList() Dim MySteam As New ArrayList() Dim strXML As String Dim i As Integer lblSteam.Text = "J1 Steam Consumption, " & ddMonth.Text & " " & ddYear.Text '***************************************************************************************************************** '*** Query Database '***************************************************************************************************************** MyQueryString = "select dDate, J1F5001SUM from j1midnight where month(dDate)=" & (ddMonth.SelectedIndex + 1) & " and year(dDate)=" & ddYear.Text & " order by dDate" MyCommand.CommandText = MyQueryString MyReader = MyCommand.ExecuteReader() '***************************************************************************************************************** '*** Load Array from reader '***************************************************************************************************************** While MyReader.Read() MyDay.Add(MyReader("dDate")) MySteam.Add(MyReader("J1F5001SUM")) End While MyReader.Close() '***************************************************************************************************************** '*** XML Header '***************************************************************************************************************** strXML = "" strXML = strXML & "<graph bgColor='ffffff' " strXML = strXML & "bgAlpha='100' " strXML = strXML & "YAxisName='Lbs Steam Used' " strXML = strXML & "shownames='1' " strXML = strXML & "showvalues='0' " strXML = strXML & "showLegend='1' " strXML = strXML & "rotateNames='0' " strXML = strXML & "formatNumberScale='1' " strXML = strXML & "decimalPrecision='2' " strXML = strXML & "limitsDecimalPrecision='0' " strXML = strXML & "divLineDecimalPrecision='1' " strXML = strXML & "formatNumber='1' " strXML = strXML & "chartTopMargin='15' " strXML = strXML & "borderColor='ffffff' " strXML = strXML & "YAxisMaxValue='0' " ' 'strXML = strXML & "YAxisMinValue='500' " ' strXML = strXML & "chartTopMargin='0' " strXML = strXML & "chartBottomMargin='3' " strXML = strXML & "chartLeftMargin='5' " strXML = strXML & "chartRightMargin='20' " strXML = strXML & "borderAlpha='100'>" '***************************************************************************************************************** '*** XML Cagatories '***************************************************************************************************************** strXML = strXML & "<categories>" For i = 1 To MyDay.Count strXML = strXML & "<category name='" & Day(MyDay(i - 1)) & "' hoverText='" & MyDay(i - 1) & "'/>" Next i strXML = strXML & "</categories>" '***************************************************************************************************************** '*** XML P-Series (Left Axis) - Steam Used '***************************************************************************************************************** strXML = strXML & "<dataset seriesname='Steam lbs used' showValues='0' color='ff0000'>" For i = 1 To MyDay.Count If IsDBNull(MySteam(i - 1)) = False Then If MySteam(i - 1) < 0 Then strXML = strXML & "<set value='0'/>" Else strXML = strXML & "<set value='" & MySteam(i - 1) & "'/>" End If Else If (i - 1) = 1 Then strXML = strXML & "<set value='0'/>" Else strXML = strXML & "<set value=''/>" End If End If Next i strXML = strXML & "</dataset>" strXML = strXML & "</graph>" Return FusionCharts.RenderChartHTML("../Charts/MSLine.swf", "", strXML, "J1Steam", "395", "150", False) End Function Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit 'Not sure what this does but it makes the menu work with the Chrome browser If (Request.UserAgent.IndexOf("AppleWebKit") > 0) Then Request.Browser.Adapters.Clear() End If End Sub End Class
  3. I've build several webpages that have multiple charts. They all work perfectly in IE but only one of the charts on each page will render in Chrome. If I repeatedly refresh the page a different chart MAY render or it might be the same one. Which chart renders seems to be random but never more than one will be displayed. I've uninstalled/reinstalled Chrome & Flash. Any ideas?
  4. How to Integrate Excel and Fusion Charts

    You can do it by using VBA inside of Excel to generate and pass the XML to the chart. Maybe someone will suggest an easier method (but I don't think so...)
  5. My development machine has a Dell UltraSharp monitor the the cylinder looks good, like transparent glass. When I viewed the chart on other computers in the office I thought the cylinder was missing. I finally figured out that if you look really carefully you can see a hint of the cylinder. I can't find anything the documentation that allows you to change the cylinders alpha or color... is there any way of doing this without having to change my background colors???
  6. Adding callouts to a chart

    Sometimes I need to add a note to a chart concerning a piece of data. Is there a way to add a callout pointing to a data point on a chart?