mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
statistics: implement a legend box
For some chart (e.g. pie charts or stacked bar charts), we want to display a legend. QtCharts' legend interface happens to be private and therefore is of no use. This introduces a legend box which is implemented using QGraphicItems, which can be placed on top of QCharts. It's very unfancy, but works for now. If there are too many items, not all are shown. Currently, the legend is configured to fill at most half of the width and half of the height of the chart. This might need some optimization. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
7339dc28ae
commit
3a65b0f37f
3 changed files with 163 additions and 0 deletions
|
|
@ -5,6 +5,8 @@ include_directories(.
|
|||
)
|
||||
|
||||
set(SUBSURFACE_STATS_SRCS
|
||||
legend.h
|
||||
legend.cpp
|
||||
statscolors.h
|
||||
statscolors.cpp
|
||||
statsvariables.h
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue