user579674
user579674

Reputation: 2179

C# Chart - How to put custom labels on axes and string instead of double

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?

Upvotes: 2

Views: 7377

Answers (1)

digEmAll
digEmAll

Reputation: 57220

What about:

myChart.ChartAreas[0].AxisX.LabelStyle.Format = "mm";
// or other formats e.g. HH:mm etc...

Upvotes: 3

Related Questions