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

Remove unnecessary props #33906

Draft
wants to merge 3 commits into
base: usr/agupta/stable-V9
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove unnecessary extended props from CartesianChart in DonutChart
  • Loading branch information
krkshitij committed Feb 26, 2025
commit ecf64c9231c5d17d622ad50dc5f32e98797b3d9b
12 changes: 11 additions & 1 deletion packages/charts/react-charts/library/etc/react-charts.api.md
Original file line number Diff line number Diff line change
@@ -355,17 +355,27 @@ export const DataVizPalette: {
export const DonutChart: React_2.FunctionComponent<DonutChartProps>;

// @public
export interface DonutChartProps extends CartesianChartProps {
export interface DonutChartProps {
calloutProps?: ChartPopoverProps;
className?: string;
culture?: string;
customProps?: (dataPointCalloutProps: ChartDataPoint) => ChartPopoverProps;
data?: ChartProps;
height?: number;
hideLabels?: boolean;
hideLegend?: boolean;
href?: string;
innerRadius?: number;
// (undocumented)
legendProps?: Partial<LegendsProps>;
// (undocumented)
legendsOverflowText?: any;
onRenderCalloutPerDataPoint?: (dataPointCalloutProps: ChartDataPoint) => JSX.Element | undefined;
parentRef?: HTMLElement | null;
showLabelsInPercent?: boolean;
styles?: DonutChartStyles;
valueInsideDonut?: string | number;
width?: number;
}

// @public
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { CartesianChartProps, CartesianChartStyleProps } from '../CommonComponents/index';
import { CartesianChartStyleProps } from '../CommonComponents/index';
import { ChartProps, ChartDataPoint } from './index';
import { ChartPopoverProps } from '../CommonComponents/ChartPopover.types';
import { LegendsProps } from '../Legends/index';

/**
* Donut Chart properties.
* {@docCategory DonutChart}
*/
export interface DonutChartProps extends CartesianChartProps {
export interface DonutChartProps {
/**
* Data to render in the chart.
*/
@@ -58,6 +59,48 @@ export interface DonutChartProps extends CartesianChartProps {
* @default true
*/
hideLabels?: boolean;

/**
* Below height used for resizing of the chart
* Wrap chart in your container and send the updated height and width to these props.
* These values decide wheather chart re render or not. Please check examples for reference
*/
height?: number;

/**
* Below width used for resizing of the chart
* Wrap chart in your container and send the updated height and width to these props.
* These values decide wheather chart re render or not. Please check examples for reference
*/
width?: number;

/**
* this prop takes its parent as a HTML element to define the width and height of the chart
*/
parentRef?: HTMLElement | null;

/**
* Additional CSS class(es) to apply to the Chart.
*/
className?: string;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
legendsOverflowText?: any;

/*
* props for the legends in the chart
*/
legendProps?: Partial<LegendsProps>;

/** decides wether to show/hide legends
* @defaultvalue false
*/
hideLegend?: boolean;

/**
* Url that the data-viz needs to redirect to upon clicking on it
*/
href?: string;
}

/**
Loading
Oops, something went wrong.