bowofolaf Posted June 10, 2013 Report Share Posted June 10, 2013 I am trying to set a different color for the first bar in a series in a bar chart. How do i go about this? Quote Link to comment Share on other sites More sharing options...
AndreG Posted June 10, 2013 Report Share Posted June 10, 2013 int seriesIndex = 0; int pointIndex = 0; chart1.Points[seriesIndex, pointIndex].Color = Color.Red; Quote Link to comment Share on other sites More sharing options...
bowofolaf Posted June 11, 2013 Author Report Share Posted June 11, 2013 Thanks, it worked eventually. How do I specify that an axis is categorical, I'm having issues setting the labels. Note, im using a special XML configuration in ASP and I had to set the point color as such <parameter key="BARCHART_POINTSCOLOR0" value="red"/> Quote Link to comment Share on other sites More sharing options...
AndreG Posted June 11, 2013 Report Share Posted June 11, 2013 All bar charts are categorical. You cannot assign X values to a bar chart. Quote Link to comment Share on other sites More sharing options...
bowofolaf Posted June 11, 2013 Author Report Share Posted June 11, 2013 What do you mean by that? I can't manually change the labels on the X-axis? Quote Link to comment Share on other sites More sharing options...
AndreG Posted June 11, 2013 Report Share Posted June 11, 2013 You asked how to make the axis categorical, but it is categorical by default. To change the labels: chart1.AxisX.Labels[index] = "My Label"; 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.