@@ -38,6 +38,7 QVector<QRectF> GroupedBarChartItem::calculateLayout() | |||||
38 | // Use temporary qreals for accuracy |
|
38 | // Use temporary qreals for accuracy | |
39 | qreal categoryCount = m_series->d_func()->categoryCount(); |
|
39 | qreal categoryCount = m_series->d_func()->categoryCount(); | |
40 | qreal setCount = m_series->barsetCount(); |
|
40 | qreal setCount = m_series->barsetCount(); | |
|
41 | bool barsVisible = m_series->isVisible(); | |||
41 |
|
42 | |||
42 | // Domain: |
|
43 | // Domain: | |
43 | qreal width = geometry().width(); |
|
44 | qreal width = geometry().width(); | |
@@ -65,6 +66,7 QVector<QRectF> GroupedBarChartItem::calculateLayout() | |||||
65 | layout.append(rect); |
|
66 | layout.append(rect); | |
66 | bar->setPen(barSet->pen()); |
|
67 | bar->setPen(barSet->pen()); | |
67 | bar->setBrush(barSet->brush()); |
|
68 | bar->setBrush(barSet->brush()); | |
|
69 | bar->setVisible(barsVisible); | |||
68 |
|
70 | |||
69 | QGraphicsSimpleTextItem* label = m_labels.at(itemIndex); |
|
71 | QGraphicsSimpleTextItem* label = m_labels.at(itemIndex); | |
70 |
|
72 |
@@ -38,6 +38,7 QVector<QRectF> PercentBarChartItem::calculateLayout() | |||||
38 | // Use temporary qreals for accuracy |
|
38 | // Use temporary qreals for accuracy | |
39 | qreal categoryCount = m_series->d_func()->categoryCount(); |
|
39 | qreal categoryCount = m_series->d_func()->categoryCount(); | |
40 | qreal setCount = m_series->barsetCount(); |
|
40 | qreal setCount = m_series->barsetCount(); | |
|
41 | bool barsVisible = m_series->isVisible(); | |||
41 |
|
42 | |||
42 | // Domain: |
|
43 | // Domain: | |
43 | qreal width = geometry().width(); |
|
44 | qreal width = geometry().width(); | |
@@ -63,6 +64,8 QVector<QRectF> PercentBarChartItem::calculateLayout() | |||||
63 | Bar* bar = m_bars.at(itemIndex); |
|
64 | Bar* bar = m_bars.at(itemIndex); | |
64 | bar->setPen(barSet->pen()); |
|
65 | bar->setPen(barSet->pen()); | |
65 | bar->setBrush(barSet->brush()); |
|
66 | bar->setBrush(barSet->brush()); | |
|
67 | bar->setVisible(barsVisible); | |||
|
68 | ||||
66 | QRectF rect(xPos, yPos-barHeight, barWidth, barHeight); |
|
69 | QRectF rect(xPos, yPos-barHeight, barWidth, barHeight); | |
67 | layout.append(rect); |
|
70 | layout.append(rect); | |
68 |
|
71 | |||
@@ -82,6 +85,7 QVector<QRectF> PercentBarChartItem::calculateLayout() | |||||
82 | ,yPos - barHeight/2 - label->boundingRect().height()/2); |
|
85 | ,yPos - barHeight/2 - label->boundingRect().height()/2); | |
83 | label->setFont(barSet->labelFont()); |
|
86 | label->setFont(barSet->labelFont()); | |
84 | label->setBrush(barSet->labelBrush()); |
|
87 | label->setBrush(barSet->labelBrush()); | |
|
88 | ||||
85 | itemIndex++; |
|
89 | itemIndex++; | |
86 | yPos -= barHeight; |
|
90 | yPos -= barHeight; | |
87 | } |
|
91 | } |
@@ -37,6 +37,7 QVector<QRectF> StackedBarChartItem::calculateLayout() | |||||
37 | // Use temporary qreals for accuracy |
|
37 | // Use temporary qreals for accuracy | |
38 | qreal categoryCount = m_series->d_func()->categoryCount(); |
|
38 | qreal categoryCount = m_series->d_func()->categoryCount(); | |
39 | qreal setCount = m_series->barsetCount(); |
|
39 | qreal setCount = m_series->barsetCount(); | |
|
40 | bool barsVisible = m_series->isVisible(); | |||
40 |
|
41 | |||
41 | // Domain: |
|
42 | // Domain: | |
42 | qreal width = geometry().width(); |
|
43 | qreal width = geometry().width(); | |
@@ -60,6 +61,8 QVector<QRectF> StackedBarChartItem::calculateLayout() | |||||
60 | Bar* bar = m_bars.at(itemIndex); |
|
61 | Bar* bar = m_bars.at(itemIndex); | |
61 | bar->setPen(barSet->pen()); |
|
62 | bar->setPen(barSet->pen()); | |
62 | bar->setBrush(barSet->brush()); |
|
63 | bar->setBrush(barSet->brush()); | |
|
64 | bar->setVisible(barsVisible); | |||
|
65 | ||||
63 | QRectF rect(xPos, yPos-barHeight, barWidth, barHeight); |
|
66 | QRectF rect(xPos, yPos-barHeight, barWidth, barHeight); | |
64 | layout.append(rect); |
|
67 | layout.append(rect); | |
65 |
|
68 |
General Comments 0
You need to be logged in to leave comments.
Login now