Skip to content

Commit 2100736

Browse files
Introduce a new annotated component
1 parent b130f3b commit 2100736

File tree

9 files changed

+517
-78
lines changed

9 files changed

+517
-78
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "\u0016feat(react-charts) add a variant to horizontal bar charts with annotations",
4+
"packageName": "@fluentui/react-charts",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/charts/react-charts/library/etc/react-charts.api.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,11 @@ export interface Chart {
223223
}
224224

225225
// @public
226-
export type ChartDataMode = 'default' | 'fraction' | 'percentage';
226+
export type ChartDataMode = 'default' | 'fraction' | 'percentage' | 'hidden';
227227

228228
// @public (undocumented)
229229
export interface ChartDataPoint {
230+
annotationInformation?: string[];
230231
callOutAccessibilityData?: AccessibilityProps;
231232
color?: string;
232233
data?: number;
@@ -715,14 +716,18 @@ export const HorizontalBarChart: React_2.FunctionComponent<HorizontalBarChartPro
715716

716717
// @public
717718
export interface HorizontalBarChartProps extends React_2.RefAttributes<HTMLDivElement> {
719+
allowHoverOnSegment?: boolean;
718720
barHeight?: number;
719721
calloutProps?: ChartPopoverProps;
720722
calloutPropsPerDataPoint?: (dataPointCalloutProps: ChartDataPoint) => ChartPopoverProps;
721723
chartDataMode?: ChartDataMode;
722724
className?: string;
723725
color?: string;
726+
containerWidth?: number;
724727
culture?: string;
725728
data?: ChartProps[];
729+
// (undocumented)
730+
displayAnnotationIcon?: (segment: ChartDataPoint, index: number) => React_2.ReactNode;
726731
hideLabels?: boolean;
727732
hideRatio?: boolean[];
728733
hideTooltip?: boolean;
@@ -731,6 +736,7 @@ export interface HorizontalBarChartProps extends React_2.RefAttributes<HTMLDivEl
731736
// (undocumented)
732737
legendsOverflowText?: any;
733738
onRenderCalloutPerHorizontalBar?: (props: ChartDataPoint) => JSX.Element | undefined;
739+
showAnnotationsInPercentage?: boolean;
734740
showTriangle?: boolean;
735741
styles?: HorizontalBarChartStyles;
736742
variant?: HorizontalBarChartVariant;
@@ -743,6 +749,7 @@ export interface HorizontalBarChartStyles {
743749
barWrapper: string;
744750
benchmarkContainer: string;
745751
chart: string;
752+
chartAnnotationText: string;
746753
chartDataTextDenominator: string;
747754
chartTitle: string;
748755
chartTitleLeft: string;
@@ -1245,6 +1252,13 @@ export interface Schema {
12451252
plotlySchema: any;
12461253
}
12471254

1255+
// @public (undocumented)
1256+
export type segment = {
1257+
percent: number;
1258+
adjustedPercent: number;
1259+
rawValue: number;
1260+
};
1261+
12481262
// @public (undocumented)
12491263
export const Shape: React_2.FunctionComponent<ShapeProps>;
12501264

0 commit comments

Comments
 (0)