Jump to content
Software FX Community

Time values in an XY chart


User (Legacy)

Recommended Posts

I'm trying to reproduce a 5.5 time-series ASP sample (named "Time values in

an XY chart") using 6.2. The chart is generated, but notice the

include-file error message below the chart image. Following the error

message is my ASP code.

Also I'm unable to get the AcitveX control to download (however the PNG

option works fine).

Thank you,

Jim

Microsoft VBScript runtime error '800a0411'

Name redefined: 'HighlightData_None'

/ChartFXInt62/Include/ChartFX.ASP.Core.inc, line 127

=================My code=========================

Sub GenSampleDateChart

Dim cfxChart2

'Instantiate chart

Set cfxChart2 = Server.CreateObject("ChartFX.ASP.Server")

cfxChart2.Chart3D = FALSE

cfxChart2.Gallery = Gallery_lines

' Background colors

cfxChart2.SerLegBoxObj.BackColor = RGB(204,204,204)

cfxChart2.BackColor = RGB(204,204,204)

cfxChart2.InsideColor = RGB(230,250,230)

' hard-coded data using a fixed date and different times

' if the data was in a database you would generate a SQL statement that

' returns the data for an specific day

cfxChart2.OpenData COD_VALUES,1,3

cfxChart2.OpenData COD_XVALUES,1,3

Dim dDate

dDate = DateSerial(1999,10,15)

cfxChart2.XValue(0,0) = dDate + TimeSerial(8,5,10)

cfxChart2.Value(0,0) = 100

cfxChart2.XValue(0,1) = dDate + TimeSerial(11,23,32)

cfxChart2.Value(0,1) = 105.5

cfxChart2.XValue(0,2) = dDate + TimeSerial(16,09,00)

cfxChart2.Value(0,2) = 103.25

cfxChart2.CloseData COD_XVALUES

cfxChart2.CloseData COD_VALUES

Dim XAxis

Set XAxis = cfxChart2.AxisX

' Make sure the min and max are set with the specified date and the

required

XAxis.Min = dDate + TimeSerial(7,30,0)

XAxis.Max = dDate + TimeSerial(16,30,0)

' Set MinorStep to 30 minutes and Step to an hour

XAxis.MinorStep = TimeSerial(10,30,0) - TimeSerial(10,0,0)

XAxis.Step = TimeSerial(11,0,0) - TimeSerial(10,0,0)

' Set Display Format

XAxis.LabelsFormat.Format = AxisFormat_Time

XAxis.LabelsFormat.CustomFormat = "hh:mm tt"

'Add some specification for jpeg image dimensions if a Max or Unix

'box requests a chart.

cfxChart2.ImgWidth = 980

cfxChart2.ImgHeight = 515

'Write out the html that references the chart image on the server.

'Response.Write( cfxChart2.GetHtmlTag("100%","95%","ActiveX"))

Response.Write( cfxChart2.GetHtmlTag("100%","95%"))

End Sub

Link to comment
Share on other sites

I'm trying to reproduce a 5.5 time-series ASP sample (named "Time values in

an XY chart") using 6.2. The chart is generated, but notice the

include-file error message below the chart image. Following the error

message is my ASP code.

Also I'm unable to get the AcitveX control to download (however the PNG

option works fine).

Thank you,

Jim

Microsoft VBScript runtime error '800a0411'

Name redefined: 'HighlightData_None'

/ChartFXInt62/Include/ChartFX.ASP.Core.inc, line 127

=================My code=========================

Sub GenSampleDateChart

Dim cfxChart2

'Instantiate chart

Set cfxChart2 = Server.CreateObject("ChartFX.ASP.Server")

cfxChart2.Chart3D = FALSE

cfxChart2.Gallery = Gallery_lines

' Background colors

cfxChart2.SerLegBoxObj.BackColor = RGB(204,204,204)

cfxChart2.BackColor = RGB(204,204,204)

cfxChart2.InsideColor = RGB(230,250,230)

' hard-coded data using a fixed date and different times

' if the data was in a database you would generate a SQL statement that

' returns the data for an specific day

cfxChart2.OpenData COD_VALUES,1,3

cfxChart2.OpenData COD_XVALUES,1,3

Dim dDate

dDate = DateSerial(1999,10,15)

cfxChart2.XValue(0,0) = dDate + TimeSerial(8,5,10)

cfxChart2.Value(0,0) = 100

cfxChart2.XValue(0,1) = dDate + TimeSerial(11,23,32)

cfxChart2.Value(0,1) = 105.5

cfxChart2.XValue(0,2) = dDate + TimeSerial(16,09,00)

cfxChart2.Value(0,2) = 103.25

cfxChart2.CloseData COD_XVALUES

cfxChart2.CloseData COD_VALUES

Dim XAxis

Set XAxis = cfxChart2.AxisX

' Make sure the min and max are set with the specified date and the

required

XAxis.Min = dDate + TimeSerial(7,30,0)

XAxis.Max = dDate + TimeSerial(16,30,0)

' Set MinorStep to 30 minutes and Step to an hour

XAxis.MinorStep = TimeSerial(10,30,0) - TimeSerial(10,0,0)

XAxis.Step = TimeSerial(11,0,0) - TimeSerial(10,0,0)

' Set Display Format

XAxis.LabelsFormat.Format = AxisFormat_Time

XAxis.LabelsFormat.CustomFormat = "hh:mm tt"

'Add some specification for jpeg image dimensions if a Max or Unix

'box requests a chart.

cfxChart2.ImgWidth = 980

cfxChart2.ImgHeight = 515

'Write out the html that references the chart image on the server.

'Response.Write( cfxChart2.GetHtmlTag("100%","95%","ActiveX"))

Response.Write( cfxChart2.GetHtmlTag("100%","95%"))

End Sub

Link to comment
Share on other sites

I should add that the second problem (ActiveX control) has been resolved.

My URLscan was blocking the extension types associated with the ActiveX

control.

Jim

"Jim Miller" <james.miller@pnl.gov> wrote in message

news:frFRQ6ScFHA.3436@webserver3.softwarefx.com...

> I'm trying to reproduce a 5.5 time-series ASP sample (named "Time values

in

> an XY chart") using 6.2. The chart is generated, but notice the

> include-file error message below the chart image. Following the error

> message is my ASP code.

>

> Also I'm unable to get the AcitveX control to download (however the PNG

> option works fine).

>

> Thank you,

>

> Jim

>

>

>

> Microsoft VBScript runtime error '800a0411'

>

> Name redefined: 'HighlightData_None'

>

> /ChartFXInt62/Include/ChartFX.ASP.Core.inc, line 127

>

>

>

> =================My code=========================

>

> Sub GenSampleDateChart

>

> Dim cfxChart2

>

> 'Instantiate chart

> Set cfxChart2 = Server.CreateObject("ChartFX.ASP.Server")

>

> cfxChart2.Chart3D = FALSE

> cfxChart2.Gallery = Gallery_lines

>

> ' Background colors

> cfxChart2.SerLegBoxObj.BackColor = RGB(204,204,204)

> cfxChart2.BackColor = RGB(204,204,204)

> cfxChart2.InsideColor = RGB(230,250,230)

>

> ' hard-coded data using a fixed date and different times

> ' if the data was in a database you would generate a SQL statement that

> ' returns the data for an specific day

> cfxChart2.OpenData COD_VALUES,1,3

> cfxChart2.OpenData COD_XVALUES,1,3

>

> Dim dDate

> dDate = DateSerial(1999,10,15)

> cfxChart2.XValue(0,0) = dDate + TimeSerial(8,5,10)

> cfxChart2.Value(0,0) = 100

> cfxChart2.XValue(0,1) = dDate + TimeSerial(11,23,32)

> cfxChart2.Value(0,1) = 105.5

> cfxChart2.XValue(0,2) = dDate + TimeSerial(16,09,00)

> cfxChart2.Value(0,2) = 103.25

>

> cfxChart2.CloseData COD_XVALUES

> cfxChart2.CloseData COD_VALUES

>

> Dim XAxis

> Set XAxis = cfxChart2.AxisX

> ' Make sure the min and max are set with the specified date and the

> required

> XAxis.Min = dDate + TimeSerial(7,30,0)

> XAxis.Max = dDate + TimeSerial(16,30,0)

>

> ' Set MinorStep to 30 minutes and Step to an hour

> XAxis.MinorStep = TimeSerial(10,30,0) - TimeSerial(10,0,0)

> XAxis.Step = TimeSerial(11,0,0) - TimeSerial(10,0,0)

>

> ' Set Display Format

> XAxis.LabelsFormat.Format = AxisFormat_Time

> XAxis.LabelsFormat.CustomFormat = "hh:mm tt"

>

> 'Add some specification for jpeg image dimensions if a Max or Unix

> 'box requests a chart.

> cfxChart2.ImgWidth = 980

> cfxChart2.ImgHeight = 515

>

> 'Write out the html that references the chart image on the server.

> 'Response.Write( cfxChart2.GetHtmlTag("100%","95%","ActiveX"))

> Response.Write( cfxChart2.GetHtmlTag("100%","95%"))

>

> End Sub

>

>

>

>

>

>

>

Link to comment
Share on other sites

I should add that the second problem (ActiveX control) has been resolved.

My URLscan was blocking the extension types associated with the ActiveX

control.

Jim

"Jim Miller" <james.miller@pnl.gov> wrote in message

news:frFRQ6ScFHA.3436@webserver3.softwarefx.com...

> I'm trying to reproduce a 5.5 time-series ASP sample (named "Time values

in

> an XY chart") using 6.2. The chart is generated, but notice the

> include-file error message below the chart image. Following the error

> message is my ASP code.

>

> Also I'm unable to get the AcitveX control to download (however the PNG

> option works fine).

>

> Thank you,

>

> Jim

>

>

>

> Microsoft VBScript runtime error '800a0411'

>

> Name redefined: 'HighlightData_None'

>

> /ChartFXInt62/Include/ChartFX.ASP.Core.inc, line 127

>

>

>

> =================My code=========================

>

> Sub GenSampleDateChart

>

> Dim cfxChart2

>

> 'Instantiate chart

> Set cfxChart2 = Server.CreateObject("ChartFX.ASP.Server")

>

> cfxChart2.Chart3D = FALSE

> cfxChart2.Gallery = Gallery_lines

>

> ' Background colors

> cfxChart2.SerLegBoxObj.BackColor = RGB(204,204,204)

> cfxChart2.BackColor = RGB(204,204,204)

> cfxChart2.InsideColor = RGB(230,250,230)

>

> ' hard-coded data using a fixed date and different times

> ' if the data was in a database you would generate a SQL statement that

> ' returns the data for an specific day

> cfxChart2.OpenData COD_VALUES,1,3

> cfxChart2.OpenData COD_XVALUES,1,3

>

> Dim dDate

> dDate = DateSerial(1999,10,15)

> cfxChart2.XValue(0,0) = dDate + TimeSerial(8,5,10)

> cfxChart2.Value(0,0) = 100

> cfxChart2.XValue(0,1) = dDate + TimeSerial(11,23,32)

> cfxChart2.Value(0,1) = 105.5

> cfxChart2.XValue(0,2) = dDate + TimeSerial(16,09,00)

> cfxChart2.Value(0,2) = 103.25

>

> cfxChart2.CloseData COD_XVALUES

> cfxChart2.CloseData COD_VALUES

>

> Dim XAxis

> Set XAxis = cfxChart2.AxisX

> ' Make sure the min and max are set with the specified date and the

> required

> XAxis.Min = dDate + TimeSerial(7,30,0)

> XAxis.Max = dDate + TimeSerial(16,30,0)

>

> ' Set MinorStep to 30 minutes and Step to an hour

> XAxis.MinorStep = TimeSerial(10,30,0) - TimeSerial(10,0,0)

> XAxis.Step = TimeSerial(11,0,0) - TimeSerial(10,0,0)

>

> ' Set Display Format

> XAxis.LabelsFormat.Format = AxisFormat_Time

> XAxis.LabelsFormat.CustomFormat = "hh:mm tt"

>

> 'Add some specification for jpeg image dimensions if a Max or Unix

> 'box requests a chart.

> cfxChart2.ImgWidth = 980

> cfxChart2.ImgHeight = 515

>

> 'Write out the html that references the chart image on the server.

> 'Response.Write( cfxChart2.GetHtmlTag("100%","95%","ActiveX"))

> Response.Write( cfxChart2.GetHtmlTag("100%","95%"))

>

> End Sub

>

>

>

>

>

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...