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;
}
Yahoo stock chart like pic
Same requirement.
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.
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
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.
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
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.
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.
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 ..
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 ..