Here is the way that I think a scatter plot should be built in C# (at a decently high level of abstraction).
- Create a blank image
- Use TextRenderer to draw the axis labels and scales (horizontal will not be so trivial, but will still be manageable).
- Draw some lines that will be the ticks on the axes and the lines for the axes themselves
- Draw some circles (not 100% of how to do that, but it can't be too hard) based on the points listed in some data-set.
- Display the image in a pictureBox.
- Create a function that will be called on MouseHover that will display some details about that point in a tool-tip.
Does this even make sense? Am I using the wrong controls for the job? Is there some code in .NET that will do a large part of this already (the chart class seems good only for bar graphs)? Is there a way to access excel's plotting capabilities from C#?
To me, all of this seems quite contrived, and I would appreciate input on how to better design a scatter-plot class.
No comments:
Post a Comment