Need Assistance with graph

Hello everyone,

I hope you’re all doing well. I’m reaching out to this forum because I’m facing a bit of a challenge with a Flux query and I could really use some guidance.

Here’s what I’m trying to achieve: I want to create a cumulative graph that represents the power generated by a solar panel over the course of the last year. However, despite my efforts, I haven’t been able to get the query quite right.

Here’s the Flux query I’ve been working on:

from(bucket: “SolarEMR”)
|> range(start: 2023-01-01T00:00:00Z, stop: 2023-12-31T23:59:59Z)
|> filter(fn: (r) => r[“_measurement”] == “Power”)
|> filter(fn: (r) => r[“ID”] == “121” or r[“ID”] == “124”)
|> filter(fn: (r) => r[“_field”] == “Power”)
|> aggregateWindow(every: 1mo, fn: mean, createEmpty: false)
|> yield(name: “mean”)

What I’m aiming for is to calculate the mean power generated by the solar panel each month and then create a cumulative graph based on these monthly averages over the entire year. However, my current query doesn’t seem to be producing the desired result.

Here are the challenges I’m facing:

  • Time Range Issue: When plotting the data from InfluxDB, I’m only able to see a graph ranging from June 2023 to January 2024, despite the fact that the data in the Influx database spans beyond these dates. I’m puzzled as to why I can’t visualize the entire dataset.
  • Graph Customization: Additionally, I’m having trouble customizing the colors of the graph. It seems that the default colors are being applied, and I can’t find a way to change them to better suit my preferences.

I would greatly appreciate it if someone could point out where I might be going wrong in my query or provide an alternative approach to achieving the desired outcome. Any help or insights would be highly valued.

Thank you in advance for your assistance!

Best regards