piaoyongren / core-plot

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

Problem when displaying the x-axis values #150

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.I am giving the x-axis values.
2.But it is displaying only some values randomly in the bar graph
3.

What is the expected output? What do you see instead?
I want to show the x-axis value in the bar graph.I am giving an array of
values. But it is not displaying all values.
For Ex: I want to display 10 values, then it is displaying either 3 or 4 in
random places.

What version of the product are you using? On what operating system?
version 3.1.3

Please provide any additional information below.

Original issue reported on code.google.com by satyapra...@gmail.com on 1 Jun 2010 at 3:23

Attachments:

GoogleCodeExporter commented 8 years ago
How are you setting the labels? What labelingPolicy are you using? Have you set 
any labelExclusionRanges?

Original comment by eskr...@mac.com on 2 Jun 2010 at 2:06

GoogleCodeExporter commented 8 years ago
Directly I am giving the label values to the customlables Array. And I didn't 
set any
labelExclusionRanges. 

What is labelExclusionRanges? And how it will be useful in our context

Original comment by satyapra...@gmail.com on 2 Jun 2010 at 4:20

GoogleCodeExporter commented 8 years ago
Did you also set labelingPolicy = CPAxisLabelingPolicyNone? That tells Core 
Plot to not use the automatic 
labeling features and use your custom labels instead.

labelExclusionRanges tells the automatic labeling routine to skip any major 
tick marks or labels in any of the 
ranges. It shouldn't apply here because you're setting your own labels.

Original comment by eskr...@mac.com on 2 Jun 2010 at 10:48

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Ya, I am setting the labelingPolicy by labelingPolicy = 
CPAxisLabelingPolicyNone.
And, here we are not using the labelExclusionRanges in the App.

Here It is displaying some of the labels, but not all the labels.

And another thing, For the last values, the bars touching the top. But the 
value of
the bar is less than the max height. 

Please help me in that issue also

Original comment by satyapra...@gmail.com on 2 Jun 2010 at 2:47

GoogleCodeExporter commented 8 years ago
Can you post some code?

Original comment by eskr...@mac.com on 3 Jun 2010 at 12:46

GoogleCodeExporter commented 8 years ago
I didn't write any special code for that. I have used the example program in the
coreplot library. I just changed two lines. those are; x-axis labels arrays & 
the bar
values array. And I changed the maximum limit of the y-axis. If you want. I wil
attach the file. 

Original comment by satyapra...@gmail.com on 3 Jun 2010 at 4:31

GoogleCodeExporter commented 8 years ago
Here I am attaching the file. Here there are some lines having word 
"appDelegate".
Those lines only I changed. Please find the attachment.

Original comment by satyapra...@gmail.com on 3 Jun 2010 at 8:23

Attachments:

GoogleCodeExporter commented 8 years ago
1. Does appDelegate.valArray contain the bar values or locations? You're using 
it to initialize the locations.

2. You need to update the numberForPlot:field:recordIndex: method to return 
your locations and values. It is still 
using the ones from the sample program--location = the index and value = (index 
+ 1)^2. That's probably why 
the ranges look wrong.

Original comment by eskr...@mac.com on 6 Jun 2010 at 4:00

GoogleCodeExporter commented 8 years ago
Thanks for the new Update. 
The bar values displaying perfectly.
But coming to the labels, those are not displaying correctly. 

Here in the first point you said; what we have to give for locations and the 
xAxisLabels Array. 

Original comment by satyapra...@gmail.com on 8 Jun 2010 at 4:37

GoogleCodeExporter commented 8 years ago
When you create the labels, be sure to set the tickLocation of each label. 
These should match your bar locations.

Original comment by eskr...@mac.com on 9 Jun 2010 at 3:02

GoogleCodeExporter commented 8 years ago
I am giving the bar values dynamically. So how can I set the locations of the 
labels.
And how can get the width of the barChart.

Original comment by satyapra...@gmail.com on 9 Jun 2010 at 3:31

GoogleCodeExporter commented 8 years ago
Use the same locations to create your labels that you use for the bar locations.

> how can get the width of the barChart.
Plots are CALayers; just ask it for its bounds.

Original comment by eskr...@mac.com on 9 Jun 2010 at 10:33

GoogleCodeExporter commented 8 years ago
I am not giving any locations to the bars. By default it is taking locations.
Can you tel me how can I access those locations dynamically. 

Original comment by satyapra...@gmail.com on 10 Jun 2010 at 3:54

GoogleCodeExporter commented 8 years ago

Original comment by drewmcco...@mac.com on 12 Jul 2010 at 7:51

GoogleCodeExporter commented 8 years ago
The problem solved. Thanks for all suggestions.

Original comment by satyapra...@gmail.com on 12 Jul 2010 at 8:27