Skip to content

Commit b7985a2

Browse files
authored
fix(charts): adjust chart margin for continuous y-axis tick labels (#35376)
1 parent 8bb02c5 commit b7985a2

File tree

46 files changed

+1752
-1814
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1752
-1814
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "fix: adjust chart margin for continuous y-axis tick labels",
4+
"packageName": "@fluentui/react-charting",
5+
"email": "kumarkshitij@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "fix: adjust chart margin for continuous y-axis tick labels",
4+
"packageName": "@fluentui/react-charts",
5+
"email": "kumarkshitij@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ export interface ICartesianChartProps {
436436
};
437437
secondaryYScaleType?: AxisScaleType;
438438
showXAxisLablesTooltip?: boolean;
439+
showYAxisLables?: boolean;
440+
showYAxisLablesTooltip?: boolean;
439441
strokeWidth?: number;
440442
styles?: IStyleFunctionOrObject<ICartesianChartStyleProps, ICartesianChartStyles>;
441443
supportNegativeData?: boolean;
@@ -834,8 +836,6 @@ export interface IGanttChartProps extends ICartesianChartProps {
834836
maxBarHeight?: number;
835837
onRenderCalloutPerDataPoint?: IRenderFunction<IGanttChartDataPoint>;
836838
roundCorners?: boolean;
837-
showYAxisLables?: boolean;
838-
showYAxisLablesTooltip?: boolean;
839839
styles?: IStyleFunctionOrObject<IGanttChartStyleProps, IGanttChartStyles>;
840840
yAxisPadding?: number;
841841
}
@@ -1028,8 +1028,6 @@ export interface IHeatMapChartProps extends Pick<ICartesianChartProps, Exclude<k
10281028
domainValuesForColorScale: number[];
10291029
legendProps?: Partial<ILegendsProps>;
10301030
rangeValuesForColorScale: string[];
1031-
showYAxisLables?: boolean;
1032-
showYAxisLablesTooltip?: boolean;
10331031
sortOrder?: 'none' | 'alphabetical';
10341032
styles?: IStyleFunctionOrObject<IHeatMapChartStyleProps, IHeatMapChartStyles>;
10351033
xAxisDateFormatString?: string;
@@ -1129,8 +1127,6 @@ export interface IHorizontalBarChartWithAxisProps extends ICartesianChartProps {
11291127
enableGradient?: boolean;
11301128
onRenderCalloutPerDataPoint?: IRenderFunction<IHorizontalBarChartWithAxisDataPoint>;
11311129
roundCorners?: boolean;
1132-
showYAxisLables?: boolean;
1133-
showYAxisLablesTooltip?: boolean;
11341130
styles?: IStyleFunctionOrObject<IHorizontalBarChartWithAxisStyleProps, IHorizontalBarChartWithAxisStyles>;
11351131
useSingleColor?: boolean;
11361132
yAxisPadding?: number;
@@ -1397,7 +1393,7 @@ export interface IModifiedCartesianChartProps extends ICartesianChartProps {
13971393
// Warning: (ae-forgotten-export) The symbol "ChartTypes" needs to be exported by the entry point index.d.ts
13981394
chartType: ChartTypes;
13991395
children(props: IChildProps): React_2.ReactNode;
1400-
createStringYAxis: (yAxisParams: IYAxisParams, dataPoints: string[], isRtl: boolean, barWidth: number | undefined, chartType?: ChartTypes) => ScaleBand<string>;
1396+
createStringYAxis: (yAxisParams: IYAxisParams, dataPoints: string[], isRtl: boolean, axisData: IAxisData, barWidth: number | undefined, chartType?: ChartTypes) => ScaleBand<string>;
14011397
// Warning: (ae-forgotten-export) The symbol "IYAxisParams" needs to be exported by the entry point index.d.ts
14021398
// Warning: (ae-forgotten-export) The symbol "IAxisData" needs to be exported by the entry point index.d.ts
14031399
createYAxis: (yAxisParams: IYAxisParams, isRtl: boolean, axisData: IAxisData, isIntegralDataset: boolean, useSecondaryYScale?: boolean, supportNegativeData?: boolean, roundedTicks?: boolean, scaleType?: AxisScaleType) => ScaleLinear<number, number, never>;
@@ -1410,7 +1406,7 @@ export interface IModifiedCartesianChartProps extends ICartesianChartProps {
14101406
getAxisData?: any;
14111407
getDomainMargins?: (containerWidth: number) => IMargins;
14121408
// Warning: (ae-forgotten-export) The symbol "IDomainNRange" needs to be exported by the entry point index.d.ts
1413-
getDomainNRangeValues: (points: ILineChartPoints[] | IVerticalBarChartDataPoint[] | IVerticalStackedBarDataPoint[] | IHorizontalBarChartWithAxisDataPoint[] | IGroupedVerticalBarChartData[] | IHeatMapChartDataPoint[] | IGanttChartDataPoint[], margins: IMargins, width: number, chartType: ChartTypes, isRTL: boolean, xAxisType: XAxisTypes, barWidth: number, tickValues: Date[] | number[] | string[] | undefined, shiftX: number) => IDomainNRange;
1409+
getDomainNRangeValues: (points: ILineChartPoints[] | IVerticalBarChartDataPoint[] | IVerticalStackedBarDataPoint[] | IHorizontalBarChartWithAxisDataPoint[] | IGroupedVerticalBarChartData[] | IHeatMapChartDataPoint[] | IGanttChartDataPoint[], margins: IMargins, width: number, chartType: ChartTypes, isRTL: boolean, xAxisType: XAxisTypes, barWidth: number, tickValues: Date[] | number[] | string[] | undefined) => IDomainNRange;
14141410
getGraphData?: any;
14151411
getmargins?: (margins: IMargins) => void;
14161412
getMinMaxOfYAxis: (points: ILineChartPoints[] | IHorizontalBarChartWithAxisDataPoint[] | IVerticalBarChartDataPoint[] | IDataPoint[] | IScatterChartPoints[] | IGanttChartDataPoint[], yAxisType: YAxisType | undefined, useSecondaryYScale?: boolean) => {
@@ -1653,7 +1649,6 @@ export interface IScatterChartProps extends ICartesianChartProps {
16531649
data: IChartProps;
16541650
getCalloutDescriptionMessage?: (calloutDataProps: ICustomizedCalloutData) => string | undefined;
16551651
onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;
1656-
showYAxisLablesTooltip?: boolean;
16571652
styles?: IScatterChartStyles;
16581653
}
16591654

@@ -1915,8 +1910,6 @@ export interface IVerticalStackedBarChartProps extends ICartesianChartProps {
19151910
onRenderCalloutPerDataPoint?: IRenderFunction<IVSChartDataPoint>;
19161911
onRenderCalloutPerStack?: IRenderFunction<IVerticalStackedChartProps>;
19171912
roundCorners?: boolean;
1918-
showYAxisLables?: boolean;
1919-
showYAxisLablesTooltip?: boolean;
19201913
styles?: IStyleFunctionOrObject<IVerticalStackedBarChartStyleProps, IVerticalStackedBarChartStyles>;
19211914
xAxisInnerPadding?: number;
19221915
xAxisOuterPadding?: number;

0 commit comments

Comments
 (0)