Skip to content
Snippets Groups Projects
Commit 0dcdc7bc authored by Tom Robinson's avatar Tom Robinson
Browse files

Tweak ChartWithLegend padding + size rules

parent e391954f
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ export default class ChartWithLegend extends Component {
let chartWidth, chartHeight, flexChart = false;
let type, LegendComponent;
let isHorizontal = gridSize && gridSize.width > gridSize.height / GRID_ASPECT_RATIO;
if (!gridSize || (isHorizontal && gridSize.width > 3 && gridSize.height > 2)) {
if (!gridSize || (isHorizontal && (gridSize.width > 4 || gridSize.height > 4))) {
type = "horizontal";
LegendComponent = LegendVertical;
if (gridSize && gridSize.width < 6) {
......
......@@ -69,7 +69,7 @@ export default class LegendVertical extends Component {
isMuted={hovered && hovered.index != null && index !== hovered.index}
showTooltip={false}
/>
<span className={cx(styles.LegendItem, "flex-align-right", { muted: hovered && hovered.index != null && index !== hovered.index })}>{title[1]}</span>
<span className={cx(styles.LegendItem, "flex-align-right pl1", { muted: hovered && hovered.index != null && index !== hovered.index })}>{title[1]}</span>
</li>
)}
{overflowCount > 0 ?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment