Testing driving QCP for the first time, and trying to feed data to a candlestick chart as they come in like the realtimeDataDemo in "plot-examples". But how should I add data in the slot, which in the examples only are shown for graph (customPlot->addGraph() then ui->customPlot->graph(n)->addData(..)).
Setup:
void MainWindow::setupFinancialDemo(QCustomPlot *customPlot) { ... QCPFinancial *candlesticks = new QCPFinancial(customPlot->xAxis, customPlot->yAxis); ... connect(&dataTimer, SIGNAL(timeout()), this, SLOT(realtimeFinancialDataSlot())); }
Slot:
void MainWindow::realtimeFinancialDataSlot() { ui->customPlot->?->addData(...) }