I'm using WinForms and mschart and I want to draw a chart where the Y axis values are strings and the X axis is time. It would like a chart representing the weather for each day where in the Y axis predefined values exist for raining, sunny etc and each day can be only one of those values. How do I do that? I've managed to write the code for the X axis and it works but I can't put string values on the Y axis. Any help?
Asked
Active
Viewed 7,268 times
2
-
3Why accept the answer when it doesn't answer your edited question? It will just confuse people trying to find out solution for the same problem as it is no longer related! – Rado Jan 10 '12 at 16:09
-
1@Rado Yup I have the same problem and the accepted answer here didn't help. I did find this [answer](http://stackoverflow.com/a/5232122/340045) but it requires implementing an event in code and I was hoping for a solution using the form design editor. – Ben Jun 14 '12 at 22:06
1 Answers
3
What about:
myChart.ChartAreas[0].AxisX.LabelStyle.Format = "mm";
// or other formats e.g. HH:mm etc...

digEmAll
- 56,430
- 9
- 115
- 140