Jump to content
JChartFX Community
  • 0

Big problem with customGridLines


danibert1
 Share

Question

3 answers to this question

Recommended Posts

  • 0

I tried your code in 3 different browsers and got the expected result (only 1 gridline) in all of them, the only thing strange (but bening) in your code is that customGridLines.add does not return anything so instead of

var customGridLines = chart1.getAxisY().getCustomGridLines().add(customGrid);

I would write

chart1.getAxisY().getCustomGridLines().add(customGrid);

Can you post a link to an image showing how it looks in your case? Have you tried different browsers? 

JuanC 

Link to comment
Share on other sites

  • 0

I was able to reproduce this.  The issue I had is with animation when no data value is zero along the Y axis.  If animation is turned on the custom grid line draws incorrectly (despite setting scale and attempting other workarounds).  The way to get around this is to render the grid completely and create it, then afterwards do a setTimeout with a delay of 1000 which sets the gridline.  The gridline will then render correctly.

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

×
×
  • Create New...