UnMatched QChart YAxis
-
Hi All
i can't under stand unmatched data-
chart
-
data
-sourece code
d->mChart->removeAllSeries();
QSplineSeries* series = new QSplineSeries();
this->setXRange(0, grayImg.size().width);
this->setYRange(0, 285);for(int x = 0; x< grayImg.size().width; x++) { const QPoint point(x, value); // value == 255 / but graph is 285 series->append(point); } qDebug() << series->pointsVector(); d->mChart->addSeries(series);
plz help
thanks
-
-
Hi All
i can't under stand unmatched data-
chart
-
data
-sourece code
d->mChart->removeAllSeries();
QSplineSeries* series = new QSplineSeries();
this->setXRange(0, grayImg.size().width);
this->setYRange(0, 285);for(int x = 0; x< grayImg.size().width; x++) { const QPoint point(x, value); // value == 255 / but graph is 285 series->append(point); } qDebug() << series->pointsVector(); d->mChart->addSeries(series);
plz help
thanks
@dont-do-that All your points have y == 255, so you're drawing a horizontal line.
-
-
@dont-do-that All your points have y == 255, so you're drawing a horizontal line.
@jsulm thx reply but i find answer
//all charts are need createDefaultAxes Function
// Document - > The axes specific to the series can be later obtained from the chart by providing the series as the parameter for the axes() function call. QPieSeries does not create any axes.d->mChart->removeAllSeries();
d->mChart->addSeries(series);
d->mChart->createDefaultAxes(); // always need this function after addSeries