I agree the best solution would be the simplest: add a CPBarPlotFieldBarBase enum field. As you say, the default should remain a base fixed at zero.
The question then is how you switch between a constant base value like zero, and a variable data-source-provided base. I think the way to go is change the baseValue property to be a NSDecimalNumber rather than an NSDecimal. The default will be [NSDecimalNumber zero], but if someone sets that property to nil, the datasource will be queried for a base value for each bar.
It should not be very difficult to make these changes. If you make them, and want to contribute the change, either send a hg patch, or ping me and I'll give you commit rights.
Drew
> --
> You received this message because you are subscribed to the Google Groups "coreplot-discuss" group.
> To post to this group, send email to coreplot...@googlegroups.com.
> To unsubscribe from this group, send email to coreplot-discu...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/coreplot-discuss?hl=en.
>
I agree a true stacked plot does have the advantage when it comes to drawing. That is a good point. But I think it will also be much more complicated to code, and may end up being quite ugly. I can't think of really clean way to do it.
I don't really buy the user calculations argument. The user already has to setup their data, and these calculations are quite simple. Also, the user does have more flexibility this way if they need it. For example, they could have bars separated by some space if that is what they wanted. Tying yourself to a particular stacking algorithm also has its drawbacks.
In any case, I don't really see why you couldn't have both approaches. Allowing the base value to change for each bar seems like it might be useful aside from the whole stacking issue.
Drew
Can you just make sure you pull and update to any new changes in the trunk
hg pull -u
and then do a hg diff at the root of Core Plot. Send the patch to me (my full name @ mac dot com).
Cheers,
Drew McCormack
Drew
Drew