Jump to content
Software FX Community

Re: Web Interface - Random XY Line graph...


Software FX
 Share

Recommended Posts

Sorry, wrong newsgroups.This belong to ChartFX Client Server. Thanks.

"Jon Olson" <Jon_N_Olson@yahoo.com> wrote in message

news:j7mtrv4aAHA.2444@sfxserver.softwarefx.com...

> I am tring to create a graph on a web page. I have downloaded the demo of

> ChartFX 2000. I have a chart working with the following code, but it uses

> the date/time values I have as a legend and NOT as data points. I need

them

> as data points because the times are not the same for all of the different

> series. This is written in VB Script. (code at the bottom)

>

> Any Ideas?

>

> Thanks,

>

> Jon

>

> ******************************

> Jon Olson jon_n_olson@yahoo.com

>

>

> sub btnShowValues_OnClick()

>

> 'IMASreturn2 is a ActiveX DLL that I wrote

> set IMASreturn2 = Server.CreateObject("vbIMAS.vbIMASClass")

>

> Const nMax = 10

>

> Dim Values() 'Returns Data Values

> Dim tStamp() 'Returns Time Stamp for value

>

> StartTime = "2/1/1999 12:00:00 PM"

> StopTime = "1/1/2000 12:00:00 PM"

>

> 'lstSelectedTags is a listbox on a web page

> listcount = lstSelectedTags.getCount() -1

>

> Set ChartFX1 = Server.CreateObject("ChartFX.WebServer")

>

> 'Use the CreateObject function to reference the Chart FX Data Provider

> Set CfxArray = Server.CreateObject("CfxData.Array")

>

> 'Preform this loop on all labels in a list box

> For i = 0 to listcount

> 'Set TAGName = to what is in the list

> TAGName = lstSelectedTags.getText(i)

> nResult = IMASreturn2.GetTagData(TAGName, StartTime, StopTime, nMax,

> Values, tStamp)

>

> 'Add the Values and tStamp arrays to the data provider

> CfxArray.AddArray Values

> CfxArray.AddArray tStamp

> next

>

> 'Let Chart FX take the information from the data provider

> ChartFX1.GetExternalData CfxArray

>

> 'Make all of the series a LINE graph

> for c = 0 to ChartFX1.Series.Count - 1

> ChartFX1.SeriesĀ©.Gallery = 1

> next

>

> 'Display the Series Count

> Response.write "SERIES COUNT: " & ChartFX1.Series.Count & "<BR>"

>

> 'Set Chart as 2D

> ChartFX1.Chart3D = false

>

> 'Create the Chart

> Response.Write ChartFX1.GetHtmlTag("100%","50%")

>

> End sub

>

>

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...