SamiAbdallah Posted June 4, 2007 Report Share Posted June 4, 2007 Hi How can I set the "from & to" in chart.AxisX.Sections.Add(new AxisSection(from,to,color)); when the x-axis labels are text (string) not numbers using chartfx 7 for vs2005 Thanks Sami Quote Link to comment Share on other sites More sharing options...
JuanC Posted June 4, 2007 Report Share Posted June 4, 2007 If your X axis is categorical (you did not supply any numbers but just labels), then from and to will be numbers where 1 is the first label in the X axis. Note that if you say chart1.AxisX.Sections.Add(new AxisSection(1, 3, Color.Red));Then the section will be drawn between the first and third point in the X axis, you can also use floating point as follows chart1.AxisX.Sections.Add(new AxisSection(1, 2.5, Color.Red));In this case the section will end in the middle between the second and third point. JuanC 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.