Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8145173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:34:57+00:00 2026-06-06T13:34:57+00:00

Using JavaFX within Swing, I create a JFXPAnel and a ScatterChart to the Scene.

  • 0

Using JavaFX within Swing, I create a JFXPAnel and a ScatterChart to the Scene.

However looking at the graph the data isn’t quite right. It appears as if the icons top left corners are being drawn at the data point and not the center of the shapes.

Here is the sample data I am using. You’ll notice that all of the Y values are whole integers. But when the graph is shown the icons are below the lines for that value. Is this a JavaFX bug, or could I be doing something wrong?

    XYChart.Series series1 = new XYChart.Series();
    series1.setName("Effects");
    series1.getData().add(new XYChart.Data(4.2, 2));
    series1.getData().add(new XYChart.Data(2.8, 2));
    series1.getData().add(new XYChart.Data(6.2, 2));
    series1.getData().add(new XYChart.Data(1, 1));
    series1.getData().add(new XYChart.Data(1.2, 1));
    series1.getData().add(new XYChart.Data(4.4, 1));
    series1.getData().add(new XYChart.Data(8.5, 1));
    series1.getData().add(new XYChart.Data(6.9, 1));
    series1.getData().add(new XYChart.Data(9.9, 1));
    series1.getData().add(new XYChart.Data(0.9, 1));
    series1.getData().add(new XYChart.Data(3.2, 3));
    series1.getData().add(new XYChart.Data(4.8, 3));
    series1.getData().add(new XYChart.Data(7.3, 3));
    series1.getData().add(new XYChart.Data(1.8, 3));
    series1.getData().add(new XYChart.Data(7.3, 3));
    series1.getData().add(new XYChart.Data(2.7, 3));

    XYChart.Series series2 = new XYChart.Series();
    series2.setName("Cause");

    series2.getData().add(new XYChart.Data(2.4, -1));
    series2.getData().add(new XYChart.Data(3.2, -1));
    series2.getData().add(new XYChart.Data(1.8, -1));
    series2.getData().add(new XYChart.Data(3.2, -1));
    series2.getData().add(new XYChart.Data(7.4, -1));
    series2.getData().add(new XYChart.Data(3.5, -2));
    series2.getData().add(new XYChart.Data(9.3, -2));
    series2.getData().add(new XYChart.Data(8.1, -2));

    XYChart.Series series3 = new XYChart.Series();
    series3.setName("Events");
    series3.getData().add(new XYChart.Data(5.2, 0));
    series3.getData().add(new XYChart.Data(2.9, 0));
    series3.getData().add(new XYChart.Data(3.3, 0));
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T13:34:59+00:00Added an answer on June 6, 2026 at 1:34 pm

    You’ve encountered an issue http://javafx-jira.kenai.com/browse/RT-18389 which was fixed in 2.2 release.

    Development preview version of 2.2 can be downloaded from here: http://www.oracle.com/technetwork/java/javafx/downloads/devpreview-1429449.html

    If you need to have scatterchart work with 2.1 you can use next workaround: How can I center the dots on a scatter chart in JavaFX 2.0?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using javafx 2.0. I want to add an icon to the Tab in
At the moment I'm using JavaFX only for fun and learning it. What I
When using the WebEngine and WebView of JavaFX 2.0 to show some HTML content,
I'm using the FlexGantt Javax Swing package ( http://www.dlsc.com/ ) to display some Gantt
I have several checkboxes within a JForm(SubComponents) and I am using this code to
in Netbeans, I am using Jlabels to display images and text within a JFrame.
I have this kind of progamming task without JavaFx, instead it's Java Swing. I
I have a JTextPane and I have some text within that JTextPane. However, because
I am not using Spring so I am creating an instance of EntityManager within
Normally, I would just create the JLabel using a string as the first parameter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.