adityamishra90 / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

labels of bar on scroll not displaying value #225

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi ,
I am showing multi y bar charts in which for a single x value i  have
multiple bar with different y values,along with that i am showing
labels above all bars .i set plotSpace.allowsUserInteraction = YES; so
that user is able to scroll the chart ,issue is when user scroll the
chart labels will remain static they are not moving along bars.
plz help.........

Original issue reported on code.google.com by monikadh...@gmail.com on 19 Nov 2010 at 8:07

GoogleCodeExporter commented 8 years ago
Can you provide more information on how you're setting up the labels and plot 
space? I was unable to reproduce the problem.

I made some changes to my copy of CPTestApp to give the bar plots labels and 
allow them to scroll. Everything worked as expected.

Original comment by eskr...@mac.com on 20 Nov 2010 at 11:33

GoogleCodeExporter commented 8 years ago
Hi,
Firstly i set plotspace
plotSpace=(CPXYPlotSpace *)self.graph.defaultPlotSpace;
    plotSpace.xRange=[CPPlotRange
plotRangeWithLocation:CPDecimalFromFloat(X_MIN)
length:CPDecimalFromFloat(X_MAX+0.50-expand_graph_value)];
    plotSpace.yRange=[CPPlotRange
plotRangeWithLocation:CPDecimalFromFloat(Y_MIN)
length:CPDecimalFromFloat(f2+2.0)];
    plotSpace.allowsUserInteraction = YES;
    plotSpace.delegate=self;
    plotSpace.identifier=@"barplot";

After that i added
barPlot1.barLabelTextStyle=whiteText;
  barPlot1.barLabelOffset=1.0;

But when i am scrolling graph its not working.

Original comment by monikadh...@gmail.com on 22 Nov 2010 at 9:50

GoogleCodeExporter commented 8 years ago
You only have the one plot space, right? Are all of your plots (if there are 
more than one) tied to the same plot space?

What is your plot space delegate doing? Can you post your delegate methods?

Original comment by eskr...@mac.com on 23 Nov 2010 at 1:06

GoogleCodeExporter commented 8 years ago

Original comment by drewmcco...@mac.com on 8 Jan 2011 at 10:08