grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
133 stars 20 forks source link

is there a way to combine multiple SceneDataTransformers? #856

Closed LouaiMaayah1 closed 1 month ago

LouaiMaayah1 commented 1 month ago

is there a way where multiple SceneDataTransformers can be merged or combined?

Wanted action

 const transformedData1 = new SceneDataTransformer({
    $data: queryRunner1,
    transformations: transformations1,
  });

  const transformedData2= new SceneDataTransformer({
    $data: queryRunner2,
    transformations: transformations2,
  });

  const transformedData3 = new SceneDataTransformer({
    $data: queryRunner3,
    transformations: transformations3,
  });

const combinedData = Combine([transformer1,transformer2,transformer3])
const scene = new EmbeddedScene({
$data: combinedData
})

is there anything close to this, where when i access the Panel data and all the series are just stacked on top of each other.

dprokop commented 1 month ago

@LouaiMaayah1 - as of now there is no built in way of achieving this. You could implement a custom SceneDataProvider to achieve handle the data merging, tho the library does not provide such an object yet.