From 44d8967e774dc4d11d2d1f48513e102dcb4688e9 Mon Sep 17 00:00:00 2001 From: William Scalabre Date: Thu, 22 Feb 2024 02:20:09 +0100 Subject: [PATCH] Fix: add initial property for truncateTickAt (#2504) * add initial property for truncateTickAt * remove unecessary new line * add missing truncateTickAt bump --- website/src/data/components/line/defaults.ts | 4 ++++ website/src/data/components/stream/defaults.ts | 4 ++++ website/src/pages/area-bump/index.tsx | 2 ++ website/src/pages/boxplot/index.tsx | 4 ++++ website/src/pages/bump/index.tsx | 4 ++++ website/src/pages/heatmap/index.tsx | 4 ++++ website/src/pages/marimekko/index.tsx | 4 ++++ website/src/pages/scatterplot/index.js | 4 ++++ website/src/pages/swarmplot/index.js | 4 ++++ 9 files changed, 34 insertions(+) diff --git a/website/src/data/components/line/defaults.ts b/website/src/data/components/line/defaults.ts index 53890c6fc..1160d1fe9 100644 --- a/website/src/data/components/line/defaults.ts +++ b/website/src/data/components/line/defaults.ts @@ -34,6 +34,7 @@ export default { tickRotation: 0, legend: '', legendOffset: 36, + truncateTickAt: 0, }, axisRight: { enable: false, @@ -43,6 +44,7 @@ export default { tickRotation: 0, legend: '', legendOffset: 0, + truncateTickAt: 0, }, axisBottom: { enable: true, @@ -52,6 +54,7 @@ export default { legend: 'transportation', legendOffset: 36, legendPosition: 'middle', + truncateTickAt: 0, }, axisLeft: { enable: true, @@ -61,6 +64,7 @@ export default { legend: 'count', legendOffset: -40, legendPosition: 'middle', + truncateTickAt: 0, }, enableGridX: LineDefaultProps.enableGridX, diff --git a/website/src/data/components/stream/defaults.ts b/website/src/data/components/stream/defaults.ts index ee081fbe1..e15631fe4 100644 --- a/website/src/data/components/stream/defaults.ts +++ b/website/src/data/components/stream/defaults.ts @@ -20,6 +20,7 @@ export default { tickRotation: 0, legend: '', legendOffset: 36, + truncateTickAt: 0, }, axisRight: { enable: false, @@ -29,6 +30,7 @@ export default { tickRotation: 0, legend: '', legendOffset: 0, + truncateTickAt: 0, }, axisBottom: { enable: true, @@ -38,6 +40,7 @@ export default { tickRotation: 0, legend: '', legendOffset: 36, + truncateTickAt: 0, }, axisLeft: { enable: true, @@ -47,6 +50,7 @@ export default { tickRotation: 0, legend: '', legendOffset: -40, + truncateTickAt: 0, }, enableGridX: true, enableGridY: false, diff --git a/website/src/pages/area-bump/index.tsx b/website/src/pages/area-bump/index.tsx index 22521aa67..e0a0e955e 100644 --- a/website/src/pages/area-bump/index.tsx +++ b/website/src/pages/area-bump/index.tsx @@ -84,6 +84,7 @@ const initialProperties = { legend: '', legendPosition: 'middle', legendOffset: -36, + truncateTickAt: 0, }, axisBottom: { enable: true, @@ -93,6 +94,7 @@ const initialProperties = { legend: '', legendPosition: 'middle', legendOffset: 32, + truncateTickAt: 0, }, isInteractive: true, diff --git a/website/src/pages/boxplot/index.tsx b/website/src/pages/boxplot/index.tsx index fdcf9e15d..b978f69e9 100644 --- a/website/src/pages/boxplot/index.tsx +++ b/website/src/pages/boxplot/index.tsx @@ -36,6 +36,7 @@ const initialProperties = { tickRotation: 0, legend: '', legendOffset: 36, + truncateTickAt: 0, }, axisRight: { enable: true, @@ -44,6 +45,7 @@ const initialProperties = { tickRotation: 0, legend: '', legendOffset: 0, + truncateTickAt: 0, }, axisBottom: { enable: true, @@ -53,6 +55,7 @@ const initialProperties = { legend: 'group', legendPosition: 'middle', legendOffset: 32, + truncateTickAt: 0, }, axisLeft: { enable: true, @@ -62,6 +65,7 @@ const initialProperties = { legend: 'value', legendPosition: 'middle', legendOffset: -40, + truncateTickAt: 0, }, colors: { scheme: 'nivo' }, diff --git a/website/src/pages/bump/index.tsx b/website/src/pages/bump/index.tsx index b7acfe686..420677411 100644 --- a/website/src/pages/bump/index.tsx +++ b/website/src/pages/bump/index.tsx @@ -86,6 +86,7 @@ const initialProperties: UnmappedProps = { legend: '', legendPosition: 'middle', legendOffset: -36, + truncateTickAt: 0, }, axisRight: { enable: false, @@ -96,6 +97,7 @@ const initialProperties: UnmappedProps = { legend: 'ranking', legendPosition: 'middle', legendOffset: 40, + truncateTickAt: 0, }, axisBottom: { enable: true, @@ -105,6 +107,7 @@ const initialProperties: UnmappedProps = { legend: '', legendPosition: 'middle', legendOffset: 32, + truncateTickAt: 0, }, axisLeft: { enable: true, @@ -115,6 +118,7 @@ const initialProperties: UnmappedProps = { legend: 'ranking', legendPosition: 'middle', legendOffset: -40, + truncateTickAt: 0, }, } diff --git a/website/src/pages/heatmap/index.tsx b/website/src/pages/heatmap/index.tsx index bf50ce633..f50368a10 100644 --- a/website/src/pages/heatmap/index.tsx +++ b/website/src/pages/heatmap/index.tsx @@ -38,6 +38,7 @@ const initialProperties: SvgUnmappedProps = { tickRotation: -90, legend: '', legendOffset: 46, + truncateTickAt: 0, }, axisRight: { enable: true, @@ -47,6 +48,7 @@ const initialProperties: SvgUnmappedProps = { legend: 'country', legendPosition: 'middle', legendOffset: 70, + truncateTickAt: 0, }, axisBottom: { enable: false, @@ -56,6 +58,7 @@ const initialProperties: SvgUnmappedProps = { legend: '', legendPosition: 'middle', legendOffset: 36, + truncateTickAt: 0, }, axisLeft: { enable: true, @@ -65,6 +68,7 @@ const initialProperties: SvgUnmappedProps = { legend: 'country', legendPosition: 'middle', legendOffset: -72, + truncateTickAt: 0, }, colors: { type: 'diverging', diff --git a/website/src/pages/marimekko/index.tsx b/website/src/pages/marimekko/index.tsx index 96f3c5b28..e95b33b9b 100644 --- a/website/src/pages/marimekko/index.tsx +++ b/website/src/pages/marimekko/index.tsx @@ -53,6 +53,7 @@ const initialProperties = { tickRotation: 0, legend: '', legendOffset: 36, + truncateTickAt: 0, }, axisRight: { enable: true, @@ -62,6 +63,7 @@ const initialProperties = { tickRotation: 0, legend: '', legendOffset: 0, + truncateTickAt: 0, }, axisBottom: { enable: true, @@ -72,6 +74,7 @@ const initialProperties = { legend: 'participation', legendOffset: 36, legendPosition: 'middle', + truncateTickAt: 0, }, axisLeft: { enable: true, @@ -82,6 +85,7 @@ const initialProperties = { legend: 'opinions', legendOffset: -40, legendPosition: 'middle', + truncateTickAt: 0, }, enableGridX: defaultProps.enableGridX, enableGridY: defaultProps.enableGridY, diff --git a/website/src/pages/scatterplot/index.js b/website/src/pages/scatterplot/index.js index 138c3470c..257805836 100644 --- a/website/src/pages/scatterplot/index.js +++ b/website/src/pages/scatterplot/index.js @@ -43,6 +43,7 @@ const initialProperties = { tickRotation: 0, legend: '', legendOffset: 36, + truncateTickAt: 0, }, axisRight: { enable: false, @@ -52,6 +53,7 @@ const initialProperties = { tickRotation: 0, legend: '', legendOffset: 0, + truncateTickAt: 0, }, axisBottom: { enable: true, @@ -63,6 +65,7 @@ const initialProperties = { legendPosition: 'middle', legendOffset: 46, format: d => `${d} kg`, + truncateTickAt: 0, }, axisLeft: { enable: true, @@ -74,6 +77,7 @@ const initialProperties = { legendPosition: 'middle', legendOffset: -60, format: d => `${d} cm`, + truncateTickAt: 0, }, animate: svgDefaultProps.animate, diff --git a/website/src/pages/swarmplot/index.js b/website/src/pages/swarmplot/index.js index 966f1b802..07bf07468 100644 --- a/website/src/pages/swarmplot/index.js +++ b/website/src/pages/swarmplot/index.js @@ -57,6 +57,7 @@ const initialProperties = Object.freeze({ legend: 'group if vertical, price if horizontal', legendPosition: 'middle', legendOffset: -46, + truncateTickAt: 0, }, axisRight: { enable: true, @@ -67,6 +68,7 @@ const initialProperties = Object.freeze({ legend: 'price if vertical, group if horizontal', legendPosition: 'middle', legendOffset: 76, + truncateTickAt: 0, }, axisBottom: { enable: true, @@ -77,6 +79,7 @@ const initialProperties = Object.freeze({ legend: 'group if vertical, price if horizontal', legendPosition: 'middle', legendOffset: 46, + truncateTickAt: 0, }, axisLeft: { enable: true, @@ -87,6 +90,7 @@ const initialProperties = Object.freeze({ legend: 'price if vertical, group if horizontal', legendPosition: 'middle', legendOffset: -76, + truncateTickAt: 0, }, isInteractive: true,