| 421 | } |
| 422 | |
| 423 | void MultiRangeTest::zoomInX_AllRanges() { |
| 424 | LOAD_PROJECT |
| 425 | auto refValuesAxis1 = vertAxisP1->tickLabelValues(); |
| 426 | auto refValuesAxis2 = vertAxis2P1->tickLabelValues(); |
| 427 | auto refValuesAxis3 = vertAxis3P1->tickLabelValues(); |
| 428 | horAxisP1->setSelected(true); |
| 429 | p1->zoomInX(); |
| 430 | |
| 431 | CHECK_RANGE(p1, sinCurve, Dimension::X, 0.1, 0.9); // zoom |
| 432 | CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.); |
| 433 | CHECK_RANGE(p1, tanCurve, Dimension::X, 0.1, 0.9); // zoom |
| 434 | CHECK_RANGE(p1, tanCurve, Dimension::Y, -250., 250.); |
| 435 | CHECK_RANGE(p1, logCurve, Dimension::X, 10., 90.); // zoom |
| 436 | CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.); |
| 437 | |
| 438 | // check auto scale (all) |
| 439 | p1->navigate(-1, CartesianPlot::NavigationOperation::ScaleAuto); |
| 440 | |
| 441 | CHECK_RANGE(p1, sinCurve, Dimension::X, 0., 1.); |
| 442 | CHECK_RANGE(p1, sinCurve, Dimension::Y, -1., 1.); |
| 443 | CHECK_RANGE(p1, tanCurve, Dimension::X, 0., 1.); |
| 444 | CHECK_RANGE(p1, tanCurve, Dimension::Y, -250., 250.); |
| 445 | CHECK_RANGE(p1, logCurve, Dimension::X, 0., 100.); |
| 446 | CHECK_RANGE(p1, logCurve, Dimension::Y, -10., 6.); |
| 447 | |
| 448 | COMPARE_DOUBLE_VECTORS(vertAxisP1->tickLabelValues(), refValuesAxis1); |
| 449 | COMPARE_DOUBLE_VECTORS(vertAxis2P1->tickLabelValues(), refValuesAxis2); |
| 450 | QVector<double> ref = {-10, -7.71429, -5.42857, -3.14286, -0.857143, 1.42857, 3.71429, 6}; |
| 451 | // COMPARE_DOUBLE_VECTORS(vertAxis3P1->tickLabelValues(), ref); // vertAxis3 is not autoscaled when loading, after autoscaling the values are different |
| 452 | } |
| 453 | |
| 454 | void MultiRangeTest::zoomInY_SingleRange() { |
| 455 | LOAD_PROJECT |
nothing calls this directly
no test coverage detected