Page 1 of 1

Yahoo stock chart like pic

Posted: Tue Apr 20, 2004 5:00 am
by homecurr
Hi

I want to generate the same chart as Yahoo Finance uses for stock quote. JFreeChart works pretty well. I have just one problem. The margin around the chart is to large and it takes too much of my web page space. How can I change it? The font of the title looks like bold, how can I make it plain?

here is my code:

Thanks,

John

private JFreeChart createTimesChart(String zip, String range) {
XYDataset dataset = createDataset();
JFreeChart chart = ChartFactory.createTimeSeriesChart(
zip,
"",
"",
dataset,
false,
false,
false
);
// chart.setBackgroundPaint(Color.white);
chart.setAntiAlias(true);
return chart;
}

Same requirement.

Posted: Mon May 22, 2006 7:47 am
by devipriya
Dear John ,
I know this thread is quite old.
But am shooting this message with the confidence that u will look into it soon. John, I am just 6 months experienced and i have the same requirement. I have to draw a dynamic graph (the same graph displayed in finance.yahoo.com) based on changing statistical values. The graph should change in a periodic interval of time say for every 10 minutes but without using refresh option . My inputs will be from Excel, i have to read the values and update in the database or directly retrieve it in a jsp page where i should also incorporate this grpah functionality .
Can u please help me out? Can u please provide me with any sample application and ur code ? It is very urgent. And i am blank without any idea of how to achieve this .
Keeping my fingers crossed.
Thanks in advance.

Post your code

Posted: Fri Aug 04, 2006 12:19 pm
by riteshrav
Dear priya,

I have done one application as same as what you have posted here, you just post your code. I will try to solve this problem.

Re: Post your code

Posted: Thu Aug 24, 2006 11:57 am
by isabella
Dear shrav,
I have the similar problem with Priya, i have to draw a timeseries chart.The chart have to get the value and time from the database,how can i generate this?
Thanks a lot.

Posted: Sat Sep 23, 2006 11:19 am
by Karthicks
To read data from Excel. You can use any parser search for any parser. I think you can use open office API to parse Excel data. In open office there is option to run open office as server. via remote API you can parse the data.

Then dump the data in DB. and do it.


S.Karthick

Posted: Sat Sep 23, 2006 7:55 pm
by Taqua
Reading Excel-Data can be done using Jakarta POI - its less effort than having to use OpenOffice (their UNO-Stuff is no fun either ..).

If the data is already in a database, things are much easier: Use JDBC to query the data, iterate over the resultset to build your TimeSeries, and display the chart ..