Bug #8093
closedWCartesianChart portrait size do not show the bottom axis.
100%
Description
I used the code from the Wt example. C:\workspaces\wtclonegit\examples\charts\ChartExample.C
I commented out the axis location zero and add another chart with the portrait size chart->resize(500, 600). The bottom axis is not visible.
Files
Updated by Apivan Tuntakurn almost 4 years ago
- File DesiredResult.PNG DesiredResult.PNG added
This seem to fix the problem but I am not really sure what is going on.
diff --git a/src/Wt/Chart/WCartesianChart.C b/src/Wt/Chart/WCartesianChart.C
index 16855718..7396e474 100644
--- a/src/Wt/Chart/WCartesianChart.C
+++ b/src/Wt/Chart/WCartesianChart.C
@@ -3869,7 +3869,7 @@ void WCartesianChart::renderAxis(WPainter& painter, const WAxis& axis,
}
clipRect = WRectF(0.0, area.top(), isYAxis ? width_ : height_, h);
} else {
- clipRect = WRectF(area.left(), 0.0, area.width(), isYAxis ? height_ : width_);
- clipRect = WRectF(area.left(), 0.0, area.width(), isYAxis ? width_ : height_); } if (properties == AxisProperty::Labels) { clipRect = WRectF(clipRect.left() - 1, clipRect.top() - 1,
warning: LF will be replaced by CRLF in src/Wt/Chart/WCartesianChart.C.
The file will have its original line endings in your working directory
Updated by Apivan Tuntakurn almost 4 years ago
(Format patch)
diff --git a/src/Wt/Chart/WCartesianChart.C b/src/Wt/Chart/WCartesianChart.C
index 16855718..7396e474 100644
--- a/src/Wt/Chart/WCartesianChart.C
+++ b/src/Wt/Chart/WCartesianChart.C
@@ -3869,7 +3869,7 @@ void WCartesianChart::renderAxis(WPainter& painter, const WAxis& axis,
}
clipRect = WRectF(0.0, area.top(), isYAxis ? width_ : height_, h);
} else {
- clipRect = WRectF(area.left(), 0.0, area.width(), isYAxis ? height_ : width_);
+ clipRect = WRectF(area.left(), 0.0, area.width(), isYAxis ? width_ : height_);
}
if (properties == AxisProperty::Labels) {
clipRect = WRectF(clipRect.left() - 1, clipRect.top() - 1,
warning: LF will be replaced by CRLF in src/Wt/Chart/WCartesianChart.C.
The file will have its original line endings in your working directory
Updated by Roel Standaert almost 2 years ago
- Status changed from New to Resolved
- Target version set to 4.9.0
I just merged this into master, thanks.
Updated by Roel Standaert almost 2 years ago
- Target version changed from 4.9.0 to 4.8.3
Updated by Roel Standaert almost 2 years ago
- Status changed from Resolved to Closed