@spteck/fluentui-react-charts 1.1.2 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/charts/BarChart/BarChart.d.ts +4 -1
- package/dist/charts/ComboChart/ComboChart.d.ts +4 -1
- package/dist/charts/Doughnut/DoughnutChart.d.ts +4 -1
- package/dist/charts/PieChart/PieChart.d.ts +4 -1
- package/dist/charts/areaChart/AreaChart.d.ts +4 -1
- package/dist/charts/barHorizontalChart/BarHotizontalChart.d.ts +4 -1
- package/dist/charts/bubbleChart/BubbleChart.d.ts +4 -1
- package/dist/charts/floatBarChart/FloatBarChart.d.ts +4 -1
- package/dist/charts/index.d.ts +1 -0
- package/dist/charts/lineChart/LineChart.d.ts +4 -1
- package/dist/charts/polarChart/PolarChart.d.ts +4 -1
- package/dist/charts/radarChart/RadarChart.d.ts +4 -1
- package/dist/charts/scatterChart/ScatterChart.d.ts +4 -1
- package/dist/charts/stackedLineChart/StackedLineChart.d.ts +4 -1
- package/dist/charts/steamChart/SteamChart.d.ts +4 -1
- package/dist/constants/palettes.d.ts +8 -0
- package/dist/fluentui-react-charts.cjs.development.js +200 -79
- package/dist/fluentui-react-charts.cjs.development.js.map +1 -1
- package/dist/fluentui-react-charts.cjs.production.min.js +1 -1
- package/dist/fluentui-react-charts.cjs.production.min.js.map +1 -1
- package/dist/fluentui-react-charts.esm.js +200 -79
- package/dist/fluentui-react-charts.esm.js.map +1 -1
- package/dist/hooks/useChartUtils.d.ts +6 -4
- package/dist/models/IChart.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChartType, TooltipOptions } from 'chart.js';
|
|
1
|
+
import { ChartType, TooltipItem, TooltipOptions } from 'chart.js';
|
|
2
2
|
import { Theme } from '@fluentui/react-components';
|
|
3
3
|
/**
|
|
4
4
|
* Lightens a given hex color by a percentage amount (0 to 1).
|
|
5
5
|
*/
|
|
6
6
|
export declare const lightenColor: (hex: string, amount: number) => string;
|
|
7
|
-
export declare const getFluentPalette: (theme: Theme) => string[];
|
|
7
|
+
export declare const getFluentPalette: (theme: Theme, paletteId?: number | undefined) => string[];
|
|
8
8
|
/**
|
|
9
9
|
* Returns animation configuration for instant interactions.
|
|
10
10
|
* Disables hover/tooltip animations for immediate response.
|
|
@@ -23,7 +23,9 @@ export declare const getInstantInteractionAnimations: () => {
|
|
|
23
23
|
* Smart Fluent tooltip generator with chart-type awareness.
|
|
24
24
|
* Optimized for fast performance with reduced animation delays.
|
|
25
25
|
*/
|
|
26
|
-
export declare function createFluentTooltip<TType extends ChartType>(theme: Theme
|
|
26
|
+
export declare function createFluentTooltip<TType extends ChartType>(theme: Theme, opts?: {
|
|
27
|
+
extraField?: string | ((item: TooltipItem<TType>) => string | number | undefined);
|
|
28
|
+
}): Partial<TooltipOptions<TType>>;
|
|
27
29
|
/**
|
|
28
30
|
* Returns a Chart.js ticks callback to truncate long labels and add optional prefix/suffix.
|
|
29
31
|
*/
|
|
@@ -38,7 +40,7 @@ declare function debounce<T extends (...args: any[]) => void>(fn: T, delay: numb
|
|
|
38
40
|
*/
|
|
39
41
|
export declare function useChartUtils(theme?: Theme): {
|
|
40
42
|
lightenColor: (hex: string, amount: number) => string;
|
|
41
|
-
getFluentPalette: (theme: Theme) => string[];
|
|
43
|
+
getFluentPalette: (theme: Theme, paletteId?: number | undefined) => string[];
|
|
42
44
|
createFluentTooltip: typeof createFluentTooltip;
|
|
43
45
|
createAxisLabelFormatter: ({ maxLength, suffix, prefix, }: {
|
|
44
46
|
maxLength?: number | undefined;
|
package/dist/models/IChart.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TooltipItem } from "../charts";
|
|
1
2
|
export declare type ChartType = 'bar' | 'line' | 'area' | 'band' | 'bar-horizontal' | 'bubble' | 'steam' | 'multiple-axes' | 'floating-bar' | 'stacked-line' | 'doughnut' | 'pie' | 'radar' | 'polar' | 'combo' | 'gauge' | 'funnel' | 'heatmap' | 'treemap' | 'sunburst' | 'sankey' | 'waterfall' | 'boxplot' | 'violin' | 'radial-bar' | 'sparkline' | 'scatter';
|
|
2
3
|
export declare type ChartData = {
|
|
3
4
|
name: string;
|
|
@@ -20,6 +21,8 @@ export interface IChart {
|
|
|
20
21
|
/** optional axes mode used by combo charts: 'legacy' | 'dual' */
|
|
21
22
|
axesMode?: 'legacy' | 'dual';
|
|
22
23
|
showDataLabels?: boolean;
|
|
24
|
+
renderTooltipLabel?: (item: TooltipItem<any>) => string | number | undefined;
|
|
25
|
+
paletteId?: number;
|
|
23
26
|
}
|
|
24
27
|
export interface BubbleDatum {
|
|
25
28
|
primary: number | string | Date;
|
package/package.json
CHANGED