MAIDR JavaScript API
    Preparing search index...
    • Mount MAIDR in a PowerPoint content add-in, for the one chart it reads.

      Call it once Office.js is ready, from Office.onReady. It appends one wrapper to container, reads the presentation, and shows the chart linked -- linking one first, when none is -- and follows PowerPoint between Normal view and the slide show until SlideChartBinding.dispose.

      The presentation is read through Document.getFileAsync, which PowerPoint offers on the web, on Windows, on Mac and on iPad, and unzipped with the browser's DecompressionStream. The link is kept in Document.settings; the view is asked of Document.getActiveViewAsync and followed through activeViewChanged, and, as it opens in Normal view, the slide the add-in is on of Document.getSelectedDataAsync. Without any of those three, it does without: no link kept, Normal view, or a picker to link a chart from.

      Parameters

      • container: HTMLElement

        The element the add-in goes in. A wrapper is appended to it.

      • options: SlideChartOptions = {}

        Where Office.js is, and what the add-in says.

      Returns Promise<SlideChartBinding>

      The binding, once the chart has been read. It never rejects: an add-in that cannot read says so in its figure area.