Which is the best way to plot graph in iphone? - ios4

I saw some Core-plot sample. Is there anything equivalent that will do my task easily? I also want to know feasibility with Core-plot in iPhone. (any issues with core-plot)
I want to have multi-colored vertical bar chart. Is it possible to customize Core-plot framework. Using only one barplot can we have multiple segment on it.
Thank you.
Naveen Thunga

To make a stacked bar plot, you need to make multiple plots, one for each segment. On all but the bottom plot, set barBasesVary to YES. The datasource will ask for a third field called CPTBarPlotFieldBarBase which is the base value for the bar. You will have to do the stacking calculations yourself.
The horizontal lines can be drawn using an additional bar plot. Give the bars a short height (tip - base). You can make the width wider than the others if you want--each plot is independent.
The space between the bars depends on several factors. By default, bar widths are specified in data coordinates. For example, if the bar locations are one unit apart, a bar width of 0.5 will make the bar width and the space between the bars equal; a bar width of 0.75 will make the space 1/3 of the bar width. The actual width in pixels depends on the size of the graph and how many bars are visible (determined by the plot range along that axis). If barWidthsAreInViewCoordinates is YES, then bar widths are given in pixels which keeps them the same apparent width as the plot range changes, but the space between them will change with the plot range.

Related

Cognos bar chart second axis bars overlapping the first axis bars

When using Cognos 10 report studio creating a bar chart results in Overlapping Bars. How can i seperate them so they look like this (i.e. stacked vertically)
You could use a combination chart but by default your series will overlap. One workaround is to reduce the size of the bar width of your secondary axis.
I would also be interested to know how to overcome the default overlapping of clustered and stacked combination

Shading Area Between Two Line Charts and Axes

I am on day #2 of searching the web and, while I have found plenty of hits that seem like they should work, none of them seem to apply to my particular situation.
I have an Excel chart with two series displayed. One is a sort of exponential decay curve, and one is a constant that intersects with the exponential curve, but does not continue past it (the final x-value of the orange line is estimated to make it look like it intersects the blue curve):
The raw data for the blue curve is as follows (leaving off data labels for confidentiality reasons, but x-values are on the left and y-values are on the right):
The orange line is simply set at 24 all the way across until it intersects with the blue curve.
So here's the problem I need to solve: I need to fill in all of the area below the blue curve with one color, and I need to fill in the area below the orange line with another color. Everything above the blue curve needs to be blank (transparent). Here's an illustration of what I want:
I know in order to get the coloring/shading I need to use an area chart. However, when I try to change the chart type to Area the scales of the axes change for each series and they no longer match up, and I am unable to edit the axes (can't set min, max, etc) to make them match up again. Additionally, only the area directly beneath the constant line fills in (as expected), but I am looking for a way to fill in the area between the orange line, the blue curve, and the axes:
How might one go about doing what I need to do?
If there's any other information I could provide that would be of help, please let me know and I'll be sure to add it in.
EDIT:
I can extend the orange line to follow the blue line off to the right, which may help fill in the lower area. However, when I switch to an area chart I still get the issue with mismatched axes with scale I can't edit:
Notice how the "567" point (the x-value where the orange line should intersect the blue curve) is spaced evenly between "500" and "600", rather than scaling slightly to the right of center as I would have expected.
How do I keep the spacing of one tick every 100 units on the x-axis but keep the datapoint for 567?
You could find the intersection point's coordinates (graphically or analitically), then split your data in two separate series within the same graph as follows :
Edit post comment section :
For some reason x-values are considered by default as text.
Righ click the x-axis > format > Select date on the axis
Then play with the principal and base in days/months to have the intervals you want.
Good parameters for this data :
main : 100 in days
base : in days
I would just have two identical charts : one does the blue and the other the orange then lay the orange chart on top of the blue and make it transparent ... worked a treat in the past...

Excel charts: Overlaying scatter plot with bar chart

I'm trying to create a combined scatter plot and "bar chart" - the bars extend the full height of the chart, but their width varies (I have a table with the start and finish points on the x-axis).
Here is a mock-up:
http://imgur.com/EHzv5YB
Do you think this is possible in Excel? I have found some links on how to overlay multiple plot types, but none involving variable width shaded areas as seen in the example.
Would really appreciate any help. Thanks!
I've written a tutorial showing how to Highlight Certain Time Periods in a Chart.

Conditional Formatting of donut chart

All,
I have a donut chart that indicates widgets that passed inspection as a percentage over total widgets (passed and failed). What I am trying to do is add some kind of conditional formatting to the ring segment that shows percentage of widgets that passed inspection, based on the percentage of widgets that actually passed inspection, such that the whole segment is either red if less than 75% passed, yellow if up to 90% passed, and green if over 90%
All,
Just thought I'd let you know I found a way to accomplish this. First, I created a column chart for widgets and for my different color schemes (such that we would have a clustered column chart with two clusters). Then, I set the widgets passed column chart to a secondary axis.
Next, I changed the chart type of both axis to a donut chart (note, donut charts do not let you set a secondary axis directly, which is why we have to do this in a column chart or line chart first).
Next, for the data series representing the different colors, I used the formulas =if([passed]>=.9,1,0), =if([passed]>=.75,1-R[-1]C,0), and 1-sum(R[-2]C:R[-1]C) to fill the values for the ring on the primary axis that is to represent different colors.
After this, it was simply a matter of adjusting the formatting on the primary and secondary axis, making the [passed] ring segment transparent, and using 1-[passed] to calculate a failed segment of widgets.
I hope that made sense to anyone else trying to accomplish this, but let me know if any questions (or if you have done this before and have a better way to explain, fill free to edit this).

How do you alter the z axis length in a 3d excel plot?

I'm trying to plot 6 timeseries side by side in excel. The default 3d bar charts and surface plots almost do the right thing. The problem is the timeseries are laid on the z-axis as I expected but they're jammed so close together you can't read the labels.
I've tried changing the tick interval and re-sizing the chart. Re-sizing the chart only seems to affect the x and y axis lengths leaving the z-axis pretty much the same short useless length.
How do I change the z-axis length in Excel?
To adjust the z-axis size, do the following:
Select Layout/3D Rotation on the ribbon. A 3d rotation dialog box opens.
Ensure 3D Rotation is highlighted on the dialog's left pane and then deselect Autoscale at bottom the right pane in the dialog box.
To lengthen the z-axis, increase the Depth percentage from 100 to 200, 300 or whatever is needed to accommodate your z-axis labels.
A few other points - the graph itself is contained in a picture within the chart panel. You can lengthen the z-axis somewhat by clicking on the chart to select the chart's frame and then resize the frame.
If you're plotting time series data using the 3d bar graph, you can click on a specific bar and Excel will show you the datum value that produced the bar.
To look on the backside of the graph to see if there are hidden values, set the x-axis rotation to 135. Lengthening the z-axis alleviates the issue somewhat as it spreads the series further apart and lets you see "behind" the front series a bit better.

Resources