aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-10-27 14:13:41 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-10-27 14:13:41 +0100
commitd9309e43befd29e010abade4e9401704aac4653b (patch)
treea742cad59dd8b2075a0d0962a470ce0d9f43af1b /server
parent4a041b7bc393ca4130f088a9ac65e9fe4b4d2143 (diff)
downloadsonarqube-d9309e43befd29e010abade4e9401704aac4653b.tar.gz
sonarqube-d9309e43befd29e010abade4e9401704aac4653b.zip
SONAR-6359 apply feedback
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/size/complexity-distribution.js2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/size/language-distribution.js2
-rw-r--r--server/sonar-web/src/main/js/components/charts/treemap.js1
3 files changed, 5 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/size/complexity-distribution.js b/server/sonar-web/src/main/js/apps/overview/size/complexity-distribution.js
index 8ff3da2740d..ac5796fa584 100644
--- a/server/sonar-web/src/main/js/apps/overview/size/complexity-distribution.js
+++ b/server/sonar-web/src/main/js/apps/overview/size/complexity-distribution.js
@@ -47,7 +47,9 @@ export class ComplexityDistribution extends React.Component {
return <BarChart data={data}
xTicks={xTicks}
xValues={xValues}
+ width={40 * data.length * 2 + 60}
height={HEIGHT}
+ barsWidth={40}
padding={[25, 30, 50, 30]}/>;
}
diff --git a/server/sonar-web/src/main/js/apps/overview/size/language-distribution.js b/server/sonar-web/src/main/js/apps/overview/size/language-distribution.js
index ab724920dc4..5e3acfaa401 100644
--- a/server/sonar-web/src/main/js/apps/overview/size/language-distribution.js
+++ b/server/sonar-web/src/main/js/apps/overview/size/language-distribution.js
@@ -61,7 +61,9 @@ export class LanguageDistribution extends React.Component {
return <BarChart data={data}
xTicks={xTicks}
xValues={xValues}
+ width={40 * data.length * 2 + 60}
height={HEIGHT}
+ barsWidth={40}
padding={[25, 30, 50, 30]}/>;
}
diff --git a/server/sonar-web/src/main/js/components/charts/treemap.js b/server/sonar-web/src/main/js/components/charts/treemap.js
index 9e311a838e3..be054fdc055 100644
--- a/server/sonar-web/src/main/js/components/charts/treemap.js
+++ b/server/sonar-web/src/main/js/components/charts/treemap.js
@@ -87,6 +87,7 @@ export const Treemap = React.createClass({
let treemap = d3.layout.treemap()
.round(true)
.value(d => sizeScale(d.size))
+ .sort((a, b) => a.value - b.value)
.size([this.state.width, 360]);
let nodes = treemap
.nodes({ children: this.props.items })