I'm new to core plot and wondering what the difference is on CPTBarPlotFieldBarLocation and CPTBarPlotFieldBarTip. I have been looking at the core plot example CPTTestApp_ipadViewController and I have seen that both of these field enum are called during filling the ploy with the numberForPlot-method but I don't understand the difference.
Thanks for any help
The difference is very huge. If we look at definition of type
CPTBarPlotFieldinCPTBarPlotwe will see that there are three values in that enum:CPTBarPlotFieldBarLocation: Bar location on independent coordinate axis.CPTBarPlotFieldBarTip: Bar tip value.CPTBarPlotFieldBarBase: Bar base (used only if barBasesVary is YES).You can ask - where can I use that values? Ok, you should use this constants in method
-(NSNumber *)numberForPlot:(CPTPlot *)plot field:(NSUInteger)fieldEnum recordIndex:(NSUInteger)index. In that method you should return values of that properties for each individual bar. For example,In my example I have dictionary which contains values for x axis (locations of bars) and y (values of bars).
I want to mention, that you should not set property
plotRangeof yourCPTBarPlot *plotorCorePlotwill set locations of your bars automatically (at position 0,1,2,3,4....).