diff --git a/demos/dynamicspline/chart.cpp b/demos/dynamicspline/chart.cpp index de5bc2d..a12ce1f 100644 --- a/demos/dynamicspline/chart.cpp +++ b/demos/dynamicspline/chart.cpp @@ -41,6 +41,7 @@ Chart::Chart(QGraphicsItem *parent, Qt::WindowFlags wFlags) m_series->append(m_x, m_y); addSeries(m_series); + createDefaultAxes(); axisY()->setRange(-5, 5); axisX()->setRange(-9, 1); diff --git a/examples/legend/mainwidget.cpp b/examples/legend/mainwidget.cpp index 6e65039..7e9fce0 100644 --- a/examples/legend/mainwidget.cpp +++ b/examples/legend/mainwidget.cpp @@ -126,6 +126,7 @@ void MainWidget::createSeries() m_chart->addSeries(m_series); m_chart->setTitle("Legend detach example"); + m_chart->createDefaultAxes(); //![1] m_chart->legend()->setVisible(true); m_chart->legend()->setAlignment(Qt::AlignBottom);