Skip to content

Commit a8cfa26

Browse files
committed
docs: add Automizer.modify to example
1 parent 7c7d665 commit a8cfa26

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ npm install pptx-automizer
2525
## Example
2626
```js
2727
import Automizer from "pptx-automizer"
28-
import { setPosition, setChartData, dump } from "pptx-automizer/helper/modify"
2928

3029
// First, let's set some preferences
3130
const automizer = new Automizer({
@@ -64,9 +63,9 @@ pres.addSlide('image', 1, (slide) => {
6463
pres.addSlide('shapes', 2, (slide) => {
6564
slide.modifyElement('Drum', [
6665
// You can use some of the builtin modifiers to edit a shape's xml:
67-
setPosition({x: 1000000, h:5000000, w:5000000}),
66+
Automizer.modify.setPosition({x: 1000000, h:5000000, w:5000000}),
6867
// Log your target xml into the console:
69-
dump
68+
Automizer.modify.dump
7069
])
7170
})
7271

@@ -75,7 +74,7 @@ pres.addSlide('charts', 2, (slide) => {
7574
slide.modifyElement('ColumnChart', [
7675
// Use an object like this to inject the new chart data.
7776
// Make sure there is enough space in the template chart.
78-
setChartData({
77+
Automizer.modify.setChartData({
7978
series: [
8079
{ label: 'series 1' },
8180
{ label: 'series 2' },

0 commit comments

Comments
 (0)