Jump to content
Software FX Community

Use of "Constant Line"


User (Legacy)

Recommended Posts

Here is more of my code to help out:

set ChartFX2 = Server.CreateObject("ChartFX.WebServer")

if Session("CRecType") = "D" then 'show a 2 series chart

ChartFX2.OpenDataEx 1,2,11

else

ChartFX2.OpenDataEx 1,1,11 'else just show state data

end if

if Session("CRecType") <> "SC" then

ChartFX2.Series(0).YValue(0) = sw_r_prof_rate

ChartFX2.Series(0).YValue(1) = s_b_r_prof_rate

ChartFX2.Series(0).YValue(2) = s_a_r_prof_rate

ChartFX2.Series(0).YValue(3) = s_i_r_prof_rate

ChartFX2.Series(0).YValue(4) = s_h_r_prof_rate

ChartFX2.Series(0).YValue(5) = s_w_r_prof_rate

ChartFX2.Series(0).YValue(6) = s_s_r_prof_rate

ChartFX2.Series(0).YValue(7) = s_l_r_prof_rate

ChartFX2.Series(0).YValue(8) = s_e_r_prof_rate

ChartFX2.Series(0).YValue(9) = "65"

ChartFX2.Series(0).YValue(10) = "100"

ChartFX2.ConstantLine(0).Value = 65

if Session("CRecType") = "S" or Session("CRecType") = "" then

ChartFX2.MultipleColors = True

ChartFX2.OpenDataEx 3, 11, 1

ChartFX2.Color(0) = RGB(255,0,255)

ChartFX2.Color(1) = RGB(0,0,128)

ChartFX2.Color(2) = RGB(0,128,128)

ChartFX2.Color(3) = RGB(0,0,255)

ChartFX2.Color(4) = RGB(128,128,128)

ChartFX2.Color(5) = RGB(128,128,0)

ChartFX2.Color(6) = RGB(250,0,0)

ChartFX2.Color(7) = RGB(0,250,0)

ChartFX2.Color(8) = RGB(250,250,0)

ChartFX2.Color(9) = RGB(100,0,0)

ChartFX2.Color(10) = RGB(0,128,0)

ChartFX2.CloseData 3

end if

end if

Link to comment
Share on other sites

The correct way to set constant lines (from the docs) is:

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.ConstantLine(1).Value = 8

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

ChartFX1.ConstantLine(1).Axis = AXIS_X

ChartFX1.ConstantLine(1).Label = "Limit 2"

ChartFX1.ConstantLine(1).LineWidth = 3

ChartFX1.CloseData COD_CONSTANTS

Notice that there is an OpenDataEx call where you specify how many constant lines you want.

--

FP

Software FX

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...