mirror of
https://github.com/fralx/LimeReport.git
synced 2025-10-01 11:31:10 +03:00
Add horizontal legend
This commit is contained in:
@@ -91,6 +91,7 @@ void PieChart::paintChart(QPainter *painter, QRectF chartRect)
|
||||
|
||||
void PieChart::paintChartLegend(QPainter *painter, QRectF legendRect)
|
||||
{
|
||||
// TODO_ES Fix bottom legend when axis is at the bottom
|
||||
prepareLegendToPaint(legendRect, painter);
|
||||
|
||||
int indicatorSize = painter->fontMetrics().height()/2;
|
||||
@@ -143,7 +144,7 @@ void PieChart::paintChartLegend(QPainter *painter, QRectF legendRect)
|
||||
}
|
||||
}
|
||||
|
||||
QSizeF PieChart::calcChartLegendSize(const QFont &font)
|
||||
QSizeF PieChart::calcChartLegendSize(const QFont &font, qreal)
|
||||
{
|
||||
QFontMetrics fm(font);
|
||||
|
||||
|
@@ -8,7 +8,7 @@ namespace LimeReport{
|
||||
class PieChart : public AbstractChart{
|
||||
public:
|
||||
PieChart(ChartItem* chartItem):AbstractChart(chartItem){}
|
||||
QSizeF calcChartLegendSize(const QFont &font);
|
||||
QSizeF calcChartLegendSize(const QFont &font, qreal maxWidth = 0);
|
||||
void paintChart(QPainter *painter, QRectF chartRect);
|
||||
void paintChartLegend(QPainter *painter, QRectF legendRect);
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user