##// END OF EJS Templates
Uncomment domainScale function in XYSeries
Marek Rosa -
r1205:40041b6bff54
parent child
Show More
@@ -407,24 +407,24 void QXYSeriesPrivate::scaleDomain(Domain& domain)
407 407
408 408 const QList<QPointF>& points = q->points();
409 409
410 // if(points.isEmpty()){
411 // minX=0.0;
412 // minY=0.0;
413 // maxX=1.0;
414 // maxY=1.0;
415 // }
416
417 // for (int i = 0; i < points.count(); i++)
418 // {
419 // qreal x = points[i].x();
420 // qreal y = points[i].y();
421 // minX = qMin(minX, x);
422 // minY = qMin(minY, y);
423 // maxX = qMax(maxX, x);
424 // maxY = qMax(maxY, y);
425 // }
426
427 // domain.setRange(minX,maxX,minY,maxY,tickXCount,tickYCount);
410 if(points.isEmpty()){
411 minX=0.0;
412 minY=0.0;
413 maxX=1.0;
414 maxY=1.0;
415 }
416
417 for (int i = 0; i < points.count(); i++)
418 {
419 qreal x = points[i].x();
420 qreal y = points[i].y();
421 minX = qMin(minX, x);
422 minY = qMin(minY, y);
423 maxX = qMax(maxX, x);
424 maxY = qMax(maxY, y);
425 }
426
427 domain.setRange(minX,maxX,minY,maxY,tickXCount,tickYCount);
428 428
429 429 if (!points.isEmpty()) {
430 430 for (int i = 0; i < points.count(); i++) {
General Comments 0
You need to be logged in to leave comments. Login now