Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "feat: add HeatMapChart in v9",
"packageName": "@fluentui/react-charts",
"email": "110246001+krkshitij@users.noreply.github.com",
"dependentChangeType": "patch"
}
55 changes: 55 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 @@ -516,6 +516,9 @@ export type GaugeValueFormat = 'percentage' | 'fraction';
// @public (undocumented)
export const getChartValueLabel: (chartValue: number, minValue: number, maxValue: number, chartValueFormat?: GaugeValueFormat | ((sweepFraction: [number, number]) => string) | undefined, forCallout?: boolean) => string;

// @public (undocumented)
export const getColorContrast: (c1: string, c2: string) => number;

// @public (undocumented)
export const getColorFromToken: (token: string, isDarkTheme?: boolean) => string;

Expand Down Expand Up @@ -588,6 +591,58 @@ export interface GVSingleDataPoint {
[key: string]: GVDataPoint;
}

// @public (undocumented)
export const HeatMapChart: React_2.FunctionComponent<HeatMapChartProps>;

// @public (undocumented)
export interface HeatMapChartData {
// (undocumented)
data: HeatMapChartDataPoint[];
legend: string;
value: number;
}

// @public (undocumented)
export interface HeatMapChartDataPoint {
callOutAccessibilityData?: AccessibilityProps;
descriptionMessage?: string;
onClick?: VoidFunction;
ratio?: [number, number];
rectText?: string | number;
// (undocumented)
value: number;
// (undocumented)
x: string | Date | number;
// (undocumented)
y: string | Date | number;
}

// @public
export interface HeatMapChartProps extends CartesianChartProps {
chartTitle?: string;
culture?: string;
data: HeatMapChartData[];
domainValuesForColorScale: number[];
rangeValuesForColorScale: string[];
showYAxisLables?: boolean;
sortOrder?: 'none' | 'alphabetical';
styles?: HeatMapChartStyles;
xAxisDateFormatString?: string;
xAxisNumberFormatString?: string;
xAxisStringFormatter?: (point: string) => string;
yAxisDateFormatString?: string;
yAxisNumberFormatString?: string;
yAxisStringFormatter?: (point: string) => string;
}

// @public
export interface HeatMapChartStyles extends CartesianChartStyles {
// (undocumented)
root?: string;
// (undocumented)
text?: string;
}

// @public
export const HorizontalBarChart: React_2.FunctionComponent<HorizontalBarChartProps>;

Expand Down
2 changes: 2 additions & 0 deletions packages/charts/react-charts/library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@swc/helpers": "^0.5.1",
"@types/d3-array": "^3.0.0",
"@types/d3-axis": "^3.0.0",
"@types/d3-color": "^3.0.0",
"@types/d3-format": "^3.0.0",
"@types/d3-hierarchy": "^3.0.0",
"@types/d3-sankey": "^0.12.3",
Expand All @@ -60,6 +61,7 @@
"@types/d3-time-format": "^3.0.0",
"d3-array": "^3.0.0",
"d3-axis": "^3.0.0",
"d3-color": "^3.0.0",
"d3-format": "^3.0.0",
"d3-hierarchy": "^3.0.0",
"d3-sankey": "^0.12.3",
Expand Down
1 change: 1 addition & 0 deletions packages/charts/react-charts/library/src/HeatMapChart.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './components/HeatMapChart/index';
Loading