File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -182,13 +182,16 @@ void drawAxes::drawDiscreteLabels(bool horizontal)
182182 auto availLength = (max-min).abs ();
183183 auto neededLength = (rotatedIdent * neededSize).abs ();
184184
185+ auto plotPaddingLeft = style.plot .paddingLeft
186+ ->get (boundingRect.size .x );
187+
185188 Geom::Rect rect;
186189 if (!(*labelStyle.overflow == Styles::Overflow::hidden)
187190 || availLength >= neededLength)
188191 {
189192 auto minWidth =
190193 (rotatedIdent * Geom::Point ((max - min).abs (),
191- margin. left )).abs ();
194+ plotPaddingLeft )).abs ();
192195
193196 auto actWidth = std::min (minWidth, neededSize.x );
194197 auto halfSize = Geom::Point (actWidth/2 , neededSize.y /2 );
Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ class DrawingContext
3030 painter (dynamic_cast <IPainter &>(canvas)),
3131 options (*diagram.getOptions()),
3232 style (style),
33- events (events)
33+ events (events),
34+ boundingRect (rect)
3435 {
3536 coordSys = CoordinateSystem (style.plot .contentRect (rect),
3637 options.angle .get (),
@@ -48,6 +49,7 @@ class DrawingContext
4849 const Diag::Options &options;
4950 const Styles::Chart &style;
5051 const Events::Draw &events;
52+ Geom::Rect boundingRect;
5153};
5254
5355}
You can’t perform that action at this time.
0 commit comments