We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can not find out how to draw a polyline with discontinuities (Sprungstellen) in javascript? Is this even possible?
An intuitive solution would be to set corresponding x,y pairs to null.
The text was updated successfully, but these errors were encountered:
Hi @etm,
using NaN for x and y should produce discontinuities in a polyline:
NaN
x
y
<!doctype html> <html lang="en-us"> <head> <meta charset="utf-8"> <title>Polyline using gr.js</title> </head> <body> <canvas id="example-canvas" width="500" height="500"></canvas> <script src="https://gr-framework.org/downloads/gr-latest.js"></script> <script> GR.ready(function() { var gr = new GR('example-canvas'); gr.setviewport(0, 1, 0, 1); var x = new Array(100); var y = new Array(100); x[0] = y[0] = 0; x[1] = 0.5; y[1] = 1; x[2] = y[2] = NaN; x[3] = 0.5; y[3] = 0; x[4] = y[4] = 1; gr.polyline(5, x, y); }); </script> </body> </html>
Sorry, something went wrong.
No branches or pull requests
I can not find out how to draw a polyline with discontinuities (Sprungstellen) in javascript? Is this even possible?
An intuitive solution would be to set corresponding x,y pairs to null.
The text was updated successfully, but these errors were encountered: