52 users online (0 members and 52 guests)  


  Results 1 to 2 of 2

Related

  1. Control panels.    Forum: Web Hosting Forum
    Replies: 6
  2. Replies: 1
  3. circular chart within html...???    Forum: HTML Forum
    Replies: 3
  1. #1
    jimmyusa's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    1

    Question Control chart Y lable value

    Hi friends,
    I created a chart on the web by VBScript.
    From original point. It display as 0. 1, 1, 2, 2, 3, 3, 4, 4, ..
    It duplicated Y lable value? How to cut off this duplicated Y lable value?
    I try to change chDimSeriesNames to 1,2 but it does not working.
    Thanks for any help!!!
    Thanks for your any help!!
    Jim

    **source codes
    Code:
    <%@ Language=VBScript %>
    <HTML>
    <head><title>calls chart example</title></head>
    <STRONG><CENTER>Calls Per Day </CENTER></STRONG>
    
    <BODY>
    <object id=ChartSpace1 classid=CLSID:0002E500-0000-0000-C000-000000000046 style="width:100%;height:480"></object>
    <object id=Spreadsheet1 classid=CLSID:0002E510-0000-0000-C000-000000000046 style="width:100%;height:480"></object>
    
    <script language=vbs>
    Sub Window_OnLoad()
    
    class
    Dim oSheet
    Set oSheet = Spreadsheet1.ActiveSheet
    oSheet.Cells.Clear
    oSheet.Range("A2:A10").Value = Array("6/6/2005","6/7/2005","6/8/2005","6/9/2005","6/10/2005","6/11/2005","6/12/2005","6/13/2005","6/14/2005") ' x catalog label
    oSheet.Range("B1:B10").Value = Array("OBC", 0.3,0.07, 0.1,0.4,0.08,0.2,0.2,0.5,2.5)  ' for  value on chart
    
    Dim oChart
    ChartSpace1.Clear
    Set oChart = ChartSpace1.Charts.Add
    
    ' Set the Spreadsheet component as the data source for the chart
    ChartSpace1.DataSource = Spreadsheet1
    
    dim c
    set c = ChartSpace1.Constants
    
    'Add the data to the chart and set the series names
    dim oSeries
    
    for i=1 to 1
       Set oSeries = oChart.SeriesCollection.Add
       oSeries.SetData c.chDimValues, 0, oSheet.Range(oSheet.Cells(2,2), oSheet.Cells(10,2)).Address
    oSeries.SetData c.chDimSeriesNames, 0, oSheet.Cells(1,1).Address
    next
    
    oChart.SetData c.chDimCategories, 0, "a2:a10"
    
    oChart.Axes(c.chAxisPositionLeft).NumberFormat = "0"
    oChart.Axes(c.chAxisPositionLeft).MajorUnit = 0.5
    
    End Sub
    </script>
    
    
    </BODY>
    </HTML>
    ****

  2. #2
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: Control chart Y lable value

    argh.... i know i can help you out, but i cant read VBS considdering my first language was VB6 i would think i could help out, but i just cant read that code. could you tell me the variable that keeps coming up with the wrong data? i am guessing the problem is in the loop, correct?



Tags for this Thread