Jump to content
JChartFX Community
  • 0
PhuongNguyen

Can Axis Y be a real number (0.xxx)?

Question

 The AxisY seem to take Integer only. If I pass in a real number like 1.9 it round up to 2 and show in the Axis Y as 2.

Can Axis Y be a real number (0.xxx)?

 

Is there any way to customize the Axis Y to take and show real (float) value?

Thanks

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Internally they are handled as real numbers but our default is to show no decimals, if you want to change how Y axis labels are displayed

chart1.getAxisY().getLabelsFormat().setDecimals(2);

If you only want to change how tooltips are displayed without affecting how labels are shown you can use getDataFormat() instead of getLabelsFormat()

JuanC 

Attachments.zip

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...