|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
想法是和程序员的想法不一样的.至于为什么.大家去想一想.跟心理学有关的k线图 终究弄定了,方才我犯了一个极为初级的毛病,真想给本人一个大嘴巴。
<%@ Language=VBScript %>
<%
Response.Buffer=true
Response.Expires = 0
Response.ExpiresAbsolute = now() - 1
Response.AddHeader "cache-control","private"
Response.AddHeader "pragma","no-cache"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Chart Example</title>
</head>
<body>
<table width=100% border=0 cellspacing=0 cellpadding=0>
<tr>
<td><font face=verdana,arial size=2 color=blue>Chart Example</font></td>
</tr>
<tr>
<td width=60% collspan=2> <object id=ChartSpace1 classid=CLSID:0002E500-0000-0000-C000-000000000046
style="width:100%;height:350">
<embed>
</embed>
</object>
<script language=vbs>
Sub Window_OnLoad()
Dim categories(4)
Dim valuesopen(4),valuesclose(4),valueshigh(4),valueslow(4)
' Create an array of strings representing the categories.
categories(0) = "15/03/2000"
categories(1) = "16/03/2000"
categories(2) = "17/03/2000"
categories(3) = "18/03/2000"
' Clear the contents of the chart workspace. This removes
' any old charts that may already exist and leaves the chart workspace
' completely empty. One chart object is then added.
ChartSpace1.Clear
ChartSpace1.Charts.Add
Set c = ChartSpace1.Constants
ChartSpace1.Charts(0).Type = c.chChartTypeStockOHLC
' Add one serie to the chart.'
ChartSpace1.Charts(0).SeriesCollection.Add
ReDim values(4,4)
valuesopen(0) = 10
valuesopen(1) = 18
valuesopen(2) = 9
valuesopen(3) = 16
valuesclose(0) = 16
valuesclose(1) = 21
valuesclose(2) = 11
valuesclose(3) = 17
valueshigh(0) = 17
valueshigh(1) = 29
valueshigh(2) = 16
valueshigh(3) = 16
valueslow(0) = 9
valueslow(1) =15
valueslow(2) = 9
valueslow(3) = 11
ChartSpace1.Charts(0).SeriesCollection(0).Caption = "Ativo X"
ChartSpace1.Charts(0).SeriesCollection(0).SetData c.chDimCategories, c.chDataLiteral, categories
ChartSpace1.Charts(0).SeriesCollection(0).SetData c.chDimOpenValues, c.chDataLiteral, valuesopen
ChartSpace1.Charts(0).SeriesCollection(0).SetData c.chDimHighValues, c.chDataLiteral, valueshigh
ChartSpace1.Charts(0).SeriesCollection(0).SetData c.chDimLowValues, c.chDataLiteral, valueslow
ChartSpace1.Charts(0).SeriesCollection(0).SetData c.chDimCloseValues, c.chDataLiteral, valuesclose
' Make the chart legend visible, format the left value axis as percentage,
' and specify that value gridlines are at 10% intervals.
ChartSpace1.Charts(0).HasLegend = True
ChartSpace1.Charts(0).Axes(c.chAxisPositionLeft).MajorUnit = 1
End Sub
</script>
</td>
<td width=40%><font face=verdana,arial size=1 color=blue>This is a small
Chart Example</font></td>
</tr>
</table>
</body>
</html>
</p> 缺点:正版成本价格贵(盗版就不说了)、不够安全,大多数服务器用windows系统,没有linux安全 |
|