Invalid conditions cause non stop display of pop ups


« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by ByteBlocks on 26th March 2013
Under certain conditions, the library ends up generating non stop display of pop up messages. Here is what I tried.
gutter.left = 35
gutter.right = 400

canvas width = 400

Now this will cause negative width and position for chart area itself. When this happens, rendering gets itself into a condition where it wants to throw alert messages and this goes into a non stop loop. I could not even close the instance of browser at that point. Only thing I was able to do was kill my browser from task manager.

Posted by RGraph support on 26th March 2013
Hi there,

Well you're not leaving any room for the chart. Reduce the right gutter to 40 instead of 400.


Richard, RGraph Support

1 Year Priority Support now reduced to £299:
   www.rgraph.net/support
Posted by ByteBlocks on 26th March 2013
What I am saying is that library needs to protect against such user mistakes and not go into runaway condition that makes a browser unusable for the user. The rendering should just stop at first sign of such conditions and not just keep running in loop.

Thanks
Posted by RGraph support on 26th March 2013
Hi there,

Adding warnings for every possible user error would add a significant amount of bloat.


Richard, RGraph Support

1 Year Priority Support now reduced to £299:
   www.rgraph.net/support
Posted by ByteBlocks on 26th March 2013
Is there some switch to supress these messages? Or atleast allow customization of these error messages. From usability point of view, sending a page into run away condition is something we do not like to do for our clients.
Is this library does not provide such facility then we will look into modifying the code ourselves?

Thanks
Posted by Enter your name... on 26th March 2013
Hi there,

You could redefine the alert function:

window.alert = function (msg)
{
     // ...
}

Richard, RGraph support
RGraph - HTML5 and Javascript charts
www.rgraph.net

Add a reply

 




« Back to message list
RGraph on social media