NatelEnergy / grafana-plotly-panel

Show plotly graph in grafana panel
MIT License
145 stars 58 forks source link

Autosize enabling on refresh #15

Closed MykytaLiashenko closed 6 years ago

MykytaLiashenko commented 7 years ago

Hi.

Currently we got a bug with Scatter3D plot. We need to draw a line and limit X, Y and Z axis range from -1 to 1. Most times our line size is less than those range and our plot become smaller and fits the line size. In panels' json in layout field we have "autosize" : false, so this behavior is confusing.

Our team has made an investigation and find that the problem is in Plotly.redraw function call in onRefresh handler. Before this call we have this.layout.autosize equal to false, but right after that on isAxisVisible function call we have this.layout.autosize equal to true.

We definitely need to have our axis size from -1 to 1 at any time.

Could you please check the code and fix this problem?

Thanks

ryantxu commented 7 years ago

if you make a pull request, that can be incorporated quickly... otherwise i can try to take a look in the next while

ryantxu commented 6 years ago

Is this the same as #22?

If not, can you describe this more?