Creating iOS 5 Apps Discussion > Page 232 - GraphStats in Model group?
Perhaps.
You can argue over where this sort of data manipulation code should go. The decision is often application dependent, though usually it's placed in either the Model or in the Controller. But, you're right, the view isn't necessarily the best place for it. I left it in the Views folder, because it's only used by the GraphView class. If I was going to use it in more than one place, it would probably make more sense to build it more explicitly into the model. For me, having it with the GraphView makes it easier to find.
I think the more important point is to separate the functionality and to (as much as possible) give each class a clear, single purpose. You can often argue about where things belong (and believe me, I've done a bit of that during code reviews), but as long as it has some sort of internal consistency and logic to it, it doesn't really matter where you draw the lines.
Having said that, if I was going to refactor this, I'd think about moving the GraphStat into either the controller or the model--and passing a GraphStat object to the graph view. At that point I'd probably also rename it something more general. Of course, this is a slightly more complex design, and more classes need to import the GraphStat class--so you need to balance MVC purity against pragmatics. But, it's a small enough change that I wouldn't worry about it too much.

Shouldn't GraphStats be in the Model group?