Skip to content

Commit

Permalink
Minor visual improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
artur committed Jan 16, 2024
1 parent 442df32 commit 7dda966
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions web/frontend/src/components/SimpleBarChart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const SimpleBarChart = ({ data, property, filterClick }) => {
height={250}
colors={colors.greenAccent[400]}
enableGridY={false}
margin={{ top: 10, bottom: 10, right: 250, left: 10 }}
margin={{ top: 10, bottom: 10, right: 270, left: 10 }}
padding={0.3}
borderColor={{
from: "color",
Expand All @@ -67,7 +67,16 @@ const SimpleBarChart = ({ data, property, filterClick }) => {
axisBottom={null}
axisLeft={null}
axisRight={{
tickSize: 3,
format: (v) => {
return v.length > 30 ? "..." + v.substring(v.length - 30) : v;
},
tickSize: 5,
tickPadding: 5,
tickRotation: 0,
legend: "",

legendPosition: "middle",
legendOffset: -40,
}}
labelSkipWidth={12}
labelSkipHeight={12}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const PropertyValueDistribution = (payload) => {
});
if (data.length > 10) {
data.length = 10;
data.push({ count: sum, value: "...others" });
data.push({ count: sum, value: ".etc" });
}
data.reverse();
setData(data);
Expand Down

0 comments on commit 7dda966

Please sign in to comment.