}
private void sizeEventBar(Element elem) {
SluggishnessVisualization visualization = eventWaterfall.getVisualization();
int cellWidth = visualization.getTimeline().getCurrentGraphWidth();
SluggishnessModel model = visualization.getModel();
double totalDuration = model.getCurrentRight() - model.getCurrentLeft();
assert totalDuration > 0 : "Attempted to render row with 0 duration window";
double duration = getEvent().getDuration();
double domainToPixels = (cellWidth / totalDuration);
double barPixelWidth = Math.max(duration * domainToPixels, 1);
double barOffset = (getEvent().getTime() - model.getCurrentLeft())
* domainToPixels;
EventWaterfallRow.Css css = resources.eventWaterfallRowCss();
final Element graphElem = eventBreakdown.getRenderedCanvasElement();
final Style graphStyle = graphElem.getStyle();