Is it possible to link a chart in Keynote to a table in Numbers?

Is it possible to draw a chart in keynote (Ver 6.6.1, 2015) that is linked to a table in Numbers(Ver 3.6.1, 2015) in such a way that the chart can be refreshed/updated whenever changes are made in Numbers?


There are one or two tutorial videos, perhaps 3-4 yr old, on youtube that show the Refresh Tab alongside the Chart but i can't find such option in the Keynote. My machine has OS X EI Capitan, Ver 10.11.6, keynote (Ver 6.6.1, 2015), Numbers(Ver 3.6.1, 2015).


Thanks

MacBook Air, OS X El Capitan (10.11.6)

Posted on Jun 7, 2017 11:56 PM

Reply
8 replies

Jun 8, 2017 12:43 PM in response to IPMAC2015

The simple script below updates a Keynote slide based on changes made in a Numbers document. Copy-paste it into Script Editor (in Applications > Utilities). In Keynote navigate to the slide with the chart you want to update. Click anywhere in the data source table in Numbers. Click the 'run' button in Script Editor.


User uploaded file



If you haven't used Script Editor on your machine before, enable it at System Preferences > Security & Privacy > Privacy > Accessibility.


This can be customized for chart type, etc.


SG



tell application "Numbers"

tell front document to tell active sheet

tell (first table whose selection range's class is range)

set chartTitle to name

set colNames to (row 1's cells 2 thru -1)'s value

set rowNames to (column 1's cells 2 thru -1)'s value

set chartData to (rows 2 thru -1)'s (cells 2 thru -1)'s value

end tell

end tell

end tell


tell application "Keynote"


activate

tell front document's current slide

set default title item'sobject text to chartTitle

if existschart 1 then deletechart 1


add chartrow namesrowNamescolumn namescolNames ¬


datachartDatatypevertical_bar_2dgroup bychart row

end tell

end tell

Jun 8, 2017 7:03 AM in response to IPMAC2015

IPMAC2015 wrote:


Is it possible to draw a chart in keynote (Ver 6.6.1, 2015) that is linked to a table in Numbers(Ver 3.6.1, 2015) in such a way that the chart can be refreshed/updated whenever changes are made in Numbers?


AppleScript can create a chart in Keynote, as described here. This data could easily be retrieved from Numbers data. So you could generate a new chart in Keynote after updating Numbers data. How practical this would be in your situation depends, though, on the specifics of your Numbers and Keynote documents.


If you frequently need to do chart updates and are interested in such an approach, you can post further details.


SG

Jun 13, 2017 5:32 AM in response to IPMAC2015

IPMAC2015 wrote:


Although i feel uncomfortable with this coding thing


What coding? The coding's already done. All you need to do is copy-paste, open a Keynote document to the slide you want, click a Numbers table, and click 'Run'. Within a minute or so you'll have it going. Thereafter it's basically a one-click update, just as in the video. And like all scripts once you've got it working this one can be installed in your menu, so you don't have to bother with Script Editor.


SG

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Is it possible to link a chart in Keynote to a table in Numbers?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.