Creating a graph from JSON input - java

I have queried yahoo finance for historic data and have got JSon output. What i would like to do is convert this JSon data into a graph. I am using java and would have to later upload this image into my mysql database. What is the best free library for creating charts(Line charts preferably). As i am new to this some tutorials on how to use will help .

I have been using JFreeChart when building graphs in Java and it's a very powerful library.
Take a look at their site.
http://www.jfree.org/jfreechart/

Have a look at FusionCharts XT.
They work very well with Java - read their docs for more info.
Their trial license works for unlimited duration, and has all the features as in the paid version.

Related

How to generate dynamic Images using Neo4j api in Java

I worked on a scenario to genarate images using graphic2d in java. Now I have to work on the same scenario using Neo4j api. Can anybody help me out with this or provide me where I can find the relevant content. Thank you
The Graph Visualization page shows several ways to generate a visualization.
For example, the neo4j browser UI allows you to download a PNG of the results of a Cypher query.

Working with ESRI shapefiles in android

Couldn't find a solution on google or here at stackoverflow ...
Anyone knows how can a I handle ESRI shapefiles in android? I'm trying to build a simple shape viewer (for now it's not necessary to write/create shp), and maybe later overlap the maps on top of google maps on android.
So far I tried openMaps and GeoTools, but with no success. Reading the shapefile and store it inside a SQLite database is also interesting! In fact, so far what I'm doing right now is converting the shapefile to a CSV (outside android, in a computer) and then reading the CSV to SQLite for later reading inside the App.
But it would be very interesting if I could read directly from shape to SQLite (or Shape -> csv -> SQLite) using only android.
Any ideas how can I do that? I don't have much experience with Java.
I would recommend making use of Shapelib, which is part of GDAL/OGR. You will need to use the NDK but GDAL is an excellent library with a great community / support and used by many programs.
I made a quick demo to write / append to a shapefile, which should be a sufficient starting point. Please fork the demo if you would like to enhance it for your needs.

Automating tasks through java

Here's the problem:
Run a java client as a batch job on a unix box which will connect to Oracle and fetch some data.
Update an excel sheet (on a Windows machine) with the data fetched.
Create a chart/graph from the data in excel sheet.
Send the excel (with data & graph) in an email.
All the above steps must be performed without any manual intervention.
Could there be a better option to excel based solution? The main intent is to have a history of data fetched and have a chart created from that data.
I know there are many open source libraries available for creating charts like JFreeChart, but is there anything in the JDK that allows you to create charts? Could JavaFX be used for this problem?
In short, is it possible to do this with just jdk (without using any open source libraries)?
Any help/suggestion will be appreciated.
You could try google docs spread sheet api to workaround MS-Excel
I think all that is pretty doable from Google docs, and yet, you still have the option of downloading the spread sheet.
From the link:
Spreadsheets Data API
The Spreadsheets Data API lets you access worksheet data within your own application or website. You can view and modify data, create and delete worksheets, issue structured queries, and more.
Spreadsheets Gadgets & Visualization API
Spreadsheets Gadgets take advantage of the Google Visualization API to embed graphical comparisons of of structured data within a spreadsheet.
Sounds like what you need.
Pretty straightforward, just use Hibernate or even jdbc.
You should be able to update the Excel sheet with Apache POI. You could also try Java Excel Designer or http://www.moyosoft.com/jec/
At least one of the above should be able to create charts.
Just use Java Mail
You could wrap the above in ANT tasks as appropriate.

How to create an excel file in google app engine (java)?

A question that seems to have quite a few options for Python, but none for Java after googling for two days. Really really could use some help all I have found so far is a recommendation to use gaeVFS to build an excel file from the xml components and then zip it all together which sounds like a slap in the face. Oh yes and if you were wondering I am questioning my use of Java rather than python but at 5,000 lines of code it would be insane to turn back now...
Other things you might find useful
Client: GWT
Server: Servlets running
on google app engine storing data
into the google data store
Excel file: mandatory, CSV isn't good
enough, no need to save the file just
to be able to "serve" it to the
client i.e. open a "Save As" box.
Have you checked out this api already: Java Excel API ?
You could also take a look at the Apache POI project. You can read and write MS Excel documents with this library.
Take a look at this post.
It's a step by step tutorial on how to generate excel files on google app engine.
Try this :
http://code.google.com/p/gwt-table-to-excel/
google app engine do not support input/output stream classes, you need to use google app engine virtual file system.

how to create .doc file using java?

Can anyone tell me how to create doc files using java?
I know, there's a POI library, but it seems like it can save only simple documents. You can read anything you wish, but you can't save it all back again. Or may be i missed something? How can i save whole document with pictures, tables and styles?
Docmosis lets you do heaps of styling easily via the template. Uses OpenOffice and Java to do the job. Its free and free to distribute.
It ain't cheap, but you could try Aspose.Words. It'll do everything you state above and more.
JODConverter will allow you to convert lots of different document formats
OpenOffice.org's Universal Network Objects (UNO), allow you to generate .doc,.PDF, as well as OpenOffice documents. It supports several programming languages like: Java, C++, Visual Basic, etcc..
Some good things is that: its free, open source and plataform-independent
You can build documents, spreadsheets, presentations, etc. Start from scratch or using a template and fill the gaps..
In order to use it you will need to include some libraries that comes with the OpenOffice suite.
Useful links:
Open Office home
Open Office UNO Developer's Guide

Categories

Resources