Can any one help me in drawing a bar graph...? - objective-c

In my application I have to read data from a file or core data and draw a bar graph using that data. Can any one help me in drawing the bar graph in a simple way?

I have used the Core Plot library successfully. Here are some basic tutorials, but you will have to adjust to suit your particular scenario:
Using Core Plot in an iPhone Application
High Level Design Overview
Visualizing Data with Core Plot

check out this:
http://code.google.com/p/core-plot/

Related

ios bar graph Thermometer with coreploat

I am Developing an Application which requires the following kind of the Thermometer. I am using the CorePlot.
Should I use the Core-plot or any other alternative or Any custom framework like this is already been developed?
I asked to use views because its easier and quick to implement. With core plot, It would be good if you go through documentation and understand how it works first.
"Vertical Bar Chart" in the Plot Gallery example app demonstrates this.
In your code, You need to set
CPBarPlot * barPlot = [CPBarPlot ...];
[barPlot setBarsAreHorizontal:YES];

Core Plot - Graph show in fullscreen

I've created a basic graph with Core Plot.
The graph succesfully showed in the center of the view, only I would like to show the Graph in fullscreen. Where can I change the frame size of the Graph?
I hope someone can help. Many thanks!
The graph will always fill its hosting view. Since the hosting view is a subclass of UIView, you can position and size the same as you would any other view.

ScatterPlot doesn't let me tap plot points or move graph

I'm trying to use a scatter plot from Core Plot in my iOS application. I set up Core Plot as the Core Plot wiki says, and then I copy PlotItem.h/m, PlotGallery.h/m and SimpleScatterPlot.h/m from the included Plot Gallery project into my project. The code
CPTTheme *theme = [CPTTheme themeNamed:kCPTDarkGradientTheme];
SimpleScatterPlot *scatterPlot = [[SimpleScatterPlot alloc]init];
[scatterPlot generateData];
[scatterPlot renderInLayer:hostView withTheme:theme];
runs, and the graph view is shown in my app. But I cannot move the graph view around or tap the plot points as in the Plot Gallery project. How do I set this up right?
The Plot Gallery is a poor starting point for a simple Core Plot demonstration. It has a lot of extra "stuff" to support generating a table view with thumbnails of all the different plots. The -renderInView:withTheme: method is used to make the thumbnail images for the table view. It renders the graph as an image which is why you lose interactivity. Unless you need the flexibility to quickly add new plots to your app and easily support both MacOS and iOS, I would recommend using one of the other examples as a starting point. The architecture is much simpler and easier to understand.
You need to have a CPTGraphHostingView in the visible view hierarchy. Set your graph as its hostedGraph. Look at any of the other example apps to see how to set up the hosting view. The graph setup and datasource code in the Plot Gallery plots (e.g., SimpleScatterPlot) is fine and should work anywhere.

Draw Graph in Blackberry

i want to create one app which draw different charts like pie chart, line chart, mixed chart etc.
Is the any API available to do so.If yes then please give me link.
And of no then is there any alternative for that.
AFAIK, there is no such chart drawing BB APIs right out of the box. So you should create your own custom ChartField by extending Field. Override Field.paint(Graphics graphics) to draw whatever you need. Graphics API offers a lot of drawing methods, so it is definitely doable.
RIM have a knowledge base article about drawing graph fields:
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800345/How_To_-_Create_graph_fields.html?nodeid=1889634&vernum=0
This shows how to create different tyes of graphs such as pie, line, bar.

Is it possible to animate markers in ArcMap?

I'm completely new to ArcGIS and ArcMap, but someone suggested this program to me for a project I'm working on.
I would like to animate individual entities on a map, and was wondering if it is possible to do so in ArcMap. I asked this earlier here and a member directed me to a tutorial on animating in ArcGIS. The animation in the guide was over a map spread (ie. each pixel on the map displays, say, a different color to indicate population data in the area). However I realized that if I zoom in a lot, eventually the image will degenerate into pixels, which is why I need an actual object to mark a certain point. I checked some online tutorials and it seems like we can place markers on the map. Can someone tell me if it is possible to animate these markers (for example via a for-loop)? And if so, could you point me in a direction where to start?
Thanks in advance!
You can animate layers in ArcMap is the short answer. Its not as simple as using the timeline feature in Google Earth for example though. But then ArcMap is much more than just a visualization tool.
This help page on the ESRI web help looks like a good place to start.
I'm not 100% sure what you mean by the image degenerates into pixels. Are you saying that the markers were single points in the layer. Unlike Google Earth you are not confined to simply plotting points on the map. You can draw completely arbitrary shapes in ArcMap, which can be defined to cover actual areas of the map, so when you zoom-in the shape gets larger.
The way you need to load data into ArcMap to produce an animation isn't too simple. There might be other ways to do this, but the way I know of is to generate a NetCDF file. This file contains a 3D matrix of layer data, where each layer is separated through time. Because you generate a matrix, you are effectively placing a raster image over the map. Thus if you want to cover a large area, each matrix becomes large, and you multiply that by the number of time slices you wish to animate over.
Once you have a NetCDF file with your data in however, getting ArcMap to animate it and produce say a .avi file is pretty simple.
You could try just loading some of the example NetCDF datasets into ArcMap to see how/if they will work to get you started.
Hope that helps.
The upcoming v10 will have better time-aware capabilities, which will allow for animation.