Builds a scoped CSS selector targeting chart data elements inside the
container.
Google Charts renders its SVG inside the container <div>. The chart-area
data elements live inside a <g> with a clip-path attribute, which
distinguishes them from axes, gridlines, legends, and background rects.
We prefer the narrower g[clip-path] > <element> selector; if no
clip-path group exists we fall back to the broader svg <element>.
Parameters
container: HTMLElement
The container element holding the chart SVG
elementSelector: string
The element type to target (e.g., 'rect', 'circle', 'path')
Returns string|undefined
A CSS selector string, or undefined when no matching elements
are found.
Builds a scoped CSS selector targeting chart data elements inside the container.
Google Charts renders its SVG inside the container
<div>. The chart-area data elements live inside a<g>with aclip-pathattribute, which distinguishes them from axes, gridlines, legends, and background rects. We prefer the narrowerg[clip-path] > <element>selector; if no clip-path group exists we fall back to the broadersvg <element>.