##// END OF EJS Templates
Fixes for stackedbarchartdrilldown
Michal Klocek -
r1558:d493942b82b8
parent child
Show More
@@ -38,11 +38,11 void DrilldownChart::changeSeries(DrilldownBarSeries *series)
38 m_currentSeries = series;
38 m_currentSeries = series;
39
39
40 // Reset axis
40 // Reset axis
41 axisX()->setRange(0,0);
42 QCategoriesAxis* axis = new QCategoriesAxis();
41 QCategoriesAxis* axis = new QCategoriesAxis();
43 axis->append(m_currentSeries->categories());
42 axis->append(m_currentSeries->categories());
44
43
45 addSeries(series);
44 addSeries(series);
45
46 setAxisX(series,axis);
46 setAxisX(series,axis);
47
47
48 setTitle(series->name());
48 setTitle(series->name());
@@ -36,21 +36,21 void Bar::mousePressEvent(QGraphicsSceneMouseEvent *event)
36 {
36 {
37 Q_UNUSED(event)
37 Q_UNUSED(event)
38 emit clicked(m_barset, m_index);
38 emit clicked(m_barset, m_index);
39 emit clicked(m_index);
39 //TODO:: emit clicked(m_index);
40 }
40 }
41
41
42 void Bar::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
42 void Bar::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
43 {
43 {
44 Q_UNUSED(event)
44 Q_UNUSED(event)
45 emit hovered(m_barset, true);
45 emit hovered(m_barset, true);
46 emit hovered(true);
46 //TODO::emit hovered(true);
47 }
47 }
48
48
49 void Bar::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
49 void Bar::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
50 {
50 {
51 Q_UNUSED(event)
51 Q_UNUSED(event)
52 emit hovered(m_barset, false);
52 emit hovered(m_barset, false);
53 emit hovered(false);
53 //TODO::emit hovered(false);
54 }
54 }
55
55
56 #include "moc_bar_p.cpp"
56 #include "moc_bar_p.cpp"
@@ -104,13 +104,12 void ChartDataSet::removeSeries(QAbstractSeries* series)
104 if(!domain) {
104 if(!domain) {
105 qWarning()<<"Can not remove series. Series not found on the chart.";
105 qWarning()<<"Can not remove series. Series not found on the chart.";
106 }
106 }
107 else {
108 delete domain;
109 domain =0;
110 }
111
107
112 emit seriesRemoved(series);
108 emit seriesRemoved(series);
113
109
110 delete domain;
111 domain = 0;
112
114 QAbstractAxis* axisX = m_seriesAxisXMap.take(series);
113 QAbstractAxis* axisX = m_seriesAxisXMap.take(series);
115 QAbstractAxis* axisY = m_seriesAxisYMap.take(series);
114 QAbstractAxis* axisY = m_seriesAxisYMap.take(series);
116
115
@@ -208,12 +207,16 QAbstractAxis* ChartDataSet::axisY(QAbstractSeries *series) const
208
207
209 void ChartDataSet::setAxisX(QAbstractSeries *series, QAbstractAxis *axis)
208 void ChartDataSet::setAxisX(QAbstractSeries *series, QAbstractAxis *axis)
210 {
209 {
211 m_seriesAxisXMap.insert(series,axis);
210 Q_UNUSED(series);
211 Q_UNUSED(axis);
212 // m_seriesAxisXMap.insert(series,axis);
212 }
213 }
213
214
214 void ChartDataSet::setAxisY(QAbstractSeries *series, QAbstractAxis *axis)
215 void ChartDataSet::setAxisY(QAbstractSeries *series, QAbstractAxis *axis)
215 {
216 {
216 m_seriesAxisYMap.insert(series,axis);
217 Q_UNUSED(series);
218 Q_UNUSED(axis);
219 // m_seriesAxisYMap.insert(series,axis);
217 }
220 }
218
221
219 void ChartDataSet::scrollDomain(qreal dx,qreal dy,const QSizeF& size)
222 void ChartDataSet::scrollDomain(qreal dx,qreal dy,const QSizeF& size)
General Comments 0
You need to be logged in to leave comments. Login now