Skip to content

Commit 3a3ca42

Browse files
chore: removing the regenerator package for the click examples (#27)
1 parent f70a77e commit 3a3ca42

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

examples/click-events-basic/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
},
1010
"dependencies": {
1111
"@mongodb-js/charts-embed-dom": "^2.1.0-beta.1",
12-
"regenerator-runtime": "^0.13.3",
1312
"parcel": "^1.12.4"
1413
},
1514
"devDependencies": {
1615
"@babel/core": "^7.8.4",
1716
"@babel/preset-env": "^7.8.4",
1817
"parcel-bundler": "^1.6.1"
1918
},
20-
"keywords": []
19+
"keywords": [],
20+
"browserslist": [
21+
"since 2020"
22+
]
2123
}

examples/click-events-basic/src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import "regenerator-runtime/runtime";
21
import ChartsEmbedSDK from "@mongodb-js/charts-embed-dom";
32

43
const sdk = new ChartsEmbedSDK({

examples/click-events-filtering/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99
},
1010
"dependencies": {
1111
"@mongodb-js/charts-embed-dom": "^2.1.0-beta.1",
12-
"regenerator-runtime": "^0.13.3",
1312
"parcel": "^1.12.4"
1413
},
1514
"devDependencies": {
1615
"@babel/core": "^7.8.4",
1716
"@babel/preset-env": "^7.8.4",
1817
"parcel-bundler": "^1.6.1"
1918
},
20-
"keywords": []
19+
"keywords": [],
20+
"browserslist": [
21+
"since 2020"
22+
]
2123
}

examples/click-events-filtering/readme.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ When you embed charts using the Embedding SDK, you are able to subscribe to even
1313
#### The features included in this demo are as follows:
1414

1515
- Adding a click event handler to a chart, using code similar to:
16+
1617
```
17-
chart.addEventListener("click", callback);
18+
chart.addEventListener("click", callback, options);
1819
```
19-
- Parsing the payload returned by the click event to determine if the event's `target` is of type `mark`
20+
21+
- Adding an option to make just certain parts of the chart clickable (in this case only the bars)
2022
- Generating an MQL filter document based on the data returned in the payload
2123
- Filtering a second chart using the `setFilter` method
2224

23-
2425
## Quickstart
2526

2627
_The following steps presume the use of npm, though yarn works as well._
@@ -60,6 +61,7 @@ This sample is preconfigured to render a specific chart. You can run the sample
6061
## Running this Sample with your data
6162

6263
1. If you do not wish to use our sample data and have completed the above steps to prepare your own chart for embedding,
64+
6365
- Open the _index.js_ file (`src/index.js`)
6466
- Replace the `baseUrl` string on with the base URL you copied from the MongoDB Charts Embedded Chart menu (look for "\~REPLACE\~" in the comments)
6567
- Replace the `chartId` string on with the chart ID you copied from the MongoDB Charts Embedded Chart menu (look for "\~REPLACE\~" in the comments)

examples/click-events-filtering/src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import "regenerator-runtime/runtime";
21
import ChartsEmbedSDK from "@mongodb-js/charts-embed-dom";
32

43
const sdk = new ChartsEmbedSDK({

0 commit comments

Comments
 (0)