User (Legacy) Posted May 15, 2006 Author Report Share Posted May 15, 2006 This code (VBScript) makes my program crash. If I change it to only create 3 series instead of 4 it does not crash. Did I not read the document correctly? (I have also sent this to SoftwareFX support, but I thought someone in the community might have an idea.) chart.ClearData 67108864 chart.ToolBar = true chart.Gallery = 1 chart.SerLegBox = true chart.SerLegBoxObj.Alignment = 1 chart.SerLegBoxObj.Docked = 515 dim hidden hidden = chart.Hidden dim titles titles = Array("Series A","Series B", "Series C", "Series D") dim numRows numRows = 11 dim numSeries numSeries = 4 dim s dim r dim idx for s = 0 to numSeries - 1 idx = 0 chart.Series(s).Legend = titles(s) if s=0 then chart.Series(s).YAxis = 0 elseif s=1 then chart.Series(s).YAxis = 1 elseif s > 1 then chart.Series(s).YAxis = s+1 end if next chart.OpenData 1, numSeries, numRows chart.OpenData 6, numSeries, numRows chart.CloseData 1 chart.CloseData 6 Link to comment Share on other sites More sharing options...
User (Legacy) Posted May 15, 2006 Report Share Posted May 15, 2006 This code (VBScript) makes my program crash. If I change it to only create 3 series instead of 4 it does not crash. Did I not read the document correctly? (I have also sent this to SoftwareFX support, but I thought someone in the community might have an idea.) chart.ClearData 67108864 chart.ToolBar = true chart.Gallery = 1 chart.SerLegBox = true chart.SerLegBoxObj.Alignment = 1 chart.SerLegBoxObj.Docked = 515 dim hidden hidden = chart.Hidden dim titles titles = Array("Series A","Series B", "Series C", "Series D") dim numRows numRows = 11 dim numSeries numSeries = 4 dim s dim r dim idx for s = 0 to numSeries - 1 idx = 0 chart.Series(s).Legend = titles(s) if s=0 then chart.Series(s).YAxis = 0 elseif s=1 then chart.Series(s).YAxis = 1 elseif s > 1 then chart.Series(s).YAxis = s+1 end if next chart.OpenData 1, numSeries, numRows chart.OpenData 6, numSeries, numRows chart.CloseData 1 chart.CloseData 6 Link to comment Share on other sites More sharing options...
Software FX Posted May 16, 2006 Report Share Posted May 16, 2006 You need to add the third axis to the Axis collection (chart.Axis). By default only 2 y-axis exist in this collection. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Software FX Posted May 16, 2006 Report Share Posted May 16, 2006 You need to add the third axis to the Axis collection (chart.Axis). By default only 2 y-axis exist in this collection. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.