JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://axibase.com/atsd/axibase-atsdApi-bundle.min.js"></script>
<div id="staticPlotContainer" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

JavaScript

$(function () {
            var startTime = Date.now() - 1 * 3600 * 1000,
                    endTime = Date.now();

            var postData = [
                {
                    startTime: startTime,
                    endTime: endTime,
                    entity: "atsd",
                    metric: "jvm_memory_used",
                    tags: {host: ["NURSWGVML007"]},
                    aggregate: {
                        types: ["DETAIL", "AVG"],
                        period: {
                            count: 2,
                            unit: "MINUTE"
                        }
                    }
                }
            ];

            var client = axibase.atsdClient("https://axibase.com");
            client.series.queries(postData)
                    .then(function(response) {
                        return response.series.reduce(function(previousValue, currentValue, index, array) {
                            if (currentValue.aggregate.type === "DETAIL") {
                                previousValue["memoryUsedDetail"] = currentValue;
                            } else if (currentValue.aggregate.type === "AVG") {
                                previousValue["memoryUsedAvg"] = currentValue;
                            } else {
                                throw new Error("Unrecognised type found!");
                            }
                            return previousValue;
                        }, {});
                    })
                    .then(function (seriesMap) {
                        var memoryUsedDetail = seriesMap["memoryUsedDetail"],
                            memoryUsedAvg = seriesMap["memoryUsedAvg"];

                        $('#staticPlotContainer').highcharts({
                            title: {
                                text: "JVM memory used"
                            },
                            xAxis: {
                                type: "datetime"
                            },
 ...