I have a graph created using mxgraph javascript library. The graph has 3 types of cells. Every cell belong to one of the 3 types and each type has a particular color. So, I want to create a legend in the corner that shows what each color cell type means. Please tell me how do I create such a legend. If there is a better way to convey the information about the cell (besides the legend) please suggest that too. Please point me to any resources, documentation available.
问问题
370 次
1 回答
2
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.
于 2013-09-23T10:02:04.813 回答