Reputation: 383
I have these 3 categories, day, month and year. These categories have values, and I want to draw a graph with these values (But the graph is only 2-dimensional). Up until now, I have been drawing graps where I only had 2 categories, for example, day and accidents. So I just put day on x-axis and accidents on y-axis.
Now I need to do the same thing, but I have 3 categories, as stated above. I don't know how to do this, since not all months have equal days. Some have 28 days, some have 30 days etc. Any idea on how to calculate this? And what would you suggest to have on the x-axis and y-axis?
Also, another little thing is that when I add values for days or months on the graph, it will show them as double type. I only want Integers. How do I get this? The way I add the values to x-axis is shown in below code:
pane.XAxis.Scale.Min = 1;
pane.XAxis.Scale.Max = 12;
pane.YAxis.Scale.Min = 1900;
pane.YAxis.Scale.Max = 2000;
Upvotes: 1
Views: 538
Reputation: 2903
I don't know zedgraph, but usually this is solved by putting all categories on x-axis and color coding each category.
Simple example is seen at following link: http://zedgraph.dariowiz.com/indexd8a1.html?title=Use_RenderMode.RawImage_in_a_web_page
In your case it seem weird to have data for days, months and years in same graph, because the different scale of values will be causing problems.
Upvotes: 1