@@ -111,8 +111,7 QVector<QRectF> BarChartItem::calculateLayout() | |||
|
111 | 111 | qreal rangeX = m_domainMaxX - m_domainMinX; |
|
112 | 112 | qreal scaleY = (height / rangeY); |
|
113 | 113 | qreal scaleX = (width / rangeX); |
|
114 | qreal categoryWidth = width / categoryCount; | |
|
115 | qreal barWidth = categoryWidth - categoryWidth * m_series->d_func()->barMargin(); | |
|
114 | qreal barWidth = scaleX - scaleX * m_series->d_func()->barMargin(); | |
|
116 | 115 | |
|
117 | 116 | int itemIndex(0); |
|
118 | 117 | for (int category = 0; category < categoryCount; category++) { |
@@ -47,8 +47,7 QVector<QRectF> GroupedBarChartItem::calculateLayout() | |||
|
47 | 47 | qreal rangeX = m_domainMaxX - m_domainMinX; |
|
48 | 48 | qreal scaleY = (height / rangeY); |
|
49 | 49 | qreal scaleX = (width / rangeX); |
|
50 | qreal categoryWidth = width / categoryCount; | |
|
51 | qreal barWidth = categoryWidth / setCount - (categoryWidth / setCount) * m_series->d_func()->barMargin(); | |
|
50 | qreal barWidth = scaleX / setCount - (scaleX / setCount) * m_series->d_func()->barMargin(); | |
|
52 | 51 | |
|
53 | 52 | int itemIndex(0); |
|
54 | 53 | for (int category = 0; category < categoryCount; category++) { |
@@ -47,8 +47,7 QVector<QRectF> PercentBarChartItem::calculateLayout() | |||
|
47 | 47 | qreal rangeX = m_domainMaxX - m_domainMinX; |
|
48 | 48 | qreal scaleY = (height / rangeY); |
|
49 | 49 | qreal scaleX = (width / rangeX); |
|
50 | qreal categoryWidth = width / categoryCount; | |
|
51 | qreal barWidth = categoryWidth - categoryWidth * m_series->d_func()->barMargin(); | |
|
50 | qreal barWidth = scaleX - scaleX * m_series->d_func()->barMargin(); | |
|
52 | 51 | |
|
53 | 52 | int itemIndex(0); |
|
54 | 53 | for (int category = 0; category < categoryCount; category++) { |
@@ -46,8 +46,7 QVector<QRectF> StackedBarChartItem::calculateLayout() | |||
|
46 | 46 | qreal rangeX = m_domainMaxX - m_domainMinX; |
|
47 | 47 | qreal scaleY = (height / rangeY); |
|
48 | 48 | qreal scaleX = (width / rangeX); |
|
49 | qreal categoryWidth = width / categoryCount; | |
|
50 | qreal barWidth = categoryWidth - categoryWidth * m_series->d_func()->barMargin(); | |
|
49 | qreal barWidth = scaleX - scaleX * m_series->d_func()->barMargin(); | |
|
51 | 50 | |
|
52 | 51 | int itemIndex(0); |
|
53 | 52 | for (int category = 0; category < categoryCount; category++) { |
General Comments 0
You need to be logged in to leave comments.
Login now