Jump to content
Software FX Community

Adding black line at value 0


fxinq1009
 Share

Recommended Posts

Hi fxinq1009

I apologize since I copied code valid for Chart FX 7 and not for Chart FX 6.x for Java.  Unfortunately, Chart FX 6.x for Java does not have the Custom Grid Lines option.  From checking the API, I found a possible workaround.  Please check following code:

AxisSection section1 = chart1.getAxisX().getSections().getItem(0);section1.setFrom(0);section1.setTo(0);section1.setFontStyle(java.awt.Font.BOLD|java.awt.Font.ITALIC);section1.setGridlines(true);section1.setTextColor(java.awt.Color.red);section1.setBackColor(new java.awt.Color(255,0,0,32));section1.getGrid().setColor(section1.getTextColor());section1.getGrid().setWidth(2);

Please note that I am setting FROM and TO values with

Link to comment
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
Reply to this topic...

×   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.

 Share

×
×
  • Create New...