@@ -41,6 +41,7 Chart::Chart(QGraphicsItem *parent, Qt::WindowFlags wFlags) | |||||
41 | m_series->append(m_x, m_y); |
|
41 | m_series->append(m_x, m_y); | |
42 |
|
42 | |||
43 | addSeries(m_series); |
|
43 | addSeries(m_series); | |
|
44 | createDefaultAxes(); | |||
44 |
|
45 | |||
45 | axisY()->setRange(-5, 5); |
|
46 | axisY()->setRange(-5, 5); | |
46 | axisX()->setRange(-9, 1); |
|
47 | axisX()->setRange(-9, 1); |
@@ -126,6 +126,7 void MainWidget::createSeries() | |||||
126 |
|
126 | |||
127 | m_chart->addSeries(m_series); |
|
127 | m_chart->addSeries(m_series); | |
128 | m_chart->setTitle("Legend detach example"); |
|
128 | m_chart->setTitle("Legend detach example"); | |
|
129 | m_chart->createDefaultAxes(); | |||
129 | //![1] |
|
130 | //![1] | |
130 | m_chart->legend()->setVisible(true); |
|
131 | m_chart->legend()->setVisible(true); | |
131 | m_chart->legend()->setAlignment(Qt::AlignBottom); |
|
132 | m_chart->legend()->setAlignment(Qt::AlignBottom); |
General Comments 0
You need to be logged in to leave comments.
Login now