I'm using core plot 1.0. Currently I'm making the X axis draw say 20 points above the bottom of the screen (so the labels can show up) by defining the Y range a little bit below 0.
Now I was asked that the origin point should be 0.0 and there should not be anything below 0 in both axes, so I'm now looking at the core plot documentation and scratching my head with the following question:
What property do I need to set to move the axes at the position I'd like to and also keep on showing the point labels and axis titles?
Thanks a lot!
I've found it so I leave it here for if somebody else needs help with this.
It is kind of tricky, you need to adjust the xRange and yRange on the plot space so it's big enough to draw the labels, the ticks and the titles and then adjust the visibleRange property on each axis. At this point you get the amount of axis you want and still displaying the information you need.
If someone knows a better way please share :)
Related
Please help me out for drawing grouped bar chart in dimple js.
I have to draw the graph where x-axis is timeAxis and y-axis is measureAxis.
I have seen many code snippets when they have done this. But, i am unable to do this with x-axis as timeAxis.
Any help would be appreciated.
I'm afraid the time axis doesn't support grouping. If you want to use dimple the only way is to use a category axis (which does work with time dimensions, but will evenly space and size each time value regardless of real interval).
Is any method in Core Plot which is called when plot is scrolled and it receives recordIndex parameter? My goal is to get x and y values for a symbol which appeared on the screen. I've searched in examples and documentation, but maybe I've missed something. Thanks.
Use a plot space delegate to monitor changes to the plot space. Your datasource knows what all of the data values are. You can check after each plot space change to see which data points are visible.
I'm using Core Plot to graph linear equations.
I would like to be able to supply two different data points and have a line drawn between them, but also extrapolated beyond the points themselves so that the line extends all the way to the edges of the plot area.
For example, given a 20x20 plot area with the origin centered and points at -5,-5 and 5,5, the line (green below) would extend all the way from -10,10 to 10,10 (blue below).
Is this possible? Is the best option just to find the plot range (which will be different each time) and find two points that are outside of it? I'm not sure if this will work; I have user interaction enabled and I want to make sure that the user can't accidentally pan far enough that the line will end.
Your idea of finding two endpoints outside the plot range is what I'd do. If you've limited the scrolling range, just pick points at the limits of that range. If not, you'll need to monitor changes to the plot space ranges with a plot space delegate and update the plot as needed.
I have a Core-Plot Graph within a Mac Application. But the inside table is appearing shifted down and to the left of the containing "frame/border" so that neither of the axis' are showing. I cannot figure out how to change this does anyone know what parameters I need to change to fix this?
Update: Sorry I did not realize I could upload an image, I have done so know and will try your suggestions in the mean-time.
Not sure what you mean by "inside table". It would be easier to offer suggestions if you could post a screenshot.
Without seeing what's wrong, here are some common areas to look at:
If you haven't already done so, look at the example apps included with Core Plot for ideas. The Plot Gallery app has many sample plots and the others are useful, too.
You may need to add padding (paddingLeft, paddingBottom, etc.) on the graph and/or plot area frame. Padding the graph pushes everything in away from the edges of the graph. Padding the plot area frame pushes the plot area in so the axes and titles can hang outside the plot area (the area where the plots are drawn).
If you want to keep an axes pinned to a specific place, e.g., the edge of the graph, set up a floating axis. Otherwise make sure the orthogonal coordinate is set (it defaults to 0). For example, the orthogonal coordinate for the x-axis is the y-value where the x-axis crosses the y-axis.
I want to use the same effect Apple uses in iOS5 for showing new notifications (this flip-in effect). But I don't know how to start or what to google for. Could somebody please give me a hint?
Thanks!
Create two CALayers. One aligned normally along the x and y axis, the other rotated around the x axis so that it "lies flat", i.e. its surface points down along the y axis.
Then rotate both layers by 90 degrees along the x axis. At the end of the rotation, the first layer will now "lie flat", pointing upward along the y axis and the second layer will be aligned normally along the x and y axes.
I know you asked more than a year ago, but if it's useful to you, I would checkout the new and awesome Animate.css css3 transitions! I would take the FlipInX effect, which looks exactly like in iOS5!