How to sort and align fleet graphics

By default, the size of the fleet determines the labels of the graph and the axis for fixing inside the div container. If you have a series of graphs on a page with different variables in each graph, the dimensions of the axis labels are different, so the canvas of the graph has different sizes and does not align neatly.

Is there a way to set the size and position of the fleet canvas so that the graphs are a fixed size and position inside the containers.

+4
source share
1 answer

Not really, no. What you can do is specify how wide / high the axis marks should be, which make the canvas align between different graphs.

From API.txt :

"labelWidth" and "labelHeight" indicate a fixed tick tick size in pixels. They are useful if you need to align several sections. "reserveSpace" means that even if the axis is not shown, Flot must reserve a place for it - it is useful in combination with labelWidth and labelHeight to align multi-axis diagrams.

In addition, if you want the actual axes to be the same between the graphs, you will need to set which global min / max for each axis between all your datasets, and then indicate what for each axis on each graph.

+7
source

All Articles