Jump to content
Software FX Community
User (Legacy)

Type mismatch: 'Series(...).YValue'

Recommended Posts

I've got a chart that displays as one series depending on a variable setting, or as a 2 series chart.  When I switch between the 2 via a radio button, I get this error message: Type mismatch: 'Series(...).YValue'.  Clicking Refresh on my browser clears the error.  My code is below.  Any ideas how I can not get this error every time?  The bolded text is where the error occurs.  Like I mentioned, I click Refresh and it's then ok.  I thought it had something to do with the CloseData command, but it doesn't seem to matter where that statement is included.

if Session("CRecType") = "D" then

ChartFX2b.OpenDataEx 1,2,9

else

ChartFX2b.OpenDataEx 1,1,9

end if

if not rsSt.eof then

ChartFX2b.Series(0).YValue(0) = sw_l_prof_rate

ChartFX2b.Series(0).YValue(1) = s_b_l_prof_rate

ChartFX2b.Series(0).YValue(2) = s_a_l_prof_rate

ChartFX2b.Series(0).YValue(3) = s_i_l_prof_rate

ChartFX2b.Series(0).YValue(4) = s_h_l_prof_rate

ChartFX2b.Series(0).YValue(5) = s_w_l_prof_rate

ChartFX2b.Series(0).YValue(6) = s_s_l_prof_rate

ChartFX2b.Series(0).YValue(7) = s_l_l_prof_rate

ChartFX2b.Series(0).YValue(8) = s_e_l_prof_rate

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

ChartFX2b.CloseData 1

ChartFX2b.MultipleColors = True

ChartFX2b.OpenDataEx 3,9,1

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

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

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

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

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

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

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

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

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

end if

end if

if Session("CRecType") = "D" then

ChartFX2b.Series(1).YValue(0) = d_l_prof_rate

ChartFX2b.Series(1).YValue(1) = d_b_l_prof_rate

ChartFX2b.Series(1).YValue(2) = d_a_l_prof_rate

ChartFX2b.Series(1).YValue(3) = d_i_l_prof_rate

ChartFX2b.Series(1).YValue(4) = d_h_l_prof_rate

ChartFX2b.Series(1).YValue(5) = d_w_l_prof_rate

ChartFX2b.Series(1).YValue(6) = d_s_l_prof_rate

ChartFX2b.Series(1).YValue(7) = d_l_l_prof_rate

ChartFX2b.Series(1).YValue(8) = d_e_l_prof_rate

ChartFX2b.TypeMask = &H6880502&

ChartFX2b.Style = &HF76FFFF8&

else

ChartFX2b.SerLegBox = false

end if

ChartFX2b.CloseData 1

ChartFX2b.CloseData 3

Share this post


Link to post
Share on other sites

I've also tried this and it still errors on the bolded line:

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

ChartFX2.OpenDataEx 1,1,11

if not rsSt.eof 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.CloseData 1

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.SerLegBox = false

ChartFX2.CloseData 3

end if

else

ChartFX2.OpenDataEx 1,2,11

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

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

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

ChartFX2.Series(1).YValue(1) = d_b_r_prof_rate

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

ChartFX2.Series(1).YValue(2) = d_a_r_prof_rate

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

ChartFX2.Series(1).YValue(3) = d_i_r_prof_rate

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

ChartFX2.Series(1).YValue(4) = d_h_r_prof_rate

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

ChartFX2.Series(1).YValue(5) = d_w_r_prof_rate

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

ChartFX2.Series(1).YValue(6) = d_s_r_prof_rate

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

ChartFX2.Series(1).YValue(7) = d_l_r_prof_rate

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

ChartFX2.Series(1).YValue(8) = d_e_r_prof_rate

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

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

ChartFX2.TypeMask = &H6880502&

ChartFX2.Style = &HF76FFFF8&

ChartFX2.CloseData 1

ChartFX2.serleg(0)="State"

ChartFX2.serleg(1)="District"

ChartFX2.SerLegBox = true

end if

Share this post


Link to post
Share on other sites

 

Hey Hello Friends, Have you got answers to above problem, i am also getting the same problem.

We have Classic ASP application and we are using ChartFx, the previous version was working fine but recently we have upgraded CharFx to 6.2 version and getting Chart1.Series(x).Yvalue(y) error to this statement.

 

Any help would be greatly appreciated.

Thanks

Share this post


Link to post
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.

Loading...

×
×
  • Create New...