On my XYLineChart, I would like to implement the ability for it to be able to register the X- value wherever I click on the chart panel, whether there is a plot there or not, and then add an annotation on every plot at that X Value.
Does anyone know how I can go about this?
Search found 5 matches
- Wed Sep 12, 2018 9:27 am
- Forum: JFreeChart
- Topic: XYLineChart get mouse click anywhere on the chart
- Replies: 0
- Views: 9286
- Tue Sep 11, 2018 2:14 pm
- Forum: JFreeChart
- Topic: Add individual shapes to a series using XYLineShapeRenderer
- Replies: 5
- Views: 13475
Re: Add individual shapes to a series using XYLineShapeRenderer
The problem I am having with this approach is that I have a line chart, which I want without shapes at all the data points, except for the one defined by the mouse click. Doing this adds series shapes to each data point as well as the point defined by the mouse click.
- Mon Sep 10, 2018 8:53 am
- Forum: JFreeChart
- Topic: Get closest datapoint to a mouse click
- Replies: 0
- Views: 9241
Get closest datapoint to a mouse click
Hello, I have a linechart, where I am trying to add the functionality of getting the x and y values of the plot by clicking on it. At the moment, my program will only return the x and y value if I click directly on the line plot. However, I would like for it to be able to register the closest datapo...
- Thu Aug 30, 2018 2:28 pm
- Forum: JFreeChart
- Topic: Add individual shapes to a series using XYLineShapeRenderer
- Replies: 5
- Views: 13475
Re: Add individual shapes to a series using XYLineShapeRenderer
Hi, thank you for the reply, but I dont think this is quite what I'm looking for. I want to be able to add a shape to a specific point that the user clicks on on the line chart.
- Mon Aug 20, 2018 10:44 am
- Forum: JFreeChart
- Topic: Add individual shapes to a series using XYLineShapeRenderer
- Replies: 5
- Views: 13475
Add individual shapes to a series using XYLineShapeRenderer
Hi, I have designed a Line chart using JFreeChart which has multiple series. I am aware that you can add a shape to each data point on a plot using the XYLineAndShapeRenderer, but I was wondering if there is a way of adding shapes to individual data points on the plot. My chart loads a new series fr...