I would do it directly on the page in html / css? then you position the legend inside or below the graph if you want, but I wouldn't try to over engineer this.
If you really want to have it as a mxgraph, well, just instanciate another graph with 3 cells and position it where you want.
Appart from that, make sure the 3 types are easy to distinguish and that their definition cast no doubt on what they are for.