diff --git a/examples/stackedbarchartdrilldown/drilldownchart.cpp b/examples/stackedbarchartdrilldown/drilldownchart.cpp index 9fd61f0..bb777e5 100644 --- a/examples/stackedbarchartdrilldown/drilldownchart.cpp +++ b/examples/stackedbarchartdrilldown/drilldownchart.cpp @@ -38,11 +38,11 @@ void DrilldownChart::changeSeries(DrilldownBarSeries *series) m_currentSeries = series; // Reset axis - axisX()->setRange(0,0); QCategoriesAxis* axis = new QCategoriesAxis(); axis->append(m_currentSeries->categories()); addSeries(series); + setAxisX(series,axis); setTitle(series->name()); diff --git a/src/barchart/bar.cpp b/src/barchart/bar.cpp index dc3022d..4fec7bc 100644 --- a/src/barchart/bar.cpp +++ b/src/barchart/bar.cpp @@ -36,21 +36,21 @@ void Bar::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event) emit clicked(m_barset, m_index); - emit clicked(m_index); + //TODO:: emit clicked(m_index); } void Bar::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event) emit hovered(m_barset, true); - emit hovered(true); + //TODO::emit hovered(true); } void Bar::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event) emit hovered(m_barset, false); - emit hovered(false); + //TODO::emit hovered(false); } #include "moc_bar_p.cpp" diff --git a/src/chartdataset.cpp b/src/chartdataset.cpp index 0d646d4..3b6d47a 100644 --- a/src/chartdataset.cpp +++ b/src/chartdataset.cpp @@ -104,13 +104,12 @@ void ChartDataSet::removeSeries(QAbstractSeries* series) if(!domain) { qWarning()<<"Can not remove series. Series not found on the chart."; } - else { - delete domain; - domain =0; - } emit seriesRemoved(series); + delete domain; + domain = 0; + QAbstractAxis* axisX = m_seriesAxisXMap.take(series); QAbstractAxis* axisY = m_seriesAxisYMap.take(series); @@ -208,12 +207,16 @@ QAbstractAxis* ChartDataSet::axisY(QAbstractSeries *series) const void ChartDataSet::setAxisX(QAbstractSeries *series, QAbstractAxis *axis) { - m_seriesAxisXMap.insert(series,axis); + Q_UNUSED(series); + Q_UNUSED(axis); + // m_seriesAxisXMap.insert(series,axis); } void ChartDataSet::setAxisY(QAbstractSeries *series, QAbstractAxis *axis) { - m_seriesAxisYMap.insert(series,axis); + Q_UNUSED(series); + Q_UNUSED(axis); + // m_seriesAxisYMap.insert(series,axis); } void ChartDataSet::scrollDomain(qreal dx,qreal dy,const QSizeF& size)