I want to develop a application which should generate dynamic financial chart and i tried using Graphics class but its not look good...
Is there any concepts in blackberry, where i can draw chart like following image
http://news.timtechs.com/our-favorite-blackberry-app-world-picks.html/bloomberg-blackberry-app
Thanks in advance....
I'm not sure there is any API that will let you to do that.
However, you will easily do that width all basics Graphics functions... with drawLine, drawRect, drawText, etc...
Related
I have been looking all around the net for open source graph plot framework for iOS, but I am struggling with it as of now. I have worked on an app and used PowerPlot Graph Plot framework http://powerplot.nua-schroers.de/examples/webtraffic.html
I am trying to draw a bar graph chart showing two years at once without stacking each, like in the image below: As you can see there is a problem of resizeing and the scaling isnt uniform. I would like to make the chart look bigger and the y axis be more formatted.
Any suggestions because I always hear about core plot also by which you can achieve such(see below), but all i hear about coreplot is flexibility and customization issues.
You can easily produce a bar plot like that with Core Plot. Give it a try and ask specific questions here on StackOverflow if you get stuck.
I have two sets of array containing 7 objects, with values in one and dates on another.
I would like to generate a simple bar graph with date on x axis and values on y axis.
I searched google and ofcourse stackoverflow, but I didn't find a satisfactory answer.
In every answer, it's all about Coreplot, which I don't want to use because of it's complexity(Me being a begineer in ios development).
Is there any other way except, CorePlot to achieve such graph? Or Can someone provide me an example to plot using inbuilt apple API'S
Awaiting an answer, Thanks a lot in advance.
You will need to do this inside a custom UIView.
In the drawRect method you can calculate the extent of the x-axis and the y-axis. You then need to draw the axes onto the actual screen with the numbers showing the values.
Then you need to work out how thick each bar should be and how tall they need to be.
Then draw them into their relevant spaces along the x-axis.
Before any of this though you need to give is a background colour. Maybe some guide lines so the user can easily read the values...
Or you can use http://www.cocoapods.org to install CorePlot and it will do it all for you.
It is MUCH MUCH MUCH MUCH more difficult to draw the graph yourself than it is sto spend a while learning how to use coreplot.
I tried using coreplot, but it is a giant framework which is too good and toodifficult for a begineer like me to consume. So I came across OVGraph, which is a basic framework that does all I want, And it is easy to use as well,
something like this :
OVGraphView *graphview=[[OVGraphView alloc]initWithFrame:CGRectMake(0, 0, 480, 300) ContentSize:CGSizeMake(960, 300)];
//customizations go here
[self.view addSubview:graphview];
[graphview setPoints:#[[[OVGraphViewPoint alloc]initWithXLabel:#"today" YValue:#3.2 ],[[OVGraphViewPoint alloc]initWithXLabel:#"yesterday" YValue:#4 ],[[OVGraphViewPoint alloc]initWithXLabel:#"3" YValue:#6 ]]];
generates beautiful graphs.
Another option can be EChart which has EColumnChart
This third party project worked nice for me and I found the design much better than most other projects. Unfortunately is paid, but it's always an option :)
http://www.binpress.com/app/ios-bar-chart-view/1836
I'm coding iOS app that will explain complex numbers to the user. Complex numbers can be displayed in Cartesian coordinates and that's what I want to do; print one or more vectors on the screen.
I am looking for the easiest way to print 3 vectors into a coordinate system that will adjust itself to the vector-size (if x-coord is > y-coord adjust both axis to x-coord and vice versa).
I tried using Core Plot, which I think is way too multifunctional for my purpose.
Right now I am working with PowerPlot and my coordinate system looks okay already, but I still encounter some problems (x- and y-axis are set to the x and y values which results in a 45 degree angled line, no matter the user input).
The functionality of the examples in CorePlot and PowerPlot don't seem to meet my needs.
My last two approaches were using HTML and a web view, and doing it all myself with Quartz (not the simple way...)
Do you have any advice how to do this the simple way, as it is a simple problem, I guess?
If you're not wanting to do much actual graphing and plotting, then using Core Plot or similar sounds like overkill to me. The extra bloat of adding coreplot to your project, not to mention the time taken for you to understand how to use it, might not be worth it for some simple graphics.
Quartz is well equipped for the job of showing a few vectors on the screen, assuming you're not interested in fancy 3D graphics. There are plenty of tutorials and examples of using Core Graphics (AKA Quartz) to draw lines etc. If you're going the Quartz route, perhaps get some simple line drawing going in Quartz, then ask more questions if you need help with the maths aspect of it.
The typical technique used when rendering with Quartz is to override drawRect in a subclass of UIView and place calls to Core Graphics drawing functions in there.
A decent question and example of Quartz line drawing is here:
How do I draw a line on the iPhone?
If you aren't adverse to using Google Chart Image you can load reasonably complex data sets in a simple manner by calling the appropriate URL and then putting the image in a UIImageView. It takes very little code: here is a blog post explanation with sample code.
The limitations are
length of the data set is restricted by the max URL length you can request from Google (2048 characters, with encoding is large), though I've plotted with 120 data points in 4 series.
a net connection is required (at least to get the initial chart)
and perhaps the biggest problem, API is deprecated and will be discontinued in 2015 at some point. You would then have to switch to the UIWebView/Javascript Google Chart API implementation...
Sample image:
In my App I need to draw graph data with different datamodels that frequently change and can not be generalized. This graph data must be editable with a slider or a segmented control.
The idea is to load all necessary data to draw the graph from the server. Is html5 the right solution? Can the iPad-UI-Controlls used to manipulate the graph?
Where do I start and how much work is it?
Currently I'm using Core Plot to draw the graph - but I need to model my graph data on the server.
Option 1: If you are developing for Android as well or you are better at javascript, then you can use HTML5.0. Have a look at http://www.sencha.com/products/touch/charts/
Option 2: If you want to develop it natively for iPad(which I feel is a better option), then please look at google library for graph http://code.google.com/p/core-plot/ and Is there a good charting library for iPhone?
I extended the work of this gentleman:
http://buildmobile.com/creating-a-graph-with-quartz-2d/#fbid=EKAB22zV7It
And I'm quite pleased with the results. It took me about a week to get my graph able to draw a stock chart with scrolling, pinching zooming, 3 different symbol indicators, a secondary plot line, tap-able data points with a little custom popover showing details, and a few annotations. Not bad considering the overall complexity, and largely thanks to the detailed walkthrough.
He also talks about why he didn't use Core Plot.
Good luck,
Damien
If my designer gives me a 960x640px image of what the screen should look like, as well as all of the individual elements as images or text, is there a way to lay out the images and text on the iPhone/iPad screen without doing it manually through code? The way I'm doing it now is a series of trial and error, trying to guess the position of each element.
By the way, the types of layouts I'm trying to do are simple static layouts for stuff like Menus and High Scores lists, etc.
You should try one of the editing tools: LevelHelper, CocoShop and CocosBuilder. The problem will be the output format, make sure that not only the editing part works to your specification but that you can actually use just the snippet of code you need to plug it into your code.
Do you have an image-editing software like Photoshop or GIMP? How about opening the 960x640px image with any such software, then hovering your mouse over the center of each element for its coordinates, and then finally pumping these values into your code?
In my opinion, this is at least better and way faster than trial and error:)
If you want to measure position of graphic elements. You can try a commercial called xscope. The trail version can be downloaded form their official website. It is the best tool I ever seen to measure distance, color(like, it can copy color measured directly to [UIColor ...] format), etc. If you want something freeware, I would like to recommend markman, which is a Chinese software, it's built on adobe air. All elements/button are graphic, so you don't need to read chinese to use it..
You can try to use some open source editor and write your exporter. For example I am using blender as a level editor for the game I am working on. It has a nice python API that can be used to export all the information you need.