Jump to content
Software FX Community

Constant Line (ASP)


User (Legacy)
 Share

Recommended Posts

I get an error with this code, while trying to get a constant line.

Set Chart1 = Server.CreateObject("ChartFX.WebServer")

rst.MoveFirst

Chart1.AdoResultset rst

Set rst = Nothing

Chart1.DataType(0) = CDT_VALUE

Chart1.DataType(1) = CDT_NOTUSED

Chart1.DataType(2) = CDT_VALUE

Chart1.TypeMask = &H2880402&

Chart1.Volume = 100

' Title Settings

Chart1.Title(2) = "Normal Histogram"

' Axis Settings

Chart1.Axis(2).LabelAngle = 45

' Font Settings

Chart1.Axis(2).Font.Name = "Arial"

Chart1.Axis(2).Font.Weight = 700

Chart1.Axis(2).Font.Size = 10

' Color Settings

Chart1.Palette = "Electric Fire"

''Setting constant line

ChartFX1.OpenDataEX COD_CONSTANTS,2,0

ChartFX1.ConstantLine(0).Value = 30

ChartFX1.ConstantLine(0).LineColor = RGB(255,0,0)

ChartFX1.ConstantLine(0).Axis = AXIS_Y

ChartFX1.ConstantLine(0).Label = "Alarm Limit 1"

ChartFX1.ConstantLine(0).LineWidth = 2

ChartFX1.CloseData COD_CONSTANTS

Link to comment
Share on other sites

I get an error while trying to plot a constant line.

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

> rst.MoveFirst

> Chart1.AdoResultset rst

> Set rst = Nothing

> Chart1.DataType(0) = CDT_VALUE

> Chart1.DataType(1) = CDT_NOTUSED

> Chart1.DataType(2) = CDT_VALUE

> Chart1.TypeMask = &H2880402&

> Chart1.Volume = 100

> ' Title Settings

> Chart1.Title(2) = "Normal Histogram"

> ' Axis Settings

> Chart1.Axis(2).LabelAngle = 45

> ' Font Settings

> Chart1.Axis(2).Font.Name = "Arial"

> Chart1.Axis(2).Font.Weight = 700

> Chart1.Axis(2).Font.Size = 10

> ' Color Settings

> Chart1.Palette = "Electric Fire"

>

> ''Setting constant line

>

>

> Chart1.OpenDataEX COD_CONSTANTS,2,0

>

> Chart1.ConstantLine(0).Value = 30

> Chart1.ConstantLine(0).LineColor = RGB(255,0,0)

> Chart1.ConstantLine(0).Axis = AXIS_Y

> Chart1.ConstantLine(0).Label = "Alarm Limit 1"

> Chart1.ConstantLine(0).LineWidth = 2

>

>

> Chart1.CloseData COD_CONSTANTS

"Gregory Mendez" <gregmendez@yahoo.com> wrote in message

news:wGbbPBx$CHA.3020@webserver1.softwarefx.com...

> I get an error with this code, while trying to get a constant line.

>

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

> rst.MoveFirst

> Chart1.AdoResultset rst

> Set rst = Nothing

> Chart1.DataType(0) = CDT_VALUE

> Chart1.DataType(1) = CDT_NOTUSED

> Chart1.DataType(2) = CDT_VALUE

> Chart1.TypeMask = &H2880402&

> Chart1.Volume = 100

> ' Title Settings

> Chart1.Title(2) = "Normal Histogram"

> ' Axis Settings

> Chart1.Axis(2).LabelAngle = 45

> ' Font Settings

> Chart1.Axis(2).Font.Name = "Arial"

> Chart1.Axis(2).Font.Weight = 700

> Chart1.Axis(2).Font.Size = 10

> ' Color Settings

> Chart1.Palette = "Electric Fire"

>

> ''Setting constant line

>

>

> ChartFX1.OpenDataEX COD_CONSTANTS,2,0

>

> ChartFX1.ConstantLine(0).Value = 30

> ChartFX1.ConstantLine(0).LineColor = RGB(255,0,0)

> ChartFX1.ConstantLine(0).Axis = AXIS_Y

> ChartFX1.ConstantLine(0).Label = "Alarm Limit 1"

> ChartFX1.ConstantLine(0).LineWidth = 2

>

>

> ChartFX1.CloseData COD_CONSTANTS

>

>

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