tell application "Numbers" to tell document 1 to tell active sheet
set aChart to chart 1
# Select the chart
set itsPosition to position of aChart
tell application "System Events" to tell process "Numbers"
set frontmost to true
keystroke "c" using {command down}
end tell
end tell
As far as I know, it’s not documented so maybe it will be broken sometimes.
In fact when I discovered that, I was on the road to use cliclick to click in the chart to select it.
Take care to try if it behave well if the chart is not in the visible area when you call it.
It’s puzzling. When the chart is not visible, the script works flawlessly but when I change the area to display, the chart is not flagged as selected.