Jump to content
Software FX Community

Chartfx with multiple chart types


Software FX
 Share

Recommended Posts

I am not sure as to the exact reason why this is failing for you.  It could be due to the fact that in your code you are setting the gallery to line and not lines.  If this is misspelled and you have not set option explicit then this will be interpreted as zero which does not exist.  The other problem may be that you are not including our include file and none of the constants are defined causing a crash.  I have attached a sample that grabs data from an access database and will have series 0 - 2 being plotted for the hilowclose gallery and the last two series being plotted for bar and line chart types.

<!-- #include virtual="/Include/CfxIE.inc" -->

<%

Set chart = Server.CreateObject("ChartFX.WebServer.4")

' Create the database connection object

Set Conn = Server.CreateObject("ADODB.Connection")

' Open the ODBC data source

Conn.Open ("db5")

' Execute the SQL statement that will return the data

Set RS = Conn.Execute("SELECT * from table1")

' Assign the contents of the ResultSet to the Chart

chart.AdoResultset RS

chart.gallery = hilowclose

chart.series(3).gallery = bar

chart.series(4).gallery = lines

chart.chart3d = false

' Close the connection

Conn.Close

%>

<%=chart.GetHtmlTag("75%", "75%", "Auto")%>

Justin Trask

Software FX

-----Original Message-----

From: Boris Drobowski [ mailto:bdrobowski@hotmail.com]

Posted At: Saturday, July 29, 2000 7:49 AM

Posted To: General

Conversation: ChartFX IE: HLC, Ado and multitype graph problem

Subject: Re: ChartFX IE: HLC, Ado and multitype graph problem

Sorry about the double post... I hit "send" by mistake... now to the

problem:

I've been trying the ChartFX IE trial version with ASP and ADO. I'm plotting

HLC and OHLC charts using my dataset.

When I try to chart a mutlitype graph, it wont work with ADO directly, I

have to loop manually and insert the data into ChartFX. My code is as

follows (simplified):

the SQL statement:

strSQL = "SELECT Date, High, Close, Low, Volume, Comparison FROM table

WHERE.... "

rsChart1.Open strSql, "DSN=dbChartData;"

Chart1.Gallery = 9

Chart1.OpenDataEx COD_VALUES, 5, 1

Chart1.CloseData COD_VALUES

Chart1.OpenDataEx COD_COLORS, 5, 0

Chart1.Color(HLC_LOW) = colChart ' Low

Chart1.Color(HLC_HIGH) = colChart ' High

Chart1.Color(HLC_CLOSE) = colChart ' Close

Chart1.Series(3).Gallery = BAR

Chart1.Series(4).Gallery = LINE

Chart1.OpenDataEx COD_COLORS, 5, 0

Chart1.AdoResultSet rsChart1

This fails miserably. Only one line plots, (Series 4, I think), and when I

try to use the ActiveX chart to view the data, IE5 crashes.

The simple HLC works fine, though, using the select statement as:

strSQL = "SELECT Date, High, Close, Low FROM table WHERE.... "

and similar code to above to define the chart.

Any help would be greatly appreciated

Thanks

Boris D.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...