ae3e / ae3e-plotly-panel

Plotly panel for Grafana
Apache License 2.0
94 stars 24 forks source link

Time range controls not working #25

Open t3ch9 opened 3 years ago

t3ch9 commented 3 years ago

When I change the time range via the Grafana time picker dropdown UI, the graph does not update. Is this plugin compatable with the Grafana time picker UI? image

RedShift1 commented 3 years ago

Does your query include the time boundaries?

t3ch9 commented 3 years ago

In my query I have the following: image

In Query options, I have the following: image

in the Plotly Layout section, I have tried both of the following settings for the xaxis and yaxis "autorange": true "autorange": false

If the setting is "autorange": false, the graph disappears.

ae3e commented 3 years ago

Does it work with the default chart's values and 'random walk' data when you create a new panel? Also try to log your data with console.log(data) in the script field in order to be sure that data exist...

jcrumley commented 3 years ago

Hello! I am experimenting with the Plotly Panel and am having the same problem (I think). The following example I think illustrates the problem and answers your question... 1) The top panel only has a Plotly panel on it and changes as the time selector is changed. 2) The second panel has a Plotly panel on it and is bound to a query and does not change the time selector is changed. 3) The third panel is a duplicate of panel #2 but the visualization has been changed to a Graphana Graph and it works.

image

The datasource is a csv file...

image

Any suggestions or additional questions would be welcome.

Thanks,

John

ae3e commented 3 years ago

In fact, the time range of the Plotly panel isn't based on the date/time picker UI but only on the data returned by the datasource. So if the datasource doesn't use Grafana's time boundaries, data are always the same whatever the time range is and then Plotly panel keeps displaying all the data.

It could be an enhancement (as an option? because Plotly charts don't have to be timeseries) to force Plotly panel x axis to fit global date/time picker.

jcrumley commented 3 years ago

Thank you for the explanation. To recap the explanation

  1. Some data sources respond to the time picker in the UI
  2. Some visualizations respond to the time picker in the UI
  3. For the case of the combination I am using (plotly + Infinity data source), apparently neither respond to the UI so the scale does not change.

I am not sure if most data sources respond to the time picker. If they do, I'm not sure how critical the enhancement would be. If most don't, then I think it would be an important enhancement to allow mixing and matching of ploly visualizations with others.