Skip to content

Commit

Permalink
Fix: add initial property for truncateTickAt (#2504)
Browse files Browse the repository at this point in the history
* add initial property for truncateTickAt

* remove unecessary new line

* add missing truncateTickAt bump
  • Loading branch information
scalabw authored Feb 22, 2024
1 parent c741a88 commit 44d8967
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions website/src/data/components/line/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default {
tickRotation: 0,
legend: '',
legendOffset: 36,
truncateTickAt: 0,
},
axisRight: {
enable: false,
Expand All @@ -43,6 +44,7 @@ export default {
tickRotation: 0,
legend: '',
legendOffset: 0,
truncateTickAt: 0,
},
axisBottom: {
enable: true,
Expand All @@ -52,6 +54,7 @@ export default {
legend: 'transportation',
legendOffset: 36,
legendPosition: 'middle',
truncateTickAt: 0,
},
axisLeft: {
enable: true,
Expand All @@ -61,6 +64,7 @@ export default {
legend: 'count',
legendOffset: -40,
legendPosition: 'middle',
truncateTickAt: 0,
},

enableGridX: LineDefaultProps.enableGridX,
Expand Down
4 changes: 4 additions & 0 deletions website/src/data/components/stream/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default {
tickRotation: 0,
legend: '',
legendOffset: 36,
truncateTickAt: 0,
},
axisRight: {
enable: false,
Expand All @@ -29,6 +30,7 @@ export default {
tickRotation: 0,
legend: '',
legendOffset: 0,
truncateTickAt: 0,
},
axisBottom: {
enable: true,
Expand All @@ -38,6 +40,7 @@ export default {
tickRotation: 0,
legend: '',
legendOffset: 36,
truncateTickAt: 0,
},
axisLeft: {
enable: true,
Expand All @@ -47,6 +50,7 @@ export default {
tickRotation: 0,
legend: '',
legendOffset: -40,
truncateTickAt: 0,
},
enableGridX: true,
enableGridY: false,
Expand Down
2 changes: 2 additions & 0 deletions website/src/pages/area-bump/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const initialProperties = {
legend: '',
legendPosition: 'middle',
legendOffset: -36,
truncateTickAt: 0,
},
axisBottom: {
enable: true,
Expand All @@ -93,6 +94,7 @@ const initialProperties = {
legend: '',
legendPosition: 'middle',
legendOffset: 32,
truncateTickAt: 0,
},

isInteractive: true,
Expand Down
4 changes: 4 additions & 0 deletions website/src/pages/boxplot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const initialProperties = {
tickRotation: 0,
legend: '',
legendOffset: 36,
truncateTickAt: 0,
},
axisRight: {
enable: true,
Expand All @@ -44,6 +45,7 @@ const initialProperties = {
tickRotation: 0,
legend: '',
legendOffset: 0,
truncateTickAt: 0,
},
axisBottom: {
enable: true,
Expand All @@ -53,6 +55,7 @@ const initialProperties = {
legend: 'group',
legendPosition: 'middle',
legendOffset: 32,
truncateTickAt: 0,
},
axisLeft: {
enable: true,
Expand All @@ -62,6 +65,7 @@ const initialProperties = {
legend: 'value',
legendPosition: 'middle',
legendOffset: -40,
truncateTickAt: 0,
},

colors: { scheme: 'nivo' },
Expand Down
4 changes: 4 additions & 0 deletions website/src/pages/bump/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const initialProperties: UnmappedProps = {
legend: '',
legendPosition: 'middle',
legendOffset: -36,
truncateTickAt: 0,
},
axisRight: {
enable: false,
Expand All @@ -96,6 +97,7 @@ const initialProperties: UnmappedProps = {
legend: 'ranking',
legendPosition: 'middle',
legendOffset: 40,
truncateTickAt: 0,
},
axisBottom: {
enable: true,
Expand All @@ -105,6 +107,7 @@ const initialProperties: UnmappedProps = {
legend: '',
legendPosition: 'middle',
legendOffset: 32,
truncateTickAt: 0,
},
axisLeft: {
enable: true,
Expand All @@ -115,6 +118,7 @@ const initialProperties: UnmappedProps = {
legend: 'ranking',
legendPosition: 'middle',
legendOffset: -40,
truncateTickAt: 0,
},
}

Expand Down
4 changes: 4 additions & 0 deletions website/src/pages/heatmap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const initialProperties: SvgUnmappedProps = {
tickRotation: -90,
legend: '',
legendOffset: 46,
truncateTickAt: 0,
},
axisRight: {
enable: true,
Expand All @@ -47,6 +48,7 @@ const initialProperties: SvgUnmappedProps = {
legend: 'country',
legendPosition: 'middle',
legendOffset: 70,
truncateTickAt: 0,
},
axisBottom: {
enable: false,
Expand All @@ -56,6 +58,7 @@ const initialProperties: SvgUnmappedProps = {
legend: '',
legendPosition: 'middle',
legendOffset: 36,
truncateTickAt: 0,
},
axisLeft: {
enable: true,
Expand All @@ -65,6 +68,7 @@ const initialProperties: SvgUnmappedProps = {
legend: 'country',
legendPosition: 'middle',
legendOffset: -72,
truncateTickAt: 0,
},
colors: {
type: 'diverging',
Expand Down
4 changes: 4 additions & 0 deletions website/src/pages/marimekko/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const initialProperties = {
tickRotation: 0,
legend: '',
legendOffset: 36,
truncateTickAt: 0,
},
axisRight: {
enable: true,
Expand All @@ -62,6 +63,7 @@ const initialProperties = {
tickRotation: 0,
legend: '',
legendOffset: 0,
truncateTickAt: 0,
},
axisBottom: {
enable: true,
Expand All @@ -72,6 +74,7 @@ const initialProperties = {
legend: 'participation',
legendOffset: 36,
legendPosition: 'middle',
truncateTickAt: 0,
},
axisLeft: {
enable: true,
Expand All @@ -82,6 +85,7 @@ const initialProperties = {
legend: 'opinions',
legendOffset: -40,
legendPosition: 'middle',
truncateTickAt: 0,
},
enableGridX: defaultProps.enableGridX,
enableGridY: defaultProps.enableGridY,
Expand Down
4 changes: 4 additions & 0 deletions website/src/pages/scatterplot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const initialProperties = {
tickRotation: 0,
legend: '',
legendOffset: 36,
truncateTickAt: 0,
},
axisRight: {
enable: false,
Expand All @@ -52,6 +53,7 @@ const initialProperties = {
tickRotation: 0,
legend: '',
legendOffset: 0,
truncateTickAt: 0,
},
axisBottom: {
enable: true,
Expand All @@ -63,6 +65,7 @@ const initialProperties = {
legendPosition: 'middle',
legendOffset: 46,
format: d => `${d} kg`,
truncateTickAt: 0,
},
axisLeft: {
enable: true,
Expand All @@ -74,6 +77,7 @@ const initialProperties = {
legendPosition: 'middle',
legendOffset: -60,
format: d => `${d} cm`,
truncateTickAt: 0,
},

animate: svgDefaultProps.animate,
Expand Down
4 changes: 4 additions & 0 deletions website/src/pages/swarmplot/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const initialProperties = Object.freeze({
legend: 'group if vertical, price if horizontal',
legendPosition: 'middle',
legendOffset: -46,
truncateTickAt: 0,
},
axisRight: {
enable: true,
Expand All @@ -67,6 +68,7 @@ const initialProperties = Object.freeze({
legend: 'price if vertical, group if horizontal',
legendPosition: 'middle',
legendOffset: 76,
truncateTickAt: 0,
},
axisBottom: {
enable: true,
Expand All @@ -77,6 +79,7 @@ const initialProperties = Object.freeze({
legend: 'group if vertical, price if horizontal',
legendPosition: 'middle',
legendOffset: 46,
truncateTickAt: 0,
},
axisLeft: {
enable: true,
Expand All @@ -87,6 +90,7 @@ const initialProperties = Object.freeze({
legend: 'price if vertical, group if horizontal',
legendPosition: 'middle',
legendOffset: -76,
truncateTickAt: 0,
},

isInteractive: true,
Expand Down

0 comments on commit 44d8967

Please sign in to comment.