Skip to content

Commit

Permalink
Fixing build error
Browse files Browse the repository at this point in the history
  • Loading branch information
srmukher committed Jan 9, 2025
1 parent 199f867 commit 7fbe2c1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ import {
formatDate,
getSecureProps,
areArraysEqual,
AreaChartModes,
} from '../../utilities/index';
import { ILegend, Legends } from '../Legends/index';
import { DirectionalHint } from '@fluentui/react/lib/Callout';
import { IChart } from '../../types/index';
import { AreaChartModes } from './AreaChart.types';

const getClassNames = classNamesFunction<IAreaChartStyleProps, IAreaChartStyles>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,10 @@ import {
ICartesianChartProps,
IChildProps,
} from '../CommonComponents/CartesianChart.types';
import { AreaChartModes } from '../../utilities/area-utils';

export type { IChildProps, IRefArrayData, IBasestate, ILineChartDataPoint, ILineChartPoints, IMargins };

export enum AreaChartModes {
/**
* This mode will fill the area from the line to the x-axis.
*/
toZeroY = 'tozeroy',

/**
* This mode will fill the area from the line to the next line.
*/
toNextY = 'tonexty',
}

/**
* Area Chart properties.
* {@docCategory AreaChart}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ import { ISankeyChartProps } from '../SankeyChart/index';
import { IVerticalStackedBarChartProps } from '../VerticalStackedBarChart/index';
import { IHorizontalBarChartWithAxisProps } from '../HorizontalBarChartWithAxis/index';
import { ILineChartProps } from '../LineChart/index';
import { AreaChartModes, IAreaChartProps } from '../AreaChart/index';
import { IAreaChartProps } from '../AreaChart/index';
import { IHeatMapChartProps } from '../HeatMapChart/index';
import { DataVizPalette, getNextColor } from '../../utilities/colors';
import { GaugeChartVariant, IGaugeChartProps, IGaugeChartSegment } from '../GaugeChart/index';
import { IGroupedVerticalBarChartProps } from '../GroupedVerticalBarChart/index';
import { IVerticalBarChartProps } from '../VerticalBarChart/index';
import { AreaChartModes } from '../../utilities/area-utils';

const isDate = (value: any): boolean => !isNaN(Date.parse(value));
const isNumber = (value: any): boolean => !isNaN(parseFloat(value)) && isFinite(value);
Expand Down
11 changes: 11 additions & 0 deletions packages/charts/react-charting/src/utilities/area-utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export enum AreaChartModes {
/**
* This mode will fill the area from the line to the x-axis.
*/
toZeroY = 'tozeroy',

/**
* This mode will fill the area from the line to the next line.
*/
toNextY = 'tonexty',
}
1 change: 1 addition & 0 deletions packages/charts/react-charting/src/utilities/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * from './utilities';
export * from './colors';
export * from './gradients';
export * from './vbc-utils';
export * from './area-utils';
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AreaChart, ICustomizedCalloutData } from '@fluentui/react-charting';
import { IAreaChartProps, ChartHoverCard, DataVizPalette, getColorFromToken } from '@fluentui/react-charting';
import { ChoiceGroup, IChoiceGroupOption } from '@fluentui/react/lib/ChoiceGroup';
import { Toggle } from '@fluentui/react/lib/Toggle';
import { AreaChartModes } from '@fluentui/react-charting/lib/AreaChart';
import { AreaChartModes } from '@fluentui/react-charting/lib/utilities/index';

interface IAreaChartBasicState {
width: number;
Expand Down

0 comments on commit 7fbe2c1

Please sign in to comment.