shankarnalla Posted February 23, 2009 Report Share Posted February 23, 2009 Hi, Following code is written using chartfx 6.2. I need to convert this code to make it work with chartfx 7. Can some one please help me how to make it. 'setting Xaxis Dim arr_xvalues1 As Double() = {1, 2, 3, 4, 5, 6} Dim arr_xvalues2 As Double() = {7, 8, 9} Dim arr_xvalues3 As Double() = {10, 11, 12} Chrt_CePjTd.AxisX.LabelAngle = 0 Chrt_CePjTd.AxisX.Staggered = True Dim xSect As AxisSection xSect = New AxisSection() Chrt_CePjTd.AxisX.Sections.Add(xSect) xSect.From = 1 xSect.To = 6 xSect.TextColor = System.Drawing.Color.FromArgb(192, 0, 0) ''dark red xSect = New AxisSection() Chrt_CePjTd.AxisX.Sections.Add(xSect) xSect.From = 7 xSect.To = 9 xSect.TextColor = System.Drawing.Color.FromArgb(81, 121, 214) ''blue xSect = New AxisSection() Chrt_CePjTd.AxisX.Sections.Add(xSect) xSect.From = 10 xSect.To = 12 xSect.TextColor = System.Drawing.Color.FromArgb(77, 153, 77) ''green 'Setting UserLegendBox for Xaxis by giving the whole string Chrt_CePjTd.UserLegendBox = True Chrt_CePjTd.UserLegendBoxObj.Docked = SoftwareFX.ChartFX.Docked.Bottom Chrt_CePjTd.UserLegendBoxObj.Alignment = SoftwareFX.ChartFX.ToolAlignment.Spread Chrt_CePjTd.UserLegendBoxObj.Height = 200 Chrt_CePjTd.UserLegendBoxObj.Item(0).Label = ERTSCONSTANTS.USER_LEGEND.INTIAL Chrt_CePjTd.UserLegendBoxObj.Item(0).Color = Color.FromArgb(192, 0, 0) ''dark red Chrt_CePjTd.UserLegendBoxObj.Item(1).Label = ERTSCONSTANTS.USER_LEGEND.SCOPE Chrt_CePjTd.UserLegendBoxObj.Item(1).Color = Color.FromArgb(192, 0, 0) ''dark red Chrt_CePjTd.UserLegendBoxObj.Item(2).Label = ERTSCONSTANTS.USER_LEGEND.PHASE1 Chrt_CePjTd.UserLegendBoxObj.Item(2).Color = Color.FromArgb(192, 0, 0) ''dark red Chrt_CePjTd.UserLegendBoxObj.Item(3).Label = ERTSCONSTANTS.USER_LEGEND.PHASE2 Chrt_CePjTd.UserLegendBoxObj.Item(3).Color = Color.FromArgb(192, 0, 0) ''dark red Chrt_CePjTd.UserLegendBoxObj.Item(4).Label = ERTSCONSTANTS.USER_LEGEND.PHASE3 Chrt_CePjTd.UserLegendBoxObj.Item(4).Color = Color.FromArgb(192, 0, 0) ''dark red Chrt_CePjTd.UserLegendBoxObj.Item(5).Label = ERTSCONSTANTS.USER_LEGEND.PHASE4 Chrt_CePjTd.UserLegendBoxObj.Item(5).Color = Color.FromArgb(192, 0, 0) ''dark red Chrt_CePjTd.UserLegendBoxObj.Item(6).MarkerShape = MarkerShape.None Chrt_CePjTd.UserLegendBoxObj.Item(7).MarkerShape = MarkerShape.None Chrt_CePjTd.UserLegendBoxObj.Item(8).Label = ERTSCONSTANTS.USER_LEGEND.ORIGINAL Chrt_CePjTd.UserLegendBoxObj.Item(8).Color = Color.FromArgb(81, 121, 214) ''blue Chrt_CePjTd.UserLegendBoxObj.Item(9).Label = ERTSCONSTANTS.USER_LEGEND.AUTHORIZATION Chrt_CePjTd.UserLegendBoxObj.Item(9).Color = Color.FromArgb(81, 121, 214) ''blue Chrt_CePjTd.UserLegendBoxObj.Item(10).Label = ERTSCONSTANTS.USER_LEGEND.ADOPTED Chrt_CePjTd.UserLegendBoxObj.Item(10).Color = Color.FromArgb(81, 121, 214) ''blue Chrt_CePjTd.UserLegendBoxObj.Item(11).MarkerShape = MarkerShape.None Chrt_CePjTd.UserLegendBoxObj.Item(12).MarkerShape = MarkerShape.None Chrt_CePjTd.UserLegendBoxObj.Item(13).MarkerShape = MarkerShape.None Chrt_CePjTd.UserLegendBoxObj.Item(14).Label = ERTSCONSTANTS.USER_LEGEND.OFFICIAL Chrt_CePjTd.UserLegendBoxObj.Item(14).Color = Color.FromArgb(77, 153, 77) ''green Chrt_CePjTd.UserLegendBoxObj.Item(15).Label = ERTSCONSTANTS.USER_LEGEND.AWARDED Chrt_CePjTd.UserLegendBoxObj.Item(15).Color = Color.FromArgb(77, 153, 77) ''green Chrt_CePjTd.UserLegendBoxObj.Item(16).Label = ERTSCONSTANTS.USER_LEGEND.FINAL Chrt_CePjTd.UserLegendBoxObj.Item(16).Color = Color.FromArgb(77, 153, 77) ''green Quote Link to comment Share on other sites More sharing options...
divyesh29 Posted February 24, 2009 Report Share Posted February 24, 2009 hi Have u tried general steps given in chartFX 7 help.....u can find it on following link: http://support.softwarefx.com/Article.aspx?KBID=7501011&Product=&Embed=0 if u r not using chart component at design time (u r generating chart dynamicaly) then just ignore step nos 4,5, 6 and 9. try this, it may work for u!!! Thanks, Regards, Divyesh Maniyar Mcube. Quote Link to comment Share on other sites More sharing options...
shankarnalla Posted February 24, 2009 Author Report Share Posted February 24, 2009 Hi Divyesh,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> Thanks for your reply.It didn't work for me because chartfx6.2 is not installed on my machine. The code I published in my earlier request is creating multiple legends in the graph, how can I create multiple legends using chartFX 7. Thanks in advance. <?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /> 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.