????? ??????? ???? ?????? Charting ??? ????? ?????? ???? ????

?????? ????????? ?????? ?????????
???? ???????: 244049 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

???????? ??? ??????? ???? ??? ????? Microsoft Office ????? ???? ???? ???? ???? (COM) ??? ????????? ??? ?????, ?? ?????? ??????? "???? ??? ???????" ????? ??? ????, ?? ???????. ???? ??? ?????? ??? ????? ??????? "???? ??? ???????" ??? ???? ?????? ????? ????? ?? ???? ????? ????? ?????? (GIF). ????? ????? ?????????? ??? ???????? ?? ??? ?????? ????? ????? ????? ???? ???? ????????? ??? ???????? ?? ?? ???????? ?? ???? ?????? ?????? ??? ?????????.

??????? ????

???????? "?????? ??? ???????" ????? ????? ???????? ???????? ?????? ?? ????? ?????? ??? ????? ?? ????? ?????? ?? ????? ???????? ?? ?? ????? ???????? ???????. ????? ????? ????? ????? ??????? ExportPicture ????? "???? ???????" ?????? ???? GIF ??? ??????.

?????? ???? ????? ????? ????? ' global.asa ?????? ??? ???? ASP ?? ??? ?? ???? ?? ??????? ???????.

??????? ??????? ?????? ???????

  1. ??? ????? Microsoft Visual InterDev.
  2. ????? "????? ???" ???? ???? ServerChart ?? ???? ??? ???? ' ?????? '.
  3. ??? ?? ?????? ???? ??? ??????? ????? ??? ??? ???????.
  4. ???? ??? "?????" ?????? "????? ?????".
  5. ???? ??? ?????? ?????? ??? ????? ??????? ??? ?????? (???????? ??? ?? C:\Inetpub\wwwroot\ServerChart) ? ??? ????? ?? ???? ??? ????? ??????? ????.
  6. ???? ??? ?????? ?????? ?????? ?????? ??????:
    IUSR_SERVERNAME: ????? ? ????? ? ????? ? ???
    ????: ????? ? ????? ? ????? ? ???
  7. ???? ??? ????? ?????? ????????.
  8. ?? ????? Visual InterDev ???? ??? ?????? ?????? ??? ????? global.asa ???? ????? ??? ?????.
  9. ????? ????? ' global.asa ' ?? ????? ???????? ????? ??????:
    <SCRIPT LANGUAGE=VBScript RUNAT=Server>
    
    Sub Session_OnStart
    	' Create a FileSystemObject to provide files in the script
    	Set Session("FSO") = CreateObject("Scripting.FileSystemObject")
    	
    	' Create a variable that has the number of files created in this session
    	Session("n") = 0
    	
    	' Set timeout to be 1 minute
    	Session.Timeout = 1
    End Sub
    
    Sub Session_OnEnd
    	' Delete the files created in this session
    	Dim x
    	For x = 0 to Session("n")-1
    		Session("FSO").DeleteFile Session("sTempFile" & x), True
    	Next
    End Sub
    </SCRIPT>
  10. ???? ??? ??????? ??????? ???? ????? ???? ??? ?? ??? ???? ?????? ??????. ??? ???? chart.asp.
  11. ?? ?????? ???????? ????? ?? chart.asp ????? ??? ?? ???:
    <%@ language="vbscript" %>
    <html>
    <body>
    <h1>Realtime CPU Utilization by Configurations</h1>
    
    <FORM action="chart.asp" method=get name=frmChooseOrg>
    
    <p> Select an Organization to see values for their machines: 
    
    <SELECT name=sOrg>
    <OPTION SELECTED value= 5>Org1</OPTION>
    <OPTION value= 10>Org2</OPTION>
    <OPTION value= 15>Org3</OPTION>
    
    <OPTION value= 20>Org4</OPTION>
    </SELECT>
    
    <INPUT type="submit" value="Go"></p>
    
    </FORM>
    
    <%
    
    Dim oChart, c, Categories(5), Vals(5), i, sCaption, nData, nOrg
    
    ' Get the input value
    nData = Request.QueryString("sOrg")
    
    'When the page loads the first time, set ndata to 5
    if len(nData) = 0 then nData = 5
    
    ' Generate random categories and values for the chart
    ' These values can come from some existing data source
    for i = 1 to 5
    	Categories(i) = "Machine" & CStr(i)
    	Vals(i) = nData * Rnd(100)
    next
    
    ' Create a Chart Object
    Set oChart = CreateObject("OWC.Chart")
    Set c = oChart.Constants
    
    ' Set the different parameters for the ChartSpace
    oChart.Border.Color = c.chColorNone
    
    ' Get Organization number and use it to set the Caption
    nOrg = nData/5
    sCaption = "Current Utilizations for Org"
    sCaption = sCaption & CStr(nOrg)
    
    ' Add a chart and set parameters for the chart
    oChart.Charts.Add
    oChart.Charts(0).Type = oChart.Constants.chChartTypeColumnClustered
    oChart.Charts(0).SeriesCollection.Add
    oChart.Charts(0).SeriesCollection(0).Caption = sCaption
    oChart.Charts(0).SeriesCollection(0).SetData c.chDimCategories, c.chDataLiteral, Categories
    oChart.Charts(0).SeriesCollection(0).SetData c.chDimValues, c.chDataLiteral, Vals
    oChart.Charts(0).HasLegend = True
    oChart.Charts(0).HasTitle = True
    
    ' Get a temporary filename to save chart in that file
    sFname = Session("FSO").GetTempName & session.SessionID & ".gif"
    
    ' Export the chart to the temporary file
    oChart.ExportPicture server.MapPath(sFname), "gif", 600, 512
    
    ' Create a link to the generated file
    Response.Write "<img src='" & sFname & "'>"
    
    ' Store the file with its path in the session object for cleanup
    Session("sTempFile" & Session("n")) = Server.MapPath(sFname)
    
    ' Increment the number of files
    Session("n") = Session("n") + 1
    
    %>
    
    </body>
    </html>
    					
  12. ??? ???????.
  13. ???? ??? ?????? ?????? ??? chart.asp ?? ?????? ???????? ?? ??? ??? ?? ??????.
???? ?????? ?? ???? ???? ????? ??? utilizations CPU ?????? ????????? ????????. ?????? ???????? ?????? ????? ??? utilizations ??????.

??? ????? ??????? ?????? ????? ??? ??????? ?????? ?? ???????? ??? ?? ??? ??? ?? ???? ???? GIF ?????. ?? ??? ?????? FileSystemObject ????? ??? ????? ??????? ?????? ?????? ??? ???? ????? GIF. ??? ??? ????? ?? ??? ?????? ??? ???? ASP ???? ????? ??????? ??????? MapPath ?? ?????? Session ?????? ??? ???? ????? ??????. ??? ??? ??? ????? ??????? ???? ??? ???? ??? ????? ??? ?????? ???? ?????.

???? ?? IIS ????? ????? ???? Session_OnEnd ???? ????? ???? ???? ?????. ????? ???? ???? ????? ??? ?? ??? ?????? ???? ???? ??? ?????? ???? ??? ?????? ??? ???? (1) ????? ?? ????? ???? ?????.

??????? ??????

??????? ??? ??????? ??????? ???????? ??? ??????? ExportPicture ??? "GIF".

????? ??????? ??? ExportPicture ????????? ???? ???? ?? ???? ??? ??????? ??????? ?????? ???? ?? ??????. ?? ????? ????????? ???????? ???????? ? ????? ???????? ?????? ?????? ???????. ????? ?? ???? ????? ??????? ??????? ???? ???? ??????.

OWC.Chart ProgID ????? 9.0 ?????? ??? ?? Office. ??? ??? ???? ?? ??????? ??????? 10 ???????? ?? ?????? ProgID ?? OWC.Chart OWC10.ChartSpace ?? ??? ??? ???? ??????? ??????? 11 ?? ???????? ????? ProgID ?? OWC.Chart ??? OWC11.ChartSpace.

????? ??????? ???? ??????

??? ???? ?? ???? ?????? ??? ?? Office 2000 ??? ????? ????????? ?? ???? ?????? ? ?? ????? ?????? ??? ??? ?????? ???????? ??? ???? ?? ??? ???? ?? ????????? ????????? ????????. ?????? ?? ??? ??????? ??? ???????? ?? Office XP Web Components ? Office 2003 Web Components ??? ??? ??????? Office XP Web Components ?? Office 2003 Web Components ?????? ??? ?????? ?? ???? ?????? ?????.

?????? ??? ??????? ??????? ???? ??? ??? ??????? ????? ?????? ?? "????? ??????? ?? Microsoft:
317316INFO: ?????? ????? ??? ?????? ????? ?? Office 2000 ??? ????????? ???? ??????

?????

????? Microsoft Office Web Components ?????? Dave Stearns ISBN: 0-7356-0794-X

?????? ??? ??????? ?????? ??? ??????? "????" ???? ??? ???? ?????? "????? ???????" ???????:
240263????? ????? ???? ??????? ?? ?????? ??? ???????
235885????? ??????? ???? Office Web Component ?? VB
243192????? ??????? VBScript ??? ??? ???? ??? ???? ???? ????????

???????

???? ???????: 244049 - ????? ??? ??????: 04/???/1428 - ??????: 3.5
????? ???
  • Microsoft Office 2003 Web Components
  • Microsoft Office XP Web Components
  • Microsoft Office Chart Component 9.0
????? ??????: 
kbmt kbhowto kbofficewebchart KB244049 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????244049

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com