Adding a custom metric to a chart with our current workflow has a high interaction cost. The popups system induces too many clicks from the user.
We might use a second dropdown instead, with multiselection and search just like the one we have to edit tags on a project's homepage.
However, we'll need to find a way to display our warning messages to explain the limitations (3 graphs maximum etc)
When limitations are met (eg. 3 same type metrics have been selected) the unavailable options will be greyed-out. The mouseover cursor will have the css property "not-allowed" to make it even more obvious.
In the metrics selection dropdown, the metrics with no data available should be clearly shown. Maybe a badge or simple light-grey disclaimer next to those items stating "no historical data currently available" so that the user is not surprised with empty charts and error messages afterwards.