#432 closed enhancement (fixed)
Add legend support to GraphPanel
Reported by: | Kevin Milner | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | OpenSHA 1.4 |
Component: | commons | Version: | |
Keywords: | Cc: |
Description
It would be nice to have legend support in GraphPanel?. You would need to be able to specify location as well.
Attachments (1)
Change History (4)
comment:1 Changed 11 years ago by
Milestone: | OpenSHA 1.3 → OpenSHA 1.4 |
---|
comment:2 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Done in [10533].
PlotSpec? now has 3 new methods:
- setLegendVisible(boolean visible)
- setLegendLocation(RectangleEdge? legendLocation)
- setCustomLegendCollection(LegendItemCollection? customLegendCollection)
Legend defaults to below the plot and will only show up when setLegendVisible(true) is called. Function names will be used in the legend. You can set up a custom set of legend items with the setCustomLegendCollection(...) method, but it might be complicated.
Note: See
TracTickets for help on using
tickets.
Leaving open as full legend support is not implemented, but XY Text Annotations have been added via PlotSpec?.setAnnotations(...). These annotations have an XY locations, text anchor, and font for customization.