We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77f46a3 commit 3b1d316Copy full SHA for 3b1d316
src/chart/generator/diagram.cpp
@@ -159,9 +159,14 @@ void Diagram::normalizeXY()
159
boundRect.setVSize(yrange.getValue(boundRect.vSize()));
160
161
for (auto &marker: markers)
162
- marker.fromRectangle(
163
- boundRect.normalize(marker.toRectangle())
164
- );
+ {
+ if (!boundRect.contains(marker.position))
+ marker.enabled = false;
165
+
166
+ auto rect = marker.toRectangle();
167
+ auto newRect = boundRect.normalize(rect);
168
+ marker.fromRectangle(newRect);
169
+ }
170
171
stats.scales[Scale::Type::X].range = boundRect.hSize();
172
stats.scales[Scale::Type::Y].range = boundRect.vSize();
0 commit comments