Closed yannh closed 9 years ago
Good idea.
Tried to play around with that. Easy to implement but looks super ugly at the moment. Problem is that in grafana-1.x panel height sets up the height of the graph so when you have graphs with different amounts of targets (different amounts of space used under graph) you end up with all graphs having a bit different height. Then graphs get automatically rearranged by grafana and big gaps appear in the dashboard. This should be fixed with grafana2 (https://github.com/grafana/grafana/issues/1914#issuecomment-97869692). I'll come back to this issue after porting to grafana-2.x.
Added possibility to configure span per panel. Now if you want to arrange two of your graphs to be in one row you can assign 'span: 6' to plugins panel configuration.
Example: I want my redis memory and commands show up in one row.
plugins.redis.memory = {
'graph': {
'used_memory': { 'color': '#447EBC' },
},
'panel': {
'title': 'Redis Memomy',
'y_formats': [ 'bytes' ],
'span': 6,
},
};
plugins.redis.commands = {
'graph': {
'commands_processed': { 'color': '#447EBC' },
},
'panel': {
'title': 'Redis Commands',
'span': 6,
},
};
For better graph scalability in case of multiple metrics per graph (>3) I would advice to add:
'legend': {
'alignAsTable': true,
'hideEmpty': true,
to plugins 'panel' configuration. This will enforce the above described behaviour when graph will shrink to up to 50% to accommodate for the bigger legend and preserve defined rows height.
It would be quite nice to have plugins from the same group in the same row - this way, by configuring the span in the configuration file, we could have several panels on the same row. You could still make the panels 12 wide, if needed.