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 9306397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:09:52+00:00 2026-06-19T00:09:52+00:00

I have a Chart which may have null value and also i want Fixing

  • 0

I have a Chart which may have null value and also i want Fixing X-Axis Scale (ex.20 point).
and the value binding to Y-Axis (not null value ex.10 value).

My desired Chart

[Update]

String [] categories = {"32-11, 33-11, 34-11, 35-11, 36-11, 37-11, 38-11, 39-11, 40-11, 41-11, 42-11, 43-11, 44-11, 45-11, 46-11, 47-11, 48-11, 49-11, 50-11, 51-11"};
LineChart<String, Number> myChart;
CategoryAxis xAxis;
NumberAxis yAxis;

yAxis = new NumberAxis();
xAxis = new CategoryAxis();
xAxis.setCategories(FXCollections.<String>observableArrayList(Arrays.asList(categories))); 
xAxis.setAutoRanging(false);

myChart = new LineChart<String, Number>(xAxis,yAxis);

    Series<String, Number> aSeries = new Series<String, Number>();
    for (int i = 0; i < categories.length; i++) {
        aSeries.getData().add(new XYChart.Data(categories[i],"Some Long values and may be null"));
    }

myChart.getData().add(aSeries);
  • Chart draw Nothing
  • //xAxis.setAutoRanging(false); Chart draw but with auto range.
  • 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-19T00:09:54+00:00Added an answer on June 19, 2026 at 12:09 am

    I found solution for my question :

    • I get the CategoryAxis source ! from CategorAxis.
    • And add one line all thing go right.

      public final void setCategories(ObservableList<String> value) {
      categories.set(value);
      invalidateRange(value);  //add that line
      requestAxisLayout();
      }
      

    Update:

    The problem can be solved without changing the CategoryAxis class just added that line to my code:

    xAxis.setAutoRanging(false); 
    xAxis.setCategories(FXCollections.<String>observableArrayList(Arrays.asList(categories))); 
    xAxis.invalidateRange(Arrays.asList(categories));  // add that line to my code.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this chart in which if any point in graphs exceeds specific limit
I have a very simple highcharts js chart, which has dates on x-axis and
I have a gauge chart which has one arrowIndicator. Im trying to capture the
I have made a simple Line Chart: Which is showing 4 grid-lines at points
I'm using dhtmlx Gantt Chart UI component which have task list and graphical chart.
I have a pie chart made up of 12 slices, which are all within
I have a static empty chart in Excel, I have a macro which pulls
I have this table, which can be seen as a basic custom gantt chart:
I have a generated scanner from flex which the output from is not consumed
I have a Linq Expression, which may be altered depending on certain conditions. An

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.