Jump to content
JChartFX Community
  • 0

"java is not defined" error thrown when using java.awt.Point method


I want to customize the point label position for the jchartfx chart. From jChartFX API Documentation, I have found the following method to do it

chart1.getAllSeries().getPointLabels().setOffset(new java.awt.Point(4, 5)); 

but it is throwing "java is not defined" error in console for all browsers. Could any one can help me to customize the point label position?

Note: The Alignment attributes "cfx.StringAlignment.Near, cfx.StringAlignment.Far and cfx.StringAlignment.Center" are not needed in my case.

Thanks in advance.


Share this post

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

The documentation is incorrect (it was probably copied/translated from our Java desktop docs).

To set the offset you have to pass a string with the X and Y separated by a comma, e.g.



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.

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.


  • Create New...