2

I need the legend items stacked one above another (vertically).

When I do:

QtCharts::QChart *m_pieChart; //member variable
m_pieChart->legend()->setAlignment(Qt::AlignRight);

I get this:

legend items stacked vertically on the right side

And setting the alignment to bottom moves the legend to the bottom:

m_pieChart->legend()->setAlignment(Qt::AlignBottom);

BUT the legend items are not stacked vertically anymore!

legend items horizontalle under the chart

How to move the legend to the bottom AND have them stacked vertically?

4

0 に答える 0