linkedin / parseq

Asynchronous Java made easier
Apache License 2.0
1.17k stars 267 forks source link

Waterfall view should have dynamic width for SVG DOM #97

Open xxkennyxu opened 8 years ago

xxkennyxu commented 8 years ago

The DOM element for the Waterfall view is statically set to 1220px.

var WIDTH = 960, MARGIN = { top : 40, bottom : 10, left : 10, right : 250 }

var svg = root.append('svg') .attr('width', WIDTH + MARGIN.left + MARGIN.right), vis = svg.append('g') .attr('transform', 'translate(' + MARGIN.left + ',' + MARGIN.top + ')');

This causes a problem when tracing a very complicated call as it crops content once it exceeds the pre-set 1220px width.

It would be very helpful if this width was screen dependent and/or the overflow on the SVG would be handled by a scrollable container or some sort.

jodzga commented 8 years ago

Thanks for reporting this. Could you give an example trace that displays incorrectly? Also, we are accepting PRs ;-)

xxkennyxu commented 8 years ago

Any API call that has nested downstream calls which results in a more complicated trace.

Another reason why the trace exceeds the width, is because if you don't give a descriptor for your ParSeq Task (during .map, .flatmap ...), it will default to the [package].[classname].[method]. Naming will help, but ultimately dealing with the overflow is the only viable solution.

Haha, good point! ;)