Fix marginWithDeadline chart.
* Add fixed bounds to range axis. * Set series color. * Adjust chart width. FEA: ItEr75S27PerProjectDashboard
This commit is contained in:
parent
289475cbf7
commit
07667fd294
2 changed files with 14 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ import static org.libreplan.web.I18nHelper._;
|
|||
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -105,6 +106,18 @@ public class DashboardController extends GenericForwardComposer {
|
|||
private void generateTimeKPImarginWithDeadlineChart() {
|
||||
CategoryModel categoryModel;
|
||||
categoryModel = refreshTimeKPImarginWithDeadlineCategoryModel();
|
||||
timeKPImarginWithDeadlineChart.setAttribute("range-axis-lower-bound",
|
||||
new Double(-3.0));
|
||||
timeKPImarginWithDeadlineChart.setAttribute("range-axis-upper-bound",
|
||||
new Double(3.0));
|
||||
Color[] seriesColorMappings = new Color[1];
|
||||
if(dashboardModel.getMarginWithDeadLine().compareTo(BigDecimal.ZERO) >= 0) {
|
||||
seriesColorMappings[0] = Color.GREEN;
|
||||
} else {
|
||||
seriesColorMappings[0] = Color.RED;
|
||||
}
|
||||
timeKPImarginWithDeadlineChart.setAttribute("series-color-mappings",
|
||||
seriesColorMappings);
|
||||
timeKPImarginWithDeadlineChart.setModel(categoryModel);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
paneColor="#FFFFFF" bgColor="#FFFFFF"
|
||||
showLegend="true" showTooltiptext="true" />
|
||||
<chart id="timeKPImarginWithDeadlineChart"
|
||||
height="400px" width="600px" type="bar"
|
||||
height="400px" width="250px" type="bar"
|
||||
threeD="true" yAxis="x D days" orient="vertical"
|
||||
title="${i18n:_('Margin with deadline')}"
|
||||
paneColor="#FFFFFF" showLegend="false" />
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue