-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
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
Component exceeds its assigned dimensions #295
Comments
I think most demo pages do not hit this as they do not try to optimize screen estate. But embedding the component in a page that tries to (elegantly) maximize display estate, and the liberal sizing gets prohibitive... I think we can see the effect even on highly polished pages the use it such as https://sensortower.com/visualizing-the-ios-app-store. I believe it should be directly observable when using percent sizing of the containing div:
Using the parallel coordinates height and width api to provide the desired dimensions like so:
|
One of the sizing issues, a ~2px larger canvas than the container, is an extra buffer for stroke widths on the polylines. Without it, strokes along the bottom of the canvas get clipped. A way to resolve that is to have all the scales use a max range which is the height minus the buffer size (height-2 for example). See the http://bl.ocks.org/syntagmatic/c9fb69e425a3c07cfbd09169941fbf46 |
This is really a great implementation.
It seems that the svg element created by the library, under the div provided to it a la
var parcoords = d3.parcoords()("#parCoords")
, exceeds the pixel size of the host div. This stands in the way of elegantly embedding the component in elaborate pages when layout precision is important. E.g. it is very hard or impossible to hack a perfect viewport fit like this, in pages that are tailored to fit the entire viewport.This is meant when providing the div's dimensions to the api's
width
andheight
, in the hope of getting the component drawn within the provided dimensions.The text was updated successfully, but these errors were encountered: