|
Guidance Needed on Java/SWING Usage & Sample Code |
| Posted by Dina Metwalli on Nov-27-2025 23:19 |
|
Hello ASE Team,
I am implementing a Java multi-line and multi-axis chart and wanted to add user-interaction features such as zooming, trackable-cursor, clicking on the chart, etc. The application UI is based on JavaFX which I know offers a SwingNode object.
Could you please advise where I can find sample code for ChartDirector's Java/SWING interactive charts?
I see that the online documentation only offers JSP code samples and the documentation for some Swing controls such as ChartViewer but no example usage. I also managed to find sample code for interactive real-time charts. However, the chart I am implementing isn't a real-time chart and requires less complexity.
Thank you in advance.
Dina |
Re: Guidance Needed on Java/SWING Usage & Sample Code |
| Posted by Dina Metwalli on Feb-21-2026 01:33 |
|
Hi Peter,
Thank you so much for your response!
The documentation you provided has been really helpful in my development process.
I also wanted to know if its possible to zoom in using a selectable domain axis. By this I mean having a user select/draw a rectangle area with their cursor to focus the zoom in. The way I imagine this would work is by getting the view port's left and right x axis timestamps and update the chart's data values depending on that?
If zooming using the selection functionality would work differently of course please let me know of that instead (and if it's possible in the first place)!
Thank you in advance.
Kind regards,
Dina |
Re: Guidance Needed on Java/SWING Usage & Sample Code |
| Posted by Peter Kwan on Feb-21-2026 05:13 |
|
Hi Dina,
I think ChartDirector for Java version 6 allows the user to drag a rectangle on the chart to zoom in to that part of the chart.
We have a video on our web site that shows what can be done on the chart. As far as I know, ChartDirector for Java version 6 supports all of the features in the video.
https://www.advsofteng.com/gallery_zoomscroll.html
Best Regards
Peter Kwan |
|