Render API documentation and variable picture height

Hello,

I’m working at the moment with grafana and picture rendering.

Now I have two questions:

  1. API Documentation
    I’m a bit confused about the documentation.
    I found out two different ways to render Pictures with the REST API:
  2. Use /render/dashboard-solo
  3. Use /render/dashboard/db/:dasboardname

At the API Documentation http://docs.grafana.org/http_api/ there is now hint about the /render part.

  1. How to get pictures with variable height and full legend
    When I use /render/dashboard-solo, I get a perfect picture. But the legend is cutted when it is a bit longer.
    Is there a way to get a picture with a variable height and the whole legend?

Cheers, Morde

if you use legend in table mode, and specify a high height url parameter

Hello Torkel,

Thank you for you answer.

I still use the legend in table mode. But when I render a picture, than I can see the legend with a scroll bar.
But I can not scroll down when it is a picture.

Yes, you have right, I can define a height which is much bigger, but the graph will be bigger relevant to the legend.
This is not very elegant.

I have an example for you

Yes, the legend does not fit in the height you passed to the render api, there is no auto expand feature, the PNG gets the height you specify

http:///render/dashboard-solo/db/?from=1513036800000&to=1513123199000&panelId=24&width=1700&height=500&refresh=1m&orgId=7

I am hitting this url. But I am getting server side error.Failed to render to png.

http:///dashboard-solo/db/?from=1513036800000&to=1513123199000&panelId=24&width=1700&height=500&refresh=1m&orgId=7
If I hit this url removing render, I can see the image clearly.

Any idea why this is happening?

Thanks in advance.