<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic convertToTimeseriesBand in Developer Q&amp;A Forum</title>
    <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232509#M721</link>
    <description>&lt;P&gt;Hi!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am encountering a problem while trying to convert QueryResult to TimeseriesBand for later use in the Timeseries Band Chart. I am providing arguments for conversion util such as records and types:&lt;BR /&gt;(record is an array of: {timeseries: "", someValue: 2, someAnotherValue: 4}),&lt;BR /&gt;but receiving undefined every time. Is there any special form of data that I should provide as an argument? Is it in general possible to convert any QueryResult and later display it as a&amp;nbsp;Timeseries Band Chart? Maybe this util is for another purpose. Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2023 15:43:21 GMT</pubDate>
    <dc:creator>veranika_k</dc:creator>
    <dc:date>2023-12-20T15:43:21Z</dc:date>
    <item>
      <title>convertToTimeseriesBand</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232509#M721</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am encountering a problem while trying to convert QueryResult to TimeseriesBand for later use in the Timeseries Band Chart. I am providing arguments for conversion util such as records and types:&lt;BR /&gt;(record is an array of: {timeseries: "", someValue: 2, someAnotherValue: 4}),&lt;BR /&gt;but receiving undefined every time. Is there any special form of data that I should provide as an argument? Is it in general possible to convert any QueryResult and later display it as a&amp;nbsp;Timeseries Band Chart? Maybe this util is for another purpose. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 15:43:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232509#M721</guid>
      <dc:creator>veranika_k</dc:creator>
      <dc:date>2023-12-20T15:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: convertToTimeseriesBand</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232532#M722</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67240"&gt;@veranika_k&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am checking internally what the intention of &lt;SPAN&gt;convertToTimeseriesBand is, since we don't have yet documentation available. To me it looks like it should be used convert&amp;nbsp;the output of a &lt;A href="https://developer.dynatrace.com/reference/sdks/client-davis-analyzers/" target="_blank"&gt;davis analyzer&lt;/A&gt; to a band chart&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best,&lt;BR /&gt;Sini&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 18:43:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232532#M722</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-12-20T18:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: convertToTimeseriesBand</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232564#M723</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67240"&gt;@veranika_k&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I just came up with a minimal example for you to try:&lt;/P&gt;
&lt;PRE class="c-mrkdwn__pre" data-stringify-type="pre"&gt;import { useDqlQuery } from "@dynatrace-sdk/react-hooks";
import { Paragraph, ProgressCircle, TimeseriesChart, convertToTimeseriesBand } from "@dynatrace/strato-components-preview";
import React from "react";

export const TimeseriesBandChart = () =&amp;gt; {
  const queryResult = useDqlQuery({
    body: {
      query: `timeseries min = min(dt.host.cpu.usage), max = max(dt.host.cpu.usage)`,
    },
  });

  if (!queryResult.data) {
    return &amp;lt;ProgressCircle /&amp;gt;;
  }
  if (queryResult.data.records.length &amp;lt; 1 || queryResult.data.records[0] === null) {
    return &amp;lt;Paragraph&amp;gt;No data&amp;lt;/Paragraph&amp;gt;;
  }

  const timeseriesBand = convertToTimeseriesBand(queryResult.data.records[0], queryResult.data.types[0]);
  if (!timeseriesBand) {
    return &amp;lt;Paragraph&amp;gt;Could not convert response. Ensure to have field names ending with min/lower and max/upper.&amp;lt;/Paragraph&amp;gt;;
  }

  return (
    &amp;lt;TimeseriesChart&amp;gt;
      &amp;lt;TimeseriesChart.Band data={timeseriesBand.timeseriesBand} /&amp;gt;
    &amp;lt;/TimeseriesChart&amp;gt;
  );
};&lt;/PRE&gt;
&lt;P&gt;Let me know if that helps!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 08:55:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232564#M723</guid>
      <dc:creator>stefan_eggersto</dc:creator>
      <dc:date>2023-12-21T08:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: convertToTimeseriesBand</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232565#M724</link>
      <description>&lt;P&gt;Yes, it seems so. Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 08:55:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232565#M724</guid>
      <dc:creator>veranika_k</dc:creator>
      <dc:date>2023-12-21T08:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: convertToTimeseriesBand</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232570#M725</link>
      <description>&lt;P&gt;I will try and let you know in a moment &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 09:46:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232570#M725</guid>
      <dc:creator>veranika_k</dc:creator>
      <dc:date>2023-12-21T09:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: convertToTimeseriesBand</title>
      <link>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232591#M726</link>
      <description>&lt;P&gt;Works, thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 14:31:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Developer-Q-A-Forum/convertToTimeseriesBand/m-p/232591#M726</guid>
      <dc:creator>veranika_k</dc:creator>
      <dc:date>2023-12-21T14:31:39Z</dc:date>
    </item>
  </channel>
</rss>

