Pie chart

The following script generates a pie chart Card using the chart template from static JSON data.

To test this example, create a new Postman GET request to https://postman-echo.com/get, paste the script provided into the Tests tab and click Send. The rendered Card can be viewed in the Visualize tab of the response pane.

To learn how to use Postman request responses with Universal Card Templates, refer to the guide Build a new connector with Postman.

var model = {
    "_card": {
        title: "Traffic Breakdown",
        type: "chart"
    "chart": {
        template: 'pie',
        palette: 'office.Office6',
        configuration: {
            data: {
                labels: [
                datasets: [
                        label: 'Number of visitors',
                        data: [
            options: {
                title: {
                    display: true,
                    text: 'Traffic by country'

var template = `<script id="loader" src="https://components.adenin.com/components/at-card-preview/loader.js"></script>`;

pm.visualizer.set(template, model);

When rendered, the above definition produces the following chart:

Rendered pie chart Card