Read a pie panel's bounds as the union of its wedges' boxes.
An am5percent chart has no plotContainer — it has no plot area, which
is why AmChart.plotContainer is optional — so readPlotBounds
reports nothing for it and the binder, which suppresses a highlight it cannot
clip to a panel, would leave every pie in a multi-panel root unhighlighted.
The union of the wedges' boxes is the rectangle the pie occupies: the panel
rectangle the overlay needs, in the same root-relative CSS px
readPlotBounds returns.
Each wedge is measured with wedgeBounds rather than by its reported
globalBounds(), which is a degenerate point (#774). Unioning those points
produced a zero-area panel rectangle — non-null, so the binder's
suppression never fired, and every highlight was instead clipped away to
nothing.
Returns null when no wedge reports usable geometry — an XY chart, whose
data items carry no slice at all, or a pie asked before its first layout.
The caller then behaves exactly as it does today, so a chart this cannot
measure loses a highlight rather than gaining a misplaced one.
Read a pie panel's bounds as the union of its wedges' boxes.
An am5percent chart has no
plotContainer— it has no plot area, which is why AmChart.plotContainer is optional — so readPlotBounds reports nothing for it and the binder, which suppresses a highlight it cannot clip to a panel, would leave every pie in a multi-panel root unhighlighted. The union of the wedges' boxes is the rectangle the pie occupies: the panel rectangle the overlay needs, in the same root-relative CSS pxreadPlotBoundsreturns.Each wedge is measured with wedgeBounds rather than by its reported
globalBounds(), which is a degenerate point (#774). Unioning those points produced a zero-area panel rectangle — non-null, so the binder's suppression never fired, and every highlight was instead clipped away to nothing.Returns
nullwhen no wedge reports usable geometry — an XY chart, whose data items carry nosliceat all, or a pie asked before its first layout. The caller then behaves exactly as it does today, so a chart this cannot measure loses a highlight rather than gaining a misplaced one.