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

Captions cut if panel height limited #119

Closed
sfl3005 opened this issue Mar 19, 2019 · 8 comments
Closed

Captions cut if panel height limited #119

sfl3005 opened this issue Mar 19, 2019 · 8 comments

Comments

@sfl3005
Copy link

sfl3005 commented Mar 19, 2019

Hi,
grafana-reporter is a wonderfull tool and I use it day to day !
I encountered an issue when generating pdf report on a graph with more than 6 items. On the graph all items are present but only 6 items are displayed on the graph caption.

how can I increase caption item count in pdf report ?
2019-03-19 11_17_01-Grafana - Report

2019-03-19 11_22_15-pdf report

Thanks in advance

@IzakMarais
Copy link
Owner

Hi,

Thanks, I'm glad to hear you are finding the reporter valuable.

The reporter calls grafana to render the panel PNGs. This uses an API that is also exposed on the Grafana UI; so can test whether you get the same results there? To do this you need to go to the panel menu -> Share -> Direct link rendered image.

@sfl3005
Copy link
Author

sfl3005 commented Mar 19, 2019

It is the same results with Direct Link as in grafana UI.
All 10 captions are present.

@IzakMarais
Copy link
Owner

IzakMarais commented Mar 19, 2019 via email

@sfl3005
Copy link
Author

sfl3005 commented Mar 19, 2019

this graph is Id 7.
In reporter logs:
2019/03/19 15:40:05 Downloading image 7 http://localhost:3000/render/d-solo/Qikclw8ik/_?from=1552984704856&height=500&panelId=7&theme=light&to=1553006304857&width=1000

In Grafana logs:
t=2019-03-19T15:40:05+0100 lvl=info msg=Rendering logger=rendering path="d-solo/Qikclw8ik/_?from=1552984704856&height=500&panelId=7&theme=light&to=1553006304857&width=1000"

If I use this URL (with height=1000), graph is diplayed correctly as you can see below
http://localhost:3000/render/d-solo/Qikclw8ik/_?from=1552984704856&height=1000&panelId=7&theme=light&to=1553006304857&width=1000
2019-03-19 16_23_11-Clipboard

@sfl3005
Copy link
Author

sfl3005 commented Mar 20, 2019

Do you know why the height had to manually be increased to obtain all the caption ?

How this can be integrated in the template ?

@IzakMarais
Copy link
Owner

This will require some investigation. At the moment the reporter hard codes the size of the png it requests, but corner cases like these makes it clear the approach should be improved somehow.

Any feedback or ideas are welcome.

@IzakMarais IzakMarais changed the title Caption item count in pdf report is limited to six Captions cut if panel height limited Mar 27, 2019
@IzakMarais
Copy link
Owner

Loosely related to #72

@IzakMarais
Copy link
Owner

Solved by enabling new grid-layout flag (-grid-layout=1).

See #162 (comment) for an example.

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

2 participants