Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(shape, xychart): default LinePath strokeLinecap to round #1105

Merged
merged 2 commits into from
Mar 12, 2021

Conversation

williaster
Copy link
Collaborator

@williaster williaster commented Mar 12, 2021

🐛 Bug fix

Title says it all. This is a good default behavior in order to make sure that paths of single data points surrounded by null values are still visible for Line and AreaSeries.

We could also consider setting this as the default in @visx/shape, but that's a very popular package so I worry about changing behavior 🤔

EDIT: going to make this change in @visx/shape as well as @visx/xychart so that all packages / consumers get the fix.

Before

After

@kristw @etr2460 @hshoff

@github-actions
Copy link

github-actions bot commented Mar 12, 2021

Size Changes

Package Diff ESM Prev ESM CJS Prev CJS
visx-shape +0.2% 81.2 KB 81.05 KB 101.68 KB 101.54 KB
visx-xychart +0.2% 164 KB 163.72 KB 228.78 KB 228.5 KB

Compared to master. File sizes are unminified and ungzipped.

View raw build stats

Previous (master)

{
  "visx-annotation": {
    "esm": 27484,
    "lib": 37510
  },
  "visx-axis": {
    "esm": 20727,
    "lib": 25127
  },
  "visx-bounds": {
    "esm": 2842,
    "lib": 3264
  },
  "visx-brush": {
    "esm": 44087,
    "lib": 47832
  },
  "visx-chord": {
    "esm": 3459,
    "lib": 4688
  },
  "visx-clip-path": {
    "esm": 4421,
    "lib": 5978
  },
  "visx-curve": {
    "esm": 323,
    "lib": 1464
  },
  "visx-demo": {
    "esm": 0,
    "lib": 0
  },
  "visx-drag": {
    "esm": 6263,
    "lib": 8300
  },
  "visx-event": {
    "esm": 3797,
    "lib": 5172
  },
  "visx-geo": {
    "esm": 12986,
    "lib": 16246
  },
  "visx-glyph": {
    "esm": 14893,
    "lib": 19789
  },
  "visx-gradient": {
    "esm": 17800,
    "lib": 22517
  },
  "visx-grid": {
    "esm": 18469,
    "lib": 22204
  },
  "visx-group": {
    "esm": 1619,
    "lib": 2246
  },
  "visx-heatmap": {
    "esm": 7286,
    "lib": 8622
  },
  "visx-hierarchy": {
    "esm": 12266,
    "lib": 18076
  },
  "visx-legend": {
    "esm": 26999,
    "lib": 34033
  },
  "visx-marker": {
    "esm": 8962,
    "lib": 11197
  },
  "visx-mock-data": {
    "esm": 326005,
    "lib": 329416
  },
  "visx-network": {
    "esm": 4546,
    "lib": 6706
  },
  "visx-pattern": {
    "esm": 11779,
    "lib": 15910
  },
  "visx-point": {
    "esm": 819,
    "lib": 1094
  },
  "visx-react-spring": {
    "esm": 13450,
    "lib": 17991
  },
  "visx-responsive": {
    "esm": 21872,
    "lib": 26932
  },
  "visx-scale": {
    "esm": 18443,
    "lib": 29701
  },
  "visx-shape": {
    "esm": 83000,
    "lib": 103973
  },
  "visx-stats": {
    "esm": 13911,
    "lib": 15494
  },
  "visx-text": {
    "esm": 8413,
    "lib": 10581
  },
  "visx-threshold": {
    "esm": 2911,
    "lib": 3820
  },
  "visx-tooltip": {
    "esm": 14147,
    "lib": 20413
  },
  "visx-visx": {
    "esm": 970,
    "lib": 8243
  },
  "visx-voronoi": {
    "esm": 2286,
    "lib": 3005
  },
  "visx-xychart": {
    "esm": 167647,
    "lib": 233982
  },
  "visx-zoom": {
    "esm": 15726,
    "lib": 17398
  }
}

Current

{
  "visx-annotation": {
    "esm": 27484,
    "lib": 37510
  },
  "visx-axis": {
    "esm": 20727,
    "lib": 25127
  },
  "visx-bounds": {
    "esm": 2842,
    "lib": 3264
  },
  "visx-brush": {
    "esm": 44087,
    "lib": 47832
  },
  "visx-chord": {
    "esm": 3459,
    "lib": 4688
  },
  "visx-clip-path": {
    "esm": 4421,
    "lib": 5978
  },
  "visx-curve": {
    "esm": 323,
    "lib": 1464
  },
  "visx-demo": {
    "esm": 0,
    "lib": 0
  },
  "visx-drag": {
    "esm": 6263,
    "lib": 8300
  },
  "visx-event": {
    "esm": 3797,
    "lib": 5172
  },
  "visx-geo": {
    "esm": 12986,
    "lib": 16246
  },
  "visx-glyph": {
    "esm": 14893,
    "lib": 19789
  },
  "visx-gradient": {
    "esm": 17800,
    "lib": 22517
  },
  "visx-grid": {
    "esm": 18469,
    "lib": 22204
  },
  "visx-group": {
    "esm": 1619,
    "lib": 2246
  },
  "visx-heatmap": {
    "esm": 7286,
    "lib": 8622
  },
  "visx-hierarchy": {
    "esm": 12266,
    "lib": 18076
  },
  "visx-legend": {
    "esm": 26999,
    "lib": 34033
  },
  "visx-marker": {
    "esm": 8962,
    "lib": 11197
  },
  "visx-mock-data": {
    "esm": 326005,
    "lib": 329416
  },
  "visx-network": {
    "esm": 4546,
    "lib": 6706
  },
  "visx-pattern": {
    "esm": 11779,
    "lib": 15910
  },
  "visx-point": {
    "esm": 819,
    "lib": 1094
  },
  "visx-react-spring": {
    "esm": 13450,
    "lib": 17991
  },
  "visx-responsive": {
    "esm": 21872,
    "lib": 26932
  },
  "visx-scale": {
    "esm": 18443,
    "lib": 29701
  },
  "visx-shape": {
    "esm": 83148,
    "lib": 104121
  },
  "visx-stats": {
    "esm": 13911,
    "lib": 15494
  },
  "visx-text": {
    "esm": 8413,
    "lib": 10581
  },
  "visx-threshold": {
    "esm": 2911,
    "lib": 3820
  },
  "visx-tooltip": {
    "esm": 14147,
    "lib": 20413
  },
  "visx-visx": {
    "esm": 970,
    "lib": 8243
  },
  "visx-voronoi": {
    "esm": 2286,
    "lib": 3005
  },
  "visx-xychart": {
    "esm": 167932,
    "lib": 234267
  },
  "visx-zoom": {
    "esm": 15726,
    "lib": 17398
  }
}

@williaster williaster changed the title new(xychart): default Line/AreaSeries to strokeLinecap='round' fix(shape): default LinePath strokeLinecap to round Mar 12, 2021
@williaster williaster changed the title fix(shape): default LinePath strokeLinecap to round fix(shape, xychart): default LinePath strokeLinecap to round Mar 12, 2021
@williaster
Copy link
Collaborator Author

noting that I made the change in @visx/shape, but also still needed to make it in @visx/xychart for the animated components which ultimately use <animated.path />s

@williaster williaster merged commit 5c2f802 into master Mar 12, 2021
@williaster williaster deleted the chris--xychart-strokelinecap branch March 12, 2021 22:26
@github-actions
Copy link

🎉 This PR is included in version v1.7.0 of the packages modified 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants