문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top