Skip to content

Commit

Permalink
Merge branch 'master' into feat/add-eslint-rule-prefer-v9
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrokirpa authored Dec 31, 2024
2 parents 86d62e6 + bf1b91f commit c79bb19
Show file tree
Hide file tree
Showing 19 changed files with 114 additions and 24 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "patch",
"comment": "[Horizontal Bar Chart With Axis] Enable multiple legend selection",
"comment": "Initialization of state variables and updating for HorizontalBarChartWithAxis chart",
"packageName": "@fluentui/react-charting",
"email": "[email protected]",
"dependentChangeType": "patch"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "HeatMap chart bug fixes",
"packageName": "@fluentui/react-charting",
"email": "[email protected]",
"dependentChangeType": "patch"
}
21 changes: 21 additions & 0 deletions packages/charts/react-charting/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
{
"name": "@fluentui/react-charting",
"entries": [
{
"date": "Tue, 31 Dec 2024 07:21:44 GMT",
"tag": "@fluentui/react-charting_v5.23.34",
"version": "5.23.34",
"comments": {
"patch": [
{
"author": "[email protected]",
"package": "@fluentui/react-charting",
"commit": "98e409211ed673c877e45bbff7ccc08a1ccd34de",
"comment": "[Horizontal Bar Chart With Axis] Enable multiple legend selection"
},
{
"author": "[email protected]",
"package": "@fluentui/react-charting",
"commit": "d61ac31da90bf8f73f54262e196b3a83b9a85932",
"comment": "[Gauge Chart] Enabling legend multi selection"
}
]
}
},
{
"date": "Mon, 30 Dec 2024 07:21:28 GMT",
"tag": "@fluentui/react-charting_v5.23.33",
Expand Down
12 changes: 11 additions & 1 deletion packages/charts/react-charting/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# Change Log - @fluentui/react-charting

This log was last generated on Mon, 30 Dec 2024 07:21:28 GMT and should not be manually modified.
This log was last generated on Tue, 31 Dec 2024 07:21:44 GMT and should not be manually modified.

<!-- Start content -->

## [5.23.34](https://github.com/microsoft/fluentui/tree/@fluentui/react-charting_v5.23.34)

Tue, 31 Dec 2024 07:21:44 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-charting_v5.23.33..@fluentui/react-charting_v5.23.34)

### Patches

- [Horizontal Bar Chart With Axis] Enable multiple legend selection ([PR #33484](https://github.com/microsoft/fluentui/pull/33484) by [email protected])
- [Gauge Chart] Enabling legend multi selection ([PR #33524](https://github.com/microsoft/fluentui/pull/33524) by [email protected])

## [5.23.33](https://github.com/microsoft/fluentui/tree/@fluentui/react-charting_v5.23.33)

Mon, 30 Dec 2024 07:21:28 GMT
Expand Down
1 change: 1 addition & 0 deletions packages/charts/react-charting/etc/react-charting.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,7 @@ export interface IHeatMapChartProps extends Pick<ICartesianChartProps, Exclude<k
legendProps?: Partial<ILegendsProps>;
rangeValuesForColorScale: string[];
showYAxisLables?: boolean;
sortOrder?: 'none' | 'alphabetical';
styles?: IStyleFunctionOrObject<IHeatMapChartStyleProps, IHeatMapChartStyles>;
xAxisDateFormatString?: string;
xAxisNumberFormatString?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/charts/react-charting/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fluentui/react-charting",
"version": "5.23.33",
"version": "5.23.34",
"description": "React web charting controls for Microsoft fluentui system.",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ export const DeclarativeChart: React.FunctionComponent<DeclarativeChartProps> =
return (
<HeatMapChart
{...transformPlotlyJsonToHeatmapProps(plotlySchema)}
legendProps={legendProps}
componentRef={chartRef}
calloutProps={{ layerProps: { eventBubblingEnabled: true } }}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ export const transformPlotlyJsonToHeatmapProps = (jsonObj: any): IHeatMapChartPr
x: layout.xaxis?.type === 'date' ? new Date(xVal) : xVal,
y: layout.yaxis?.type === 'date' ? new Date(yVal) : yVal,
value: zVal,
rectText: zVal,
});

zMin = Math.min(zMin, zVal);
Expand All @@ -423,6 +424,7 @@ export const transformPlotlyJsonToHeatmapProps = (jsonObj: any): IHeatMapChartPr
rangeValuesForColorScale,
hideLegend: true,
showYAxisLables: true,
sortOrder: 'none',
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,11 @@ export class HeatMapChartBase extends React.Component<IHeatMapChartProps, IHeatM
yPoints[item]
.sort((a: IHeatMapChartDataPoint, b: IHeatMapChartDataPoint) => {
if (this._xAxisType === XAxisTypes.StringAxis) {
return (a.x as string).toLowerCase() > (b.x as string).toLowerCase() ? 1 : -1;
return this.props.sortOrder === 'none'
? 0
: (a.x as string).toLowerCase() > (b.x as string).toLowerCase()
? 1
: -1;
} else if (this._xAxisType === XAxisTypes.DateAxis) {
return (a.x as Date).getTime() - (b.x as Date).getTime();
} else if (this._xAxisType === XAxisTypes.NumericAxis) {
Expand Down Expand Up @@ -687,7 +691,7 @@ export class HeatMapChartBase extends React.Component<IHeatMapChartProps, IHeatM
if (this._xAxisType === XAxisTypes.DateAxis || this._xAxisType === XAxisTypes.NumericAxis) {
return +a - +b;
} else {
return a.toLowerCase() > b.toLowerCase() ? 1 : -1;
return this.props.sortOrder === 'none' ? 0 : a.toLowerCase() > b.toLowerCase() ? 1 : -1;
}
});
xAxisPoints = unFormattedXAxisDataPoints.map((xPoint: string) => {
Expand All @@ -714,7 +718,7 @@ export class HeatMapChartBase extends React.Component<IHeatMapChartProps, IHeatM
if (this._yAxisType === YAxisType.DateAxis || this._yAxisType === YAxisType.NumericAxis) {
return +a - +b;
} else {
return a.toLowerCase() > b.toLowerCase() ? 1 : -1;
return this.props.sortOrder === 'none' ? 0 : a.toLowerCase() > b.toLowerCase() ? 1 : -1;
}
});
yAxisPoints = unFormattedYAxisDataPoints.map((yPoint: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ export interface IHeatMapChartProps extends Pick<ICartesianChartProps, Exclude<k
*@default false
*Used for showing complete y axis lables */
showYAxisLables?: boolean;

/**
* @default alphabetical
* The prop used to decide order of string axis labels */
sortOrder?: 'none' | 'alphabetical';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class HorizontalBarChartWithAxisBase
activeXdataPoint: null,
YValueHover: [],
hoverXValue: '',
selectedLegends: [],
selectedLegends: props.legendProps?.selectedLegends || [],
};
this._calloutId = getId('callout');
this._tooltipId = getId('HBCWATooltipID_');
Expand Down Expand Up @@ -605,7 +605,7 @@ export class HorizontalBarChartWithAxisBase
const { useSingleColor = false } = this.props;
const bars = this._points.map((point: IHorizontalBarChartWithAxisDataPoint, index: number) => {
let shouldHighlight = true;
if (this._getHighlightedLegend().length > 0) {
if (this.state.isLegendHovered || this.state.isLegendSelected) {
shouldHighlight = this._isLegendHighlighted(point.legend);
}
this._classNames = getClassNames(this.props.styles!, {
Expand Down
15 changes: 15 additions & 0 deletions packages/react-docsite-components/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@fluentui/react-docsite-components",
"entries": [
{
"date": "Tue, 31 Dec 2024 07:21:45 GMT",
"tag": "@fluentui/react-docsite-components_v8.13.154",
"version": "8.13.154",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/react-docsite-components",
"comment": "Bump @fluentui/react-monaco-editor to v1.7.272",
"commit": "d61ac31da90bf8f73f54262e196b3a83b9a85932"
}
]
}
},
{
"date": "Mon, 30 Dec 2024 07:21:29 GMT",
"tag": "@fluentui/react-docsite-components_v8.13.153",
Expand Down
11 changes: 10 additions & 1 deletion packages/react-docsite-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Change Log - @fluentui/react-docsite-components

This log was last generated on Mon, 30 Dec 2024 07:21:29 GMT and should not be manually modified.
This log was last generated on Tue, 31 Dec 2024 07:21:45 GMT and should not be manually modified.

<!-- Start content -->

## [8.13.154](https://github.com/microsoft/fluentui/tree/@fluentui/react-docsite-components_v8.13.154)

Tue, 31 Dec 2024 07:21:45 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-docsite-components_v8.13.153..@fluentui/react-docsite-components_v8.13.154)

### Patches

- Bump @fluentui/react-monaco-editor to v1.7.272 ([PR #33524](https://github.com/microsoft/fluentui/pull/33524) by beachball)

## [8.13.153](https://github.com/microsoft/fluentui/tree/@fluentui/react-docsite-components_v8.13.153)

Mon, 30 Dec 2024 07:21:29 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/react-docsite-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fluentui/react-docsite-components",
"version": "8.13.153",
"version": "8.13.154",
"description": "Fluent UI React components for building documentation sites.",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
Expand Down Expand Up @@ -42,7 +42,7 @@
"@fluentui/public-docsite-setup": "^0.3.34",
"@fluentui/react-hooks": "^8.8.16",
"@fluentui/set-version": "^8.2.23",
"@fluentui/react-monaco-editor": "^1.7.271",
"@fluentui/react-monaco-editor": "^1.7.272",
"color-check": "0.0.2",
"markdown-to-jsx": "^7.0.0",
"office-ui-fabric-core": "^11.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"@fluentui/merge-styles": "^8.6.13",
"@fluentui/react": "^8.122.3",
"@fluentui/react-cards": "^0.205.192",
"@fluentui/react-charting": "^5.23.33",
"@fluentui/react-docsite-components": "^8.13.153",
"@fluentui/react-charting": "^5.23.34",
"@fluentui/react-docsite-components": "^8.13.154",
"@fluentui/react-experiments": "^8.14.189",
"@fluentui/react-file-type-icons": "^8.12.7",
"@fluentui/react-focus": "^8.9.20",
Expand Down
15 changes: 15 additions & 0 deletions packages/react-monaco-editor/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@fluentui/react-monaco-editor",
"entries": [
{
"date": "Tue, 31 Dec 2024 07:21:45 GMT",
"tag": "@fluentui/react-monaco-editor_v1.7.272",
"version": "1.7.272",
"comments": {
"patch": [
{
"author": "beachball",
"package": "@fluentui/react-monaco-editor",
"comment": "Bump @fluentui/react-charting to v5.23.34",
"commit": "d61ac31da90bf8f73f54262e196b3a83b9a85932"
}
]
}
},
{
"date": "Mon, 30 Dec 2024 07:21:29 GMT",
"tag": "@fluentui/react-monaco-editor_v1.7.271",
Expand Down
11 changes: 10 additions & 1 deletion packages/react-monaco-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
# Change Log - @fluentui/react-monaco-editor

This log was last generated on Mon, 30 Dec 2024 07:21:29 GMT and should not be manually modified.
This log was last generated on Tue, 31 Dec 2024 07:21:45 GMT and should not be manually modified.

<!-- Start content -->

## [1.7.272](https://github.com/microsoft/fluentui/tree/@fluentui/react-monaco-editor_v1.7.272)

Tue, 31 Dec 2024 07:21:45 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-monaco-editor_v1.7.271..@fluentui/react-monaco-editor_v1.7.272)

### Patches

- Bump @fluentui/react-charting to v5.23.34 ([PR #33524](https://github.com/microsoft/fluentui/pull/33524) by beachball)

## [1.7.271](https://github.com/microsoft/fluentui/tree/@fluentui/react-monaco-editor_v1.7.271)

Mon, 30 Dec 2024 07:21:29 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/react-monaco-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fluentui/react-monaco-editor",
"version": "1.7.271",
"version": "1.7.272",
"description": "Live React example editing using monaco",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
Expand Down Expand Up @@ -34,7 +34,7 @@
"@fluentui/example-data": "^8.4.25",
"@fluentui/monaco-editor": "^1.3.24",
"@fluentui/react-hooks": "^8.8.16",
"@fluentui/react-charting": "^5.23.33",
"@fluentui/react-charting": "^5.23.34",
"raw-loader": "4.0.2",
"react-syntax-highlighter": "^10.1.3",
"tslib": "^2.1.0"
Expand Down

0 comments on commit c79bb19

Please sign in to comment.