Keynoteの現在の書類上に2D円グラフを作成するAppleScriptです。
その他、さまざまなKeynote上で作成可能なグラフを作成するAppleScriptについては、電子書籍「Keynote Control with AppleScript」❶❷で解説しています。
AppleScript名:Keynoteで2D円グラフを作成 |
–set aRec to {kanjiNum:24960, kanjiRating:28.0, hiraganaNum:56080, hiraganaRating:62.9, katakanaNum:1063, katakanaRating:1.2, otherNum:7136, otherRating:8.0} –文学(坊ちゃん) –set aRec to {kanjiNum:563289, kanjiRating:22.0, hiraganaNum:1311933, hiraganaRating:51.2, katakanaNum:210161, katakanaRating:8.2, otherNum:478690, otherRating:18.7, totalCount:2564073}–異世界はスマートフォンとともに set aRec to {kanjiNum:364870, kanjiRating:26.7, hiraganaNum:682261, hiraganaRating:50.0, katakanaNum:89109, katakanaRating:6.6, otherNum:230374, otherRating:16.9, totalCount:1366614} –Knight’s and Magic set cCount to (kanjiNum of aRec) set hCount to (hiraganaNum of aRec) set kCount to (katakanaNum of aRec) set oCount to (otherNum of aRec) tell application "Keynote" set aDoc to (make new document with properties {document theme:theme "ホワイト", width:1024, height:768}) –Normal Slide –set aDoc to (make new document with properties {document theme:theme "ホワイト", width:1920, height:1080})–Wide Slide tell front document set aSlide to make new slide at after (first slide) with properties {base slide:master slide "タイトル(上)"} tell aSlide set object text of default title item to "文字種別使用比率" –add chart row names {"文字種別"} column names {"漢字", "ひらがな", "カタカナ", "その他"} data {{cCount, hCount, kCount, oCount}} type pie_2d –group by chart row add chart row names {"文字種別"} column names {"Kanji", "Hiragana", "Katakana", "Other"} data {{cCount, hCount, kCount, oCount}} type pie_2d –group by chart row end tell end tell end tell |
(Visited 305 times, 2 visits today)