Hi All, I'm ploting a combined chart of time series and vertical bar chart. I have set the following code to generate the tooltips:
// create subplot 1...
XYDataset priceData = DemoDatasetFactory.createPriceDataset(code, type, fyear, fmonth, tyear, tmonth, pattern, window);
XYItemRenderer renderer1 = new StandardXYItemRenderer();
renderer1.setToolTipGenerator(new TimeSeriesToolTipGenerator("d-MMM-yyyy", "0.00"));
NumberAxis axis = new VerticalNumberAxis("Price");
axis.setAutoRangeIncludesZero(false);
XYPlot subplot1 = new XYPlot(priceData, null, axis, renderer1);
// create subplot 2...
IntervalXYDataset volumeData = DemoDatasetFactory.createVolumeDataset(code, type, fyear, fmonth, tyear, tmonth, pattern, window);
XYItemRenderer renderer2 = new VerticalXYBarRenderer(0.20);
renderer2.setToolTipGenerator(new TimeSeriesToolTipGenerator("d-MMM-yyyy", "0.00"));
XYPlot subplot2 = new XYPlot(volumeData, null, new VerticalNumberAxis("Volume"), renderer2);
But when the graph display, I can't see the tooltips....what's wrong with my code?! or I need to enable anything in other class?!
Thx!
Gloria
Tooltips in combined chart
Re: Tooltips in combined chart
Hi Gloria,
I can't see anything obviously wrong...at one point, the tooltips were only working for the first subplot, maybe that is the problem. I'll double check that it is fixed for the 0.9.5 release.
Regards,
Dave Gilbert
I can't see anything obviously wrong...at one point, the tooltips were only working for the first subplot, maybe that is the problem. I'll double check that it is fixed for the 0.9.5 release.
Regards,
Dave Gilbert
Re: Tooltips in combined chart
Hi Gilbert,
I know what's happened with my code. Since I'm using Servlet and HTML to output my chart, the tooltips cannot work on it...It only works with Applet..So...I can't make use of this tooltips....Thx!
Regards,
Gloria
I know what's happened with my code. Since I'm using Servlet and HTML to output my chart, the tooltips cannot work on it...It only works with Applet..So...I can't make use of this tooltips....Thx!
Regards,
Gloria