1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "data": {
12 "type": "bar",
13 "title": "Monthly revenue",
14 "subtitle": "Example data, USD",
15 "labels": [
16 "Jan",
17 "Feb",
18 "Mar",
19 "Apr",
20 "May",
21 "Jun"
22 ],
23 "values": [
24 4200,
25 5100,
26 4800,
27 6400,
28 7100,
29 8300
30 ],
31 "format": "currency",
32 "highlight": "Jun"
33 }
34};
35
36
37const run = await client.actor("rowhouse/platemark").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47