Skip to content

feat(react-charts): Migrate VSBC to V9 #33909

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

Merged
merged 33 commits into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ef9b968
migrate VSBC to V9
Anush2303 Feb 26, 2025
f25d2cc
fix build errors
Anush2303 Feb 27, 2025
4f995a0
Add change file
Anush2303 Feb 27, 2025
bcb624c
Add chart popover
Anush2303 Feb 27, 2025
744b914
change in condition
Anush2303 Feb 27, 2025
72e3c94
Add tabster
Anush2303 Feb 28, 2025
563bc9e
remove unused code
Anush2303 Feb 28, 2025
80b0b1a
resolve comments
Anush2303 Mar 1, 2025
c03487f
bug fix: segments not greying out
Anush2303 Mar 1, 2025
190892d
popover not closing fix
Anush2303 Mar 1, 2025
9ca970f
resolve comments
Anush2303 Mar 11, 2025
3dc3740
resolve comments
Anush2303 Mar 11, 2025
07f55fd
fix popover bug
Anush2303 Mar 11, 2025
85f8cfc
revert change
Anush2303 Mar 11, 2025
b9c4194
fix build errors
Anush2303 Mar 11, 2025
bfde893
Merge branch 'master' into usr/agupta/v9/VSBC
Anush2303 Mar 12, 2025
f54c9b5
Merge branch 'master' of https://github.com/microsoft/fluentui into u…
Anush2303 Mar 26, 2025
2ac8a60
Merge branch 'usr/agupta/v9/VSBC' of https://github.com/microsoft/flu…
Anush2303 Mar 26, 2025
04dc955
add missed utility
Anush2303 Mar 26, 2025
a801cc8
solve build error
Anush2303 Mar 26, 2025
0a42996
Regenerate change file
Anush2303 Mar 26, 2025
e2d0142
fix build error
Anush2303 Mar 26, 2025
76eeda4
resolve comments
Anush2303 Mar 27, 2025
73fd1f6
resolve comments
Anush2303 Mar 31, 2025
6a5125a
Add description and Best practices
Anush2303 Mar 31, 2025
ba0156e
Add VSBC AxisTooltip example
Anush2303 Mar 31, 2025
ccb8bbf
Add Callout example
Anush2303 Apr 1, 2025
0748b32
fix build error
Anush2303 Apr 1, 2025
6ed8226
Add examples for VSBC
Anush2303 Apr 1, 2025
6262b51
Merge branch 'master' into usr/agupta/v9/VSBC
Anush2303 Apr 1, 2025
b5092a2
Merge branch 'master' of https://github.com/microsoft/fluentui into u…
Anush2303 Apr 1, 2025
62cdd4f
Merge branch 'usr/agupta/v9/VSBC' of https://github.com/microsoft/flu…
Anush2303 Apr 1, 2025
26f1289
fix build error
Anush2303 Apr 1, 2025
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Migrate VSBC to v9 ",
"packageName": "@fluentui/react-charts",
"email": "74965306+Anush2303@users.noreply.github.com",
"dependentChangeType": "patch"
}
44 changes: 44 additions & 0 deletions packages/charts/react-charts/library/etc/react-charts.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ export interface LineDataInVerticalStackedBarChart {
data?: number;
// (undocumented)
legend: string;
lineOptions?: LineChartLineOptions;
useSecondaryYScale?: boolean;
// (undocumented)
y: number;
Expand All @@ -863,13 +864,15 @@ export interface ModifiedCartesianChartProps extends CartesianChartProps {
chartType: ChartTypes;
children(props: ChildProps): React_2.ReactNode;
culture?: string;
customizedCallout?: any;
datasetForXAxisDomain?: string[];
enableFirstRenderOptimization?: boolean;
// (undocumented)
getAxisData?: any;
getDomainMargins?: (containerWidth: number) => Margins;
getGraphData?: any;
getmargins?: (margins: Margins) => void;
isCalloutForStack?: boolean;
legendBars: JSX.Element | null;
maxOfYVal?: number;
onChartMouseLeave?: () => void;
Expand Down Expand Up @@ -1059,6 +1062,46 @@ export interface VerticalBarChartStyles extends CartesianChartStyles {
barLabel: string;
}

// @public (undocumented)
export const VerticalStackedBarChart: React_2.FunctionComponent<VerticalStackedBarChartProps>;

// @public
export interface VerticalStackedBarChartProps extends CartesianChartProps {
allowHoverOnLegend?: boolean;
barCornerRadius?: number;
barGapMax?: number;
barMinimumHeight?: number;
barWidth?: number | 'default' | 'auto';
chartTitle?: string;
culture?: string;
data: VerticalStackedChartProps[];
enableGradient?: boolean;
hideLabels?: boolean;
isCalloutForStack?: boolean;
lineOptions?: LineChartLineOptions;
maxBarWidth?: number;
mode?: 'default' | 'plotly';
onBarClick?: (event: React_2.MouseEvent<SVGElement>, data: VerticalStackedChartProps | VSChartDataPoint) => void;
onRenderCalloutPerDataPoint?: RenderFunction<VSChartDataPoint>;
onRenderCalloutPerStack?: RenderFunction<VerticalStackedChartProps>;
roundCorners?: boolean;
styles?: VerticalStackedBarChartStyles;
xAxisInnerPadding?: number;
xAxisOuterPadding?: number;
xAxisPadding?: number;
yMinValue?: undefined;
}

// @public
export interface VerticalStackedBarChartStyleProps extends CartesianChartStyleProps {
}

// @public
export interface VerticalStackedBarChartStyles extends CartesianChartStyles {
barLabel: string;
opacityChangeOnHover?: string;
}

// @public (undocumented)
export interface VerticalStackedBarDataPoint extends Omit<DataPoint, 'x'> {
x: number | string | Date;
Expand All @@ -1077,6 +1120,7 @@ export interface VerticalStackedChartProps {
export interface VSChartDataPoint {
callOutAccessibilityData?: AccessibilityProps;
color?: string;
culture?: string;
data: number;
legend: string;
xAxisCalloutData?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './components/VerticalStackedBarChart/index';
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,22 @@ export interface ModifiedCartesianChartProps extends CartesianChartProps {
*/
children(props: ChildProps): React.ReactNode;

/**
* To enable callout for individual bar or complete stack. Using for only Vertical stacked bar chart.
* @default false
* @type \{boolean \}
*/
isCalloutForStack?: boolean;

/** dataset values to find out domain of the String axis
* Present using for only vertical stacked bar chart and grouped vertical bar chart
*/
datasetForXAxisDomain?: string[];

/** Own callout design */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
customizedCallout?: any;

/**
* if the data points for the y-axis is of type string, then we need to give this
* prop to construct the y-axis
Expand Down
Loading