##// END OF EJS Templates
category fix to grouped, percent and stacked bar series
sauimone -
r1209:dcfa23e56a97
parent child
Show More
@@ -64,13 +64,14 QAbstractSeries::SeriesType QGroupedBarSeries::type() const
64
64
65 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
65 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
66
66
67 QGroupedBarSeriesPrivate::QGroupedBarSeriesPrivate(/*QBarCategories categories,*/ QGroupedBarSeries *q) : QBarSeriesPrivate(/*categories,*/q)
67 QGroupedBarSeriesPrivate::QGroupedBarSeriesPrivate(QGroupedBarSeries *q) : QBarSeriesPrivate(q)
68 {
68 {
69
69
70 }
70 }
71
71
72 void QGroupedBarSeriesPrivate::scaleDomain(Domain& domain)
72 void QGroupedBarSeriesPrivate::scaleDomain(Domain& domain)
73 {
73 {
74 Q_Q(QGroupedBarSeries);
74 qreal minX(domain.minX());
75 qreal minX(domain.minX());
75 qreal minY(domain.minY());
76 qreal minY(domain.minY());
76 qreal maxX(domain.maxX());
77 qreal maxX(domain.maxX());
@@ -78,7 +79,7 void QGroupedBarSeriesPrivate::scaleDomain(Domain& domain)
78 int tickXCount(domain.tickXCount());
79 int tickXCount(domain.tickXCount());
79 int tickYCount(domain.tickYCount());
80 int tickYCount(domain.tickYCount());
80
81
81 qreal x = m_categories.count();
82 qreal x = q->categoryCount();
82 qreal y = maxCategorySum();
83 qreal y = maxCategorySum();
83 minX = qMin(minX, x);
84 minX = qMin(minX, x);
84 minY = qMin(minY, y);
85 minY = qMin(minY, y);
@@ -39,7 +39,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE
39 class QPercentBarSeriesPrivate: public QBarSeriesPrivate
39 class QPercentBarSeriesPrivate: public QBarSeriesPrivate
40 {
40 {
41 public:
41 public:
42 QPercentBarSeriesPrivate(/*QBarCategories categories,*/QPercentBarSeries* q);
42 QPercentBarSeriesPrivate(QPercentBarSeries* q);
43 void scaleDomain(Domain& domain);
43 void scaleDomain(Domain& domain);
44 Chart* createGraphics(ChartPresenter* presenter);
44 Chart* createGraphics(ChartPresenter* presenter);
45
45
@@ -71,6 +71,7 QStackedBarSeriesPrivate::QStackedBarSeriesPrivate(QStackedBarSeries *q) : QBarS
71
71
72 void QStackedBarSeriesPrivate::scaleDomain(Domain& domain)
72 void QStackedBarSeriesPrivate::scaleDomain(Domain& domain)
73 {
73 {
74 Q_Q(QStackedBarSeries);
74 qreal minX(domain.minX());
75 qreal minX(domain.minX());
75 qreal minY(domain.minY());
76 qreal minY(domain.minY());
76 qreal maxX(domain.maxX());
77 qreal maxX(domain.maxX());
@@ -78,7 +79,7 void QStackedBarSeriesPrivate::scaleDomain(Domain& domain)
78 int tickXCount(domain.tickXCount());
79 int tickXCount(domain.tickXCount());
79 int tickYCount(domain.tickYCount());
80 int tickYCount(domain.tickYCount());
80
81
81 qreal x = m_categories.count();
82 qreal x = q->categoryCount();
82 qreal y = maxCategorySum();
83 qreal y = maxCategorySum();
83 minX = qMin(minX, x);
84 minX = qMin(minX, x);
84 minY = qMin(minY, y);
85 minY = qMin(minY, y);
@@ -39,7 +39,7 QTCOMMERCIALCHART_BEGIN_NAMESPACE
39 class QStackedBarSeriesPrivate: public QBarSeriesPrivate
39 class QStackedBarSeriesPrivate: public QBarSeriesPrivate
40 {
40 {
41 public:
41 public:
42 QStackedBarSeriesPrivate(/*QBarCategories categories,*/QStackedBarSeries* q);
42 QStackedBarSeriesPrivate(QStackedBarSeries* q);
43 Chart* createGraphics(ChartPresenter* presenter);
43 Chart* createGraphics(ChartPresenter* presenter);
44 void scaleDomain(Domain& domain);
44 void scaleDomain(Domain& domain);
45
45
General Comments 0
You need to be logged in to leave comments. Login now