Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tooltip is not formatted - TimeSeries panel - 9.3.X+ #478

Open
sbengo opened this issue Apr 18, 2023 · 7 comments
Open

Tooltip is not formatted - TimeSeries panel - 9.3.X+ #478

sbengo opened this issue Apr 18, 2023 · 7 comments
Milestone

Comments

@sbengo
Copy link
Contributor

sbengo commented Apr 18, 2023

Hi @Slach ,

Description:

After upgrading to Grafana 9.3.X, with the latest version of plugin (2.5.3), on TimeSeries panel, the tooltip information is not formated as the legend:

image

It happens when the user tries to change the timerange or the series changes due to variables/templating.

I have tried to debug a bit and test other Datasources and the problems seems to the way that the Dataframe is built and the current Grafana version is not able to format it...

Apologies for opening this issue here instead of Grafana, but wanted to share with you, as I'm not sure that the Draframe is being built as it should

Tested with:

  • plugin version: 2.5.3
  • grafana 9.3.0 (KO), 9.3.7(KO), 9.4.7 (KO), main[pre 9.5] (KO)

Note:

  • grafana 9.2.15 (OK)

Repro case:

  1. Create a Dashboard with altinity-grafana as DS and use some query like the following:
  SELECT
      $timeSeries as t,
      count(<field>) as field,
      <group_column>
  FROM $table
  WHERE $timeFilter
  
  GROUP BY t, <group_column>
  ORDER BY t, <group_column>
  1. Validate that when the user changes the timeRange the tooltip differs from legend and it takes format as:
{name="<group_column_value>"}
  1. Extract the Dataframe
    image

  2. Create new panel using TestDB as Datasource, select RAW Frame and paste the extracted Dataframe:
    image

  3. Validate that the problem is directly related with the current Dataframe spec

Example:

The following Dataframe has been extracted from CH query and modified in order to let you to reproduce the case:
group_column_value = {"serie A"|"serie B"}

[
  {
    "schema": {
      "name": "serie A",
      "fields": [
        {
          "name": "Time",
          "type": "time",
          "config": {}
        },
        {
          "name": "Value",
          "type": "number",
          "config": {}
        }
      ]
    },
    "data": {
      "values": [
        [
          1681776060000
        ],
        [
          1
        ]
      ]
    }
  },
  {
    "schema": {
      "name": "serie B",
      "fields": [
        {
          "name": "Time",
          "type": "time",
          "config": {}
        },
        {
          "name": "Value",
          "type": "number",
          "config": {}
        }
      ]
    },
    "data": {
      "values": [
        [
          1681776060000
        ],
        [
          1
        ]
      ]
    }
  }
]
@sbengo
Copy link
Contributor Author

sbengo commented Apr 27, 2023

Hi @Slach , to add more info, I found that on the following Grafana dashboard there is the same behaviour, as the legend values is different than the shown tooltip

https://play.grafana.org/d/data-frame-scenarios-timeseries-panel/data-frame-scenarios-timeseries-panel?orgId=1&var-scenario=multi-frame&var-resultState=success&var-generator=frontend

Note that if you edit the panel and you add a "dummy" transformation like Join by fields -> OUTER Time and then you disable it again, the tooltip is well formatted. For some reason its the first time that it renders the panel...

image

@cjw296
Copy link

cjw296 commented May 18, 2023

My experience has been that the tooltips are correctly formatted on first load, but any change after that causes this issue to occur.
That includes an automatic reload of the data on the page...

@sbengo
Copy link
Contributor Author

sbengo commented Jun 1, 2023

@Slach , @cjw296 as I supposed, it was a Grafana problem.
The following PR grafana/grafana#69289 fixes it (tested locally with docker :main) and working fine.

Note the related issue, as some other DS plugin owner reported it to Grafana

@Slach , as it is suggested, a legacy format (Time/Value) is being used, it would be convenient to adapt to the recommended dataframe format

Closing this issue.
Thanks,
Regards

@sbengo sbengo closed this as completed Jun 1, 2023
@Slach
Copy link
Collaborator

Slach commented Jun 1, 2023

@sbengo thanks for sharing your feedback

@sbengo
Copy link
Contributor Author

sbengo commented Aug 31, 2023

Hi @Slach , we have upgraded Grafana to 10.0.3 and I was wrong: the issue has been fixed when the user changes the variables, but for some reason, when the user changes the range time, the panel renders with bad format, as explained on this issue.

I think that Grafana team missed that case, as I reproduced it on the play.grafana dashboard:

https://play.grafana.org/d/data-frame-scenarios-timeseries-panel/data-frame-scenarios-timeseries-panel?orgId=1&var-scenario=multi-frame&var-resultState=success&var-generator=frontend

@sbengo sbengo reopened this Aug 31, 2023
@sbengo
Copy link
Contributor Author

sbengo commented Aug 31, 2023

@Slach , I have already asked on the original issue: grafana/grafana#69207 (comment)

@Slach
Copy link
Collaborator

Slach commented Sep 13, 2023

@sbengo let's wait when grafana/grafana#74281 will resolve

@Slach Slach added this to the 3.3.0 milestone Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants