File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
packages/react-charts/src/components Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -571,7 +571,7 @@ export const Chart: React.FunctionComponent<ChartProps> = ({
571571
572572 // Adjust for axis label
573573 React . Children . toArray ( children ) . map ( ( child : any ) => {
574- if ( child . type . role === 'axis' && child . props . label && ! child . props . dependentAxis ) {
574+ if ( child . type . role === 'axis' && child . props . label && child . props . fixAxisLabelHeight ) {
575575 xAxisLabelHeight = getLabelTextSize ( { text : child . props . label , theme } ) . height + 10 ;
576576 legendTitleHeight = 0 ;
577577 }
Original file line number Diff line number Diff line change @@ -157,6 +157,10 @@ export interface ChartAxisProps extends VictoryAxisProps {
157157 * @propType object[]
158158 */
159159 externalEventMutations ?: EventCallbackInterface < string | string [ ] , StringOrNumberOrList > [ ] ;
160+ /**
161+ * When true, this prop adjusts the height between the axis label and bottom positioned legend
162+ */
163+ fixAxisLabelHeight ?: boolean ;
160164 /**
161165 * When true, this prop reduces the number of tick labels to fit the length of the axis.
162166 * Labels are removed at approximately even intervals from the original array of labels.
You can’t perform that action at this time.
0 commit comments