Hi,
Is there any option in jfreechart to change my cursor when on data ..
for example the mouse pointer is an arrow and it should change to hand when on data .
Thanks and regards
raghavan
Change of cursor on data
-
- Posts: 59
- Joined: Fri Oct 13, 2006 11:35 am
- Contact:
-
- Posts: 59
- Joined: Fri Oct 13, 2006 11:35 am
- Contact:
Hi,
I saw this forum, I thought that it might help you...
http://www.jfree.org/phpBB2/viewtopic.php?t=21649
Also look at the example below...
// Create tooltip and URL generators
SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy", Locale.UK);
StandardXYToolTipGenerator ttg = new StandardXYToolTipGenerator(
StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT,
sdf, NumberFormat.getInstance());
TimeSeriesURLGenerator urlg = new TimeSeriesURLGenerator(
sdf, "bar_chart.jsp", "series", "hitDate");
// Create the X-Axis
DateAxis xAxis = new DateAxis(null);
xAxis.setLowerMargin(0.0);
xAxis.setUpperMargin(0.0);
// Create the X-Axis
NumberAxis yAxis = new NumberAxis(null);
yAxis.setAutoRangeIncludesZero(true);
// Create the renderer
StackedXYAreaRenderer renderer =
new StackedXYAreaRenderer(XYAreaRenderer.AREA_AND_SHAPES, ttg, urlg);
renderer.setSeriesPaint(0, new Color(255, 255, 180));
renderer.setSeriesPaint(1, new Color(206, 230, 255));
renderer.setSeriesPaint(2, new Color(255, 230, 230));
renderer.setSeriesPaint(3, new Color(206, 255, 206));
renderer.setShapePaint(Color.gray);
renderer.setShapeStroke(new BasicStroke(0.5f));
renderer.setShape(new Ellipse2D.Double(-3, -3, 6, 6));
renderer.setOutline(true);
// Create the plot
XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
There is a feature call TimeSeriesURLGenerator and there might be other similar URLGenerators like this, see it in the API of jfreechart and you can provide no destination to the link (or you can give a destination if you want to direct a user to different page on clicking), in which case you will get a mouse cursor instead of the pointer when u move your mouse to the data...
Hope this helps you...
I saw this forum, I thought that it might help you...
http://www.jfree.org/phpBB2/viewtopic.php?t=21649
Also look at the example below...
// Create tooltip and URL generators
SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy", Locale.UK);
StandardXYToolTipGenerator ttg = new StandardXYToolTipGenerator(
StandardXYToolTipGenerator.DEFAULT_TOOL_TIP_FORMAT,
sdf, NumberFormat.getInstance());
TimeSeriesURLGenerator urlg = new TimeSeriesURLGenerator(
sdf, "bar_chart.jsp", "series", "hitDate");
// Create the X-Axis
DateAxis xAxis = new DateAxis(null);
xAxis.setLowerMargin(0.0);
xAxis.setUpperMargin(0.0);
// Create the X-Axis
NumberAxis yAxis = new NumberAxis(null);
yAxis.setAutoRangeIncludesZero(true);
// Create the renderer
StackedXYAreaRenderer renderer =
new StackedXYAreaRenderer(XYAreaRenderer.AREA_AND_SHAPES, ttg, urlg);
renderer.setSeriesPaint(0, new Color(255, 255, 180));
renderer.setSeriesPaint(1, new Color(206, 230, 255));
renderer.setSeriesPaint(2, new Color(255, 230, 230));
renderer.setSeriesPaint(3, new Color(206, 255, 206));
renderer.setShapePaint(Color.gray);
renderer.setShapeStroke(new BasicStroke(0.5f));
renderer.setShape(new Ellipse2D.Double(-3, -3, 6, 6));
renderer.setOutline(true);
// Create the plot
XYPlot plot = new XYPlot(dataset, xAxis, yAxis, renderer);
There is a feature call TimeSeriesURLGenerator and there might be other similar URLGenerators like this, see it in the API of jfreechart and you can provide no destination to the link (or you can give a destination if you want to direct a user to different page on clicking), in which case you will get a mouse cursor instead of the pointer when u move your mouse to the data...
Hope this helps you...
-
- Posts: 59
- Joined: Fri Oct 13, 2006 11:35 am
- Contact: