# Fun with Dashboarding and Strato

**URL:** <https://community.dynatrace.com/t/fun-with-dashboarding-and-strato/50362>\
**Category:** Dashboarding\
**Tags:** dashboards\
**Created:** [February 20, 2025, 1:27pm UTC](https://community.dynatrace.com/t/fun-with-dashboarding-and-strato/50362 "2025-02-20T13:27:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [February 20, 2025, 1:27pm UTC](https://community.dynatrace.com/t/fun-with-dashboarding-and-strato/50362/1 "2025-02-20T13:27:58Z")

</div>

Hello,

Nice to know (-; you can reuse lots of strato components in your dashboard, so you can start paddling before you start swimming (-;

 ![henk_stobbe_0-1740057865792.png](https://global.discourse-cdn.com/dynatrace/original/3X/0/c/0c89e715338ebda9d9f1c017c82a381d82f414d0.png)

In your Dashboard code:

import type { TableColumn } from ‘@dynatrace/strato-components-preview/tables’;  
import { DataTable } from ‘@dynatrace/strato-components-preview/tables’;

export default async function () {  
const sampleColumns: TableColumn[] = [  
{  
header: ‘Host’,  
accessor: ‘host’,  
ratioWidth: 1,  
},  
{  
header: ‘Traffic’,  
accessor: ‘traffic’,  
ratioWidth: 1,

( . . .)

resulting dashboard:

 ![henk_stobbe_1-1740058001611.png](https://global.discourse-cdn.com/dynatrace/original/2X/4/48a753165944b4ecc55e5f196cf1c88eea96de1d.png)

KR Henk

---

<div class="post-metadata">

**Author:** ![f\_selvanadin](https://avatars.discourse-cdn.com/v4/letter/f/258eb7/32.png) [@f\_selvanadin](https://community.dynatrace.com/u/f_selvanadin)\
**Post date:** [April 23, 2025, 5:05pm UTC](https://community.dynatrace.com/t/fun-with-dashboarding-and-strato/50362/2 "2025-04-23T17:05:38Z")

</div>

Hello Henk,

I’ve just tried to create code tile that is running a strato component code.

But I get this error.

Do you know can I fix it?

Thank you

Best regards

Freddy

```javascript
{
  "error": {
    "code": 541,
    "message": "Execution crashed.",
    "details": {
      "logs": null,
      "type": "BAD_REQUEST",
      "message": "Parse error: Expected '>', got 'columns' at file:///script.ts:76:21\n\n return <DataTable columns={columns} data={data} />;\n ~~~~~~~",
      "details": {
        "sourceLine": " return <DataTable columns={columns} data={data} />;",
        "lineNumber": 76,
        "startColumn": 21
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [April 24, 2025, 8:01am UTC](https://community.dynatrace.com/t/fun-with-dashboarding-and-strato/50362/3 "2025-04-24T08:01:52Z")

</div>

Good morning,

 ![henk_stobbe_0-1745481557861.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/e/eecd9032ad54a76d094709fd780c3cf0311da6a8.png)

The error is basically, you can not use JSX in a dashboard. I have completed the example so this should make it clear.

Have fun!

/\*  
\* This function will run in the DYNATRACE JavaScript runtime.  
\* For information visit [App functions | Dynatrace Developer](https://dt-url.net/functions-help)  
\*/

import type { TableColumn } from ‘@dynatrace/strato-components-preview/tables’;  
import { DataTable } from ‘@dynatrace/strato-components-preview/tables’;

export default async function () {  
const sampleColumns: TableColumn[] = [  
{  
header: ‘Host’,  
accessor: ‘host’,  
ratioWidth: 1,  
},  
{  
header: ‘Traffic’,  
accessor: ‘traffic’,  
ratioWidth: 1,  
}]

return sampleColumns;  
}

---

<div class="post-metadata">

**Author:** ![f\_selvanadin](https://avatars.discourse-cdn.com/v4/letter/f/258eb7/32.png) [@f\_selvanadin](https://community.dynatrace.com/u/f_selvanadin)\
**Post date:** [April 24, 2025, 12:02pm UTC](https://community.dynatrace.com/t/fun-with-dashboarding-and-strato/50362/4 "2025-04-24T12:02:24Z")

</div>

Thank you very much&nbsp;Henk
