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