@@ -2,6 +2,7 | |||||
2 | #include "qchartseries.h" |
|
2 | #include "qchartseries.h" | |
3 | #include "qscatterseries.h" |
|
3 | #include "qscatterseries.h" | |
4 | #include "qscatterseries_p.h" |
|
4 | #include "qscatterseries_p.h" | |
|
5 | #include "qxychartseries.h" | |||
5 | #include "xylinechartitem_p.h" |
|
6 | #include "xylinechartitem_p.h" | |
6 | #include "xyplotdomain_p.h" |
|
7 | #include "xyplotdomain_p.h" | |
7 | #include "axis_p.h" |
|
8 | #include "axis_p.h" | |
@@ -71,12 +72,13 QRectF QChart::boundingRect() const | |||||
71 | void QChart::addSeries(QChartSeries* series) |
|
72 | void QChart::addSeries(QChartSeries* series) | |
72 | { |
|
73 | { | |
73 | Q_D(QChart); |
|
74 | Q_D(QChart); | |
|
75 | ||||
74 | d->m_series<<series; |
|
76 | d->m_series<<series; | |
75 |
|
77 | |||
76 | switch(series->type()) |
|
78 | switch(series->type()) | |
77 | { |
|
79 | { | |
78 | case QChartSeries::SeriesTypeLine: { |
|
80 | case QChartSeries::SeriesTypeLine: { | |
79 |
XYLineChartItem* item = new XYLineChartItem( |
|
81 | XYLineChartItem* item = new XYLineChartItem(static_cast<QXYChartSeries*>(series),this); | |
80 | item->updateXYPlotData(d->m_plotDataList.at(0)); |
|
82 | item->updateXYPlotData(d->m_plotDataList.at(0)); | |
81 | d->m_items<<item; |
|
83 | d->m_items<<item; | |
82 | break; |
|
84 | break; |
General Comments 0
You need to be logged in to leave comments.
Login now