Skip to content

Commit

Permalink
fix(charts): getXTicks is incorrectly doing a greater than
Browse files Browse the repository at this point in the history
The ticks should be reduced as the width decrease not increases.
  • Loading branch information
markmcdowell committed Dec 17, 2019
1 parent 632a699 commit 80e5739
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/charts/src/axes/XAxis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,15 @@ export class XAxis extends React.Component<XAxisProps> {

private readonly getXTicks = (width: number) => {

if (width > 500) {
if (width < 400) {
return 2;
}

if (width < 500) {
return 6;
}

return 12;
return 8;
}

private readonly getXScale = (moreProps) => {
Expand Down

0 comments on commit 80e5739

Please sign in to comment.