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.
Related
I am developing a web application using Spring. I need to plot graphs and display them to the user. The values are stored in a database. How do I achieve this?
You have to decide where do you want to create the charts. You have two options:
Creating the chart on the server and send them to the client as image or pdf.
Sending raw data to the client and let them render the charts via html, flash or javascript
Each way has its own advantages and limitations - you have to decide for your specific use case.
If you render the charts on server side you are limited regarding interactivity but you clients don't need much performance to render the charts. Here you have to think about caching to protect your server performance.
On the client side you have to deal with diffent browsers and must think about the client render performance.
If 2. is ok for you, I would recommend using javascript - so your users don't need to install any plugins like flash and you have a lot of possibilites to create nice charts.
There are some nice frameworks to create charts using javascript, for example:
HighCharts
gRaphaƫl
JS Charts
...
I have used Google Charts with Spring MVC before. Normally whenever I have needed to display chart, I have always displayed tabular data along side the chart as well. So, I just take jQuery, parse the html table for data and pass it to google Chart API. You may want to look at the Google Chart pages for examples. It is quite nice.
As #aiolos said, you can generate your chart image in the client or in the Server. I haven't work with JavaScript enabled charts, but when I have to generate charts the server-side way i'll go with Cewolf. It's a Java Library based of JFreeChart that has some useful tags to embed charts in JSP pages.
I tested it in Spring Applications and works like a charm.
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.
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.
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.
I am looking for a Java or Python library that can render graphs in the Dot language as image file. The problem is that I need a library that I can use on Google App Engine. Basically I am looking for a library that can convert the text description of a directed graph into an image of the graph.
For example:
Covert this edge list:
[A,B]
[B,C]
[A,C]
[C,D]
Into this image:
I used Graphviz for this example, but I know it is not possible for me to use it with Google App Engine.
Canviz is what you are looking for: it is a JavaScript library for drawing Graphviz graphs to a web browser canvas. It works with most browsers.
Using Canviz has advantages for your web application over generating and sending bitmapped images and imagemaps to the browser:
The server only needs to have Graphviz generate xdot text; this is faster than generating bitmapped images.
Only the xdot text needs to be transferred to the browser; this is smaller than binary image data, and, if the browser supports it (which most do), the text can be gzip- or bzip2-compressed.
The web browser performs the drawing, not the server; this reduces server load.
The user can resize the graph without needing to involve the server; this is faster than having the server draw and send the graph in a different size.
To see it in action, look here.
Google Charts API now supports GraphViz experimentally. (Note that the entire Image Charts project is officially deprecated.)
You could take a look at the flash based perfuse project if just need to display a graph and not having it embedded as an image is acceptable.
They have some example applications of the library such as this Dependency Graph.
I do not think there is such pure python library, the best you can do is use NetworkX, it can draw using matplotlib or pygraphviz. Maybe you can modify networkx's matplotlib code to draw on server side, here is the code
Another problem is google app engine doesn't have any drawing API, but you may simply use SVG to generate such graphs or may be google charts API have something already there.