Jump to content
Software FX Community

Constant Line (ASP)


User (Legacy)

Recommended Posts

Posted

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

Posted

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

>

>

Archived

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

×
×
  • Create New...