@@ -100,14 +100,24 void QChart::addSeries(QChartSeries* series) | |||||
100 |
|
100 | |||
101 | m_chartObjectInterfaces << barGroup; |
|
101 | m_chartObjectInterfaces << barGroup; | |
102 | childItems().append(barGroup); |
|
102 | childItems().append(barGroup); | |
103 | /* |
|
103 | ||
|
104 | // TODO: setting of domain should this be somewhere else. | |||
104 | m_plotDataIndex = 0 ; |
|
105 | m_plotDataIndex = 0 ; | |
105 | m_plotDomainList.resize(1); |
|
106 | m_plotDomainList.resize(1); | |
106 |
|
107 | |||
|
108 | qreal x = barSeries->countColumns(); | |||
|
109 | qreal y = barSeries->max(); | |||
|
110 | ||||
107 | PlotDomain& domain = m_plotDomainList[m_plotDataIndex]; |
|
111 | PlotDomain& domain = m_plotDomainList[m_plotDataIndex]; | |
108 | foreach(ChartItem* i ,m_chartItems) |
|
112 | ||
|
113 | domain.m_minX = qMin(domain.m_minX,x); | |||
|
114 | domain.m_minY = qMin(domain.m_minY,y); | |||
|
115 | domain.m_maxX = qMax(domain.m_maxX,x); | |||
|
116 | domain.m_maxY = qMax(domain.m_maxY,y); | |||
|
117 | ||||
|
118 | foreach(ChartObjectInterface* i ,m_chartObjectInterfaces) | |||
109 | i->setPlotDomain(m_plotDomainList.at(m_plotDataIndex)); |
|
119 | i->setPlotDomain(m_plotDomainList.at(m_plotDataIndex)); | |
110 | */ |
|
120 | ||
111 | break; |
|
121 | break; | |
112 | } |
|
122 | } | |
113 | case QChartSeries::SeriesTypeStackedBar: { |
|
123 | case QChartSeries::SeriesTypeStackedBar: { | |
@@ -125,14 +135,24 void QChart::addSeries(QChartSeries* series) | |||||
125 |
|
135 | |||
126 | m_chartObjectInterfaces << stackedBarGroup; |
|
136 | m_chartObjectInterfaces << stackedBarGroup; | |
127 | childItems().append(stackedBarGroup); |
|
137 | childItems().append(stackedBarGroup); | |
128 | /* |
|
138 | ||
|
139 | // TODO: setting of domain should this be somewhere else. | |||
129 | m_plotDataIndex = 0 ; |
|
140 | m_plotDataIndex = 0 ; | |
130 | m_plotDomainList.resize(1); |
|
141 | m_plotDomainList.resize(1); | |
131 |
|
142 | |||
|
143 | qreal x = stackedBarSeries->countColumns(); | |||
|
144 | qreal y = stackedBarSeries->maxColumnSum(); | |||
|
145 | ||||
132 | PlotDomain& domain = m_plotDomainList[m_plotDataIndex]; |
|
146 | PlotDomain& domain = m_plotDomainList[m_plotDataIndex]; | |
133 | foreach(ChartItem* i ,m_chartItems) |
|
147 | ||
|
148 | domain.m_minX = qMin(domain.m_minX,x); | |||
|
149 | domain.m_minY = qMin(domain.m_minY,y); | |||
|
150 | domain.m_maxX = qMax(domain.m_maxX,x); | |||
|
151 | domain.m_maxY = qMax(domain.m_maxY,y); | |||
|
152 | ||||
|
153 | foreach(ChartObjectInterface* i ,m_chartObjectInterfaces) | |||
134 | i->setPlotDomain(m_plotDomainList.at(m_plotDataIndex)); |
|
154 | i->setPlotDomain(m_plotDomainList.at(m_plotDataIndex)); | |
135 | */ |
|
155 | ||
136 | break; |
|
156 | break; | |
137 | } |
|
157 | } | |
138 | case QChartSeries::SeriesTypePercentBar: { |
|
158 | case QChartSeries::SeriesTypePercentBar: { | |
@@ -150,14 +170,23 void QChart::addSeries(QChartSeries* series) | |||||
150 |
|
170 | |||
151 | m_chartObjectInterfaces << percentBarGroup; |
|
171 | m_chartObjectInterfaces << percentBarGroup; | |
152 | childItems().append(percentBarGroup); |
|
172 | childItems().append(percentBarGroup); | |
153 | /* |
|
173 | ||
|
174 | // TODO: setting of domain should this be somewhere else. | |||
154 | m_plotDataIndex = 0 ; |
|
175 | m_plotDataIndex = 0 ; | |
155 | m_plotDomainList.resize(1); |
|
176 | m_plotDomainList.resize(1); | |
156 |
|
177 | |||
|
178 | qreal x = percentBarSeries->countColumns(); | |||
|
179 | ||||
157 | PlotDomain& domain = m_plotDomainList[m_plotDataIndex]; |
|
180 | PlotDomain& domain = m_plotDomainList[m_plotDataIndex]; | |
158 | foreach(ChartItem* i ,m_chartItems) |
|
181 | ||
|
182 | domain.m_minX = qMin(domain.m_minX,x); | |||
|
183 | domain.m_minY = 0; | |||
|
184 | domain.m_maxX = qMax(domain.m_maxX,x); | |||
|
185 | domain.m_maxY = 100; | |||
|
186 | ||||
|
187 | foreach(ChartObjectInterface* i ,m_chartObjectInterfaces) | |||
159 | i->setPlotDomain(m_plotDomainList.at(m_plotDataIndex)); |
|
188 | i->setPlotDomain(m_plotDomainList.at(m_plotDataIndex)); | |
160 | */ |
|
189 | ||
161 | break; |
|
190 | break; | |
162 | } |
|
191 | } | |
163 | case QChartSeries::SeriesTypeScatter: { |
|
192 | case QChartSeries::SeriesTypeScatter: { |
General Comments 0
You need to be logged in to leave comments.
Login now