diff --git a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/StickyTransactionProperties.tsx b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/StickyTransactionProperties.tsx index 1e8fe00a8f382..339103c8c08c7 100644 --- a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/StickyTransactionProperties.tsx +++ b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/StickyTransactionProperties.tsx @@ -55,7 +55,7 @@ export function StickyTransactionProperties({ }, { label: '% of trace', - val: asPercent(duration, totalDuration), + val: asPercent(duration, totalDuration, 'N/A'), width: '25%' }, { diff --git a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/WaterfallItem.tsx b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/WaterfallItem.tsx index 999a5d96efa4a..b917db2c25685 100644 --- a/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/WaterfallItem.tsx +++ b/x-pack/plugins/apm/public/components/app/TransactionDetails/Transaction/WaterfallContainer/Waterfall/WaterfallItem.tsx @@ -31,8 +31,6 @@ const ItemBar = styled('div')` box-sizing: border-box; position: relative; height: ${px(unit)}; - left: ${props => props.left}%; - width: ${props => props.width}%; min-width: 2px; background-color: ${props => props.color}; `; @@ -40,11 +38,9 @@ const ItemBar = styled('div')` // Note: "direction: rtl;" is here to prevent text from running off of // the right edge and instead pushing it to the left. For an example of // how this works, see here: https://codepen.io/sqren/pen/JrXNjY -const SpanLabel = styled<{ left: number }, any>('div')` +const SpanLabel = styled.div` white-space: nowrap; position: relative; - left: ${props => `${props.left}%`}; - width: ${props => `${Math.max(100 - props.left, 0)}%`}; direction: rtl; text-align: left; margin: ${px(units.quarter)} 0 0; @@ -133,8 +129,16 @@ export function WaterfallItem({ isSelected={isSelected} onClick={onClick} > - -