Showing results for 
Show  only  | Search instead for 
Did you mean: 




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:
(record is an array of: {timeseries: "", someValue: 2, someAnotherValue: 4}),
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 Timeseries Band Chart? Maybe this util is for another purpose. Thank you!


Dynatrace Champion
Dynatrace Champion

Hi @veranika_k 


I am checking internally what the intention of convertToTimeseriesBand is, since we don't have yet documentation available. To me it looks like it should be used convert the output of a davis analyzer to a band chart



Yes, it seems so. Thank you! 

Dynatrace Mentor
Dynatrace Mentor

Hi @veranika_k ,

I just came up with a minimal example for you to try:

import { useDqlQuery } from "@dynatrace-sdk/react-hooks";
import { Paragraph, ProgressCircle, TimeseriesChart, convertToTimeseriesBand } from "@dynatrace/strato-components-preview";
import React from "react";

export const TimeseriesBandChart = () => {
  const queryResult = useDqlQuery({
    body: {
      query: `timeseries min = min(, max = max(`,

  if (! {
    return <ProgressCircle />;
  if ( < 1 ||[0] === null) {
    return <Paragraph>No data</Paragraph>;

  const timeseriesBand = convertToTimeseriesBand([0],[0]);
  if (!timeseriesBand) {
    return <Paragraph>Could not convert response. Ensure to have field names ending with min/lower and max/upper.</Paragraph>;

  return (
      <TimeseriesChart.Band data={timeseriesBand.timeseriesBand} />

Let me know if that helps!

I will try and let you know in a moment 🙂

Works, thanks a lot!

Featured Posts