Skip to content

Commit

Permalink
🐛 fix: Fix Chart in React 19
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jan 7, 2025
1 parent 53f0598 commit c248945
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/AreaChart/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export default () => {
value: 900,
},
autoMinValue: false,
barCategoryGap: 10,
connectNulls: false,
enableLegendSlider: false,
intervalType: {
Expand Down
3 changes: 1 addition & 2 deletions src/AreaChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const AreaChart = forwardRef<HTMLDivElement, AreaChartProps>((props, ref) => {
xAxisLabel,
yAxisLabel,
width = '100%',
height = '20rem',
height = 280,
style,
customCategories,
...rest
Expand Down Expand Up @@ -188,7 +188,6 @@ const AreaChart = forwardRef<HTMLDivElement, AreaChartProps>((props, ref) => {
dataKey={index}
dy={rotateLabelX?.verticalShift}
fill=""
height={rotateLabelX?.xAxisHeight}
hide={!showXAxis}
interval={startEndOnly ? 'preserveStartEnd' : intervalType}
minTickGap={tickGap}
Expand Down
1 change: 0 additions & 1 deletion src/BarChart/demos/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export default () => {
<h4>Number of species threatened with extinction (2021)</h4>
<BarChart
categories={['Number of threatened species']}
className="mt-6"
data={data}
index="name"
valueFormatter={valueFormatter}
Expand Down
1 change: 0 additions & 1 deletion src/BarChart/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export default () => {
},
maxValue: 1000,
minValue: 0,
relative: false,
showAnimation: false,
showGridLines: true,
showLegend: true,
Expand Down
4 changes: 1 addition & 3 deletions src/BarChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const BarChart = forwardRef<HTMLDivElement, BarChartProps>((props, ref) => {
yAxisLabel,
className,
width = '100%',
height = '20rem',
height = 280,
style,
...rest
} = props;
Expand Down Expand Up @@ -183,7 +183,6 @@ const BarChart = forwardRef<HTMLDivElement, BarChartProps>((props, ref) => {
domain={yAxisDomain as AxisDomain}
dy={rotateLabelX?.verticalShift}
fill=""
height={rotateLabelX?.xAxisHeight}
hide={!showXAxis}
minTickGap={tickGap}
stroke=""
Expand Down Expand Up @@ -215,7 +214,6 @@ const BarChart = forwardRef<HTMLDivElement, BarChartProps>((props, ref) => {
dataKey={index}
dy={rotateLabelX?.verticalShift}
fill=""
height={rotateLabelX?.xAxisHeight}
hide={!showXAxis}
interval={startEndOnly ? 'preserveStartEnd' : intervalType}
minTickGap={tickGap}
Expand Down
2 changes: 0 additions & 2 deletions src/FunnelChart/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ export default () => {
const props: FunnelChartProps | any = useControls(
{
barGap: '20%',
enableLegendSlider: false,
evolutionGradient: true,
gradient: false,
showArrow: true,
showGridLines: true,
showLegend: true,
showTooltip: true,
showXAxis: true,
showYAxis: true,
Expand Down
2 changes: 1 addition & 1 deletion src/FunnelChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const FunnelChart = forwardRef<HTMLDivElement, FunnelChartProps>((props, ref) =>
barGap = '20%',
loading,
width = '100%',
height = '20rem',
height = 280,
className,
style,
yAxisWidth,
Expand Down
2 changes: 0 additions & 2 deletions src/LineChart/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export default () => {
value: 900,
},
autoMinValue: false,
barCategoryGap: 10,
connectNulls: false,
enableLegendSlider: false,
intervalType: {
Expand All @@ -91,7 +90,6 @@ export default () => {
showTooltip: true,
showXAxis: true,
showYAxis: true,
stack: false,
startEndOnly: false,
tickGap: {
step: 1,
Expand Down
3 changes: 1 addition & 2 deletions src/LineChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const LineChart = forwardRef<HTMLDivElement, LineChartProps>((props, ref) => {
xAxisLabel,
yAxisLabel,
width = '100%',
height = '20rem',
height = 280,
style,
customCategories,
loading,
Expand Down Expand Up @@ -184,7 +184,6 @@ const LineChart = forwardRef<HTMLDivElement, LineChartProps>((props, ref) => {
dataKey={index}
dy={rotateLabelX?.verticalShift}
fill=""
height={rotateLabelX?.xAxisHeight}
hide={!showXAxis}
interval={startEndOnly ? 'preserveStartEnd' : intervalType}
minTickGap={tickGap}
Expand Down
1 change: 0 additions & 1 deletion src/ScatterChart/demos/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ export default () => {
showTooltip: true,
showXAxis: true,
showYAxis: true,
stack: false,
startEndOnly: false,
tickGap: {
step: 1,
Expand Down
3 changes: 1 addition & 2 deletions src/ScatterChart/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ const ScatterChart = forwardRef<HTMLDivElement, ScatterChartProps>((props, ref)
xAxisLabel,
yAxisLabel,
width = '100%',
height = '20rem',
height = 280,
style,
customCategories,
...rest
Expand Down Expand Up @@ -243,7 +243,6 @@ const ScatterChart = forwardRef<HTMLDivElement, ScatterChartProps>((props, ref)
domain={xAxisDomain as AxisDomain}
dy={rotateLabelX?.verticalShift}
fill=""
height={rotateLabelX?.xAxisHeight}
hide={!showXAxis}
interval={startEndOnly ? 'preserveStartEnd' : intervalType}
minTickGap={tickGap}
Expand Down

0 comments on commit c248945

Please sign in to comment.