User (Legacy) Posted April 8, 2004 Report Share Posted April 8, 2004 Hello, I'm on v5.5 and am trying to insert a Constant Line using this syntax: ChartFX2.ConstantLine(0).Value = 65 When I go to run my page, I get an 'unknown runtime error' at this line..any ideas? Thanks! Quote Link to comment Share on other sites More sharing options...
User (Legacy) Posted April 8, 2004 Author Report Share Posted April 8, 2004 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 Quote Link to comment Share on other sites More sharing options...
Software FX Posted April 8, 2004 Report Share Posted April 8, 2004 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.