;
/**
* Callback for getting callout description message
*/
getCalloutDescriptionMessage?: (calloutDataProps: CustomizedCalloutData) => string | undefined;
colorFillBars?: ColorFillBarsProps[];
/**
* if this is set to true, then for each line there will be a unique shape assigned to the point,
* there are total 8 shapes which are as follow circle, square, triangele, diamond, pyramid,
* hexagon, pentagon and octagon, which will get assigned as respectively, if there are more
* than 8 lines in the line chart then it will again start from cicle to octagon.
* setting this flag to true will also change the behavior of the points, like for a
* line, last point shape and first point shape will be visible all the times, and all
* other points will get enlarge only when hovered over them
* if set to false default shape will be circle, with the existing behavior
* @default false
*/
allowMultipleShapesForPoints?: boolean;
optimizeLargeData?: boolean;
/**
* The prop used to define the culture to localized the numbers
*/
culture?: string;
/**
* @default false
* The prop used to enable the perf optimization
*/
enablePerfOptimization?: boolean;
}
/**
* Line Chart style properties
* {@docCategory LineChart}
*/
export declare interface LineChartStyleProps extends CartesianChartStyleProps {
}
/**
* Line Chart styles
* {@docCategory LineChart}
*/
export declare interface LineChartStyles extends CartesianChartStyles {
}
/**
* {@docCategory ChartData}
*/
export declare interface LineDataInVerticalBarChart {
y: VerticalBarChartDataPoint['y'];
yAxisCalloutData?: string | undefined;
/**
* onClick action for each datapoint in the chart
*/
onClick?: VoidFunction;
/**
* Whether to use the secondary y scale or not
* False by default.
*/
useSecondaryYScale?: boolean;
}
/**
* {@docCategory ChartData}
*/
export declare interface LineDataInVerticalStackedBarChart {
y: number;
color: string;
legend: string;
/**
* Data to show in callout
*/
data?: number;
yAxisCalloutData?: string;
/**
* Whether to use the secondary y scale or not
* False by default.
*/
useSecondaryYScale?: boolean;
}
/**
* {@docCategory ChartProps}
*/
export declare interface Margins {
/**
* left margin for the chart.
*/
left?: number;
/**
* Right margin for the chart.
*/
right?: number;
/**
* Top margin for the chart.
*/
top?: number;
/**
* Bottom margin for the chart.
*/
bottom?: number;
}
export declare interface ModifiedCartesianChartProps extends CartesianChartProps {
/**
* Define the chart title
*/
chartTitle?: string;
/**
* Only used for Area chart
* Value used to draw y axis of that chart.
*/
maxOfYVal?: number;
/**
* Data of the chart
*/
points: any;
/**
* Define type of the chart
*/
chartType: ChartTypes;
/** X axis type */
xAxisType: XAxisTypes;
/** Y axis type */
yAxisType?: YAxisType;
/**
* Legends of the chart.
*/
legendBars: JSX.Element | null;
/**
* Callout props
*/
calloutProps?: ChartPopoverProps;
/**
* Callback method used for to get margins to the chart.
*/
getmargins?: (margins: Margins) => void;
/**
* This is a call back method to the chart from cartesian chart.
* params are xScale, yScale, containerHeight, containerWidth. These values were used to draw the graph.
* It also contians an optional param xAxisElement - defines as x axis scale element.
* This param used to enable feature word wrap of Xaxis.
*/
getGraphData?: any;
/**
* Used for bar chart graphs.
* To define width of the bar
*/
barwidth?: number;
/**
* Used for tick styles of the x axis of the chart
* Tick params are applicable for date axis only.
*/
tickParams?: {
tickValues?: number[] | Date[] | string[];
tickFormat?: string;
};
/**
* it's padding between bar's or lines in the graph
*/
xAxisPadding?: number;
/**
* it's padding between bar's or lines in the graph
*/
yAxisPadding?: number;
/**
* Children elements specific to derived chart types.
*/
children(props: ChildProps): React_2.ReactNode;
/** dataset values to find out domain of the String axis
* Present using for only vertical stacked bar chart and grouped vertical bar chart
*/
datasetForXAxisDomain?: string[];
/**
* if the data points for the y-axis is of type string, then we need to give this
* prop to construct the y-axis
*/
stringDatasetForYAxisDomain?: string[];
/**
* The prop used to define the culture to localize the numbers and date
*/
culture?: string;
getAxisData?: any;
/**
* Callback method used when mouse leaves the chart boundary.
*/
onChartMouseLeave?: () => void;
/** Callback method to get extra margins for domain */
getDomainMargins?: (containerWidth: number) => Margins;
/** Padding between each bar/line-point */
xAxisInnerPadding?: number;
/** Padding before first bar/line-point and after last bar/line-point */
xAxisOuterPadding?: number;
/**
*@default false
*Used for to elipse y axis labes and show tooltip on x axis labels
*/
showYAxisLablesTooltip?: boolean;
/**
*@default false
*Used for showing complete y axis lables */
showYAxisLables?: boolean;
/**
* @default false
* Used to control the first render cycle Performance optimization code.
*/
enableFirstRenderOptimization?: boolean;
}
/**
* we need to make sure that if we add any property to this, then
* we need to also add that in pointTypes below and vise-versa
*/
declare enum Points {
circle = 0,
square = 1,
triangle = 2,
diamond = 3,
pyramid = 4,
hexagon = 5,
pentagon = 6,
octagon = 7
}
export declare interface PopoverComponentStyles {
calloutContentRoot: string;
calloutDateTimeContainer: string;
calloutContentX: string;
calloutBlockContainer: string;
calloutBlockContainertoDrawShapefalse: string;
calloutBlockContainertoDrawShapetrue: string;
shapeStyles: string;
calloutlegendText: string;
calloutContentY: string;
descriptionMessage: string;
ratio: string;
numerator: string;
denominator: string;
calloutInfoContainer: string;
calloutContainer: string;
}
export declare interface RefArrayData {
index?: string;
refElement?: SVGGElement;
}
/**
* Render function interface for providing overrideable render callbacks.
*
* @public
*/
declare interface RenderFunction {
(props?: P, defaultRender?: (props?: P) => JSX.Element | null): JSX.Element | null;
}
export declare const Shape: React_2.FunctionComponent;
export declare interface ShapeProps {
svgProps: React_2.SVGAttributes;
pathProps: React_2.SVGAttributes;
shape: LegendShape;
classNameForNonSvg?: string;
style?: React_2.CSSProperties | undefined;
}
/**
* Sparkline is the context wrapper and container for all Sparkline content/controls,
* It has no direct style or slot opinions.
*
* Sparkline also provides API interfaces for callbacks that will occur on navigation events.
*/
export declare const Sparkline: React_2.FunctionComponent;
/**
* Sparkline properties
* {@docCategory SparklineChart}
*/
export declare interface SparklineProps extends React.RefAttributes {
/**
* An array of chart data points for the Sparkline chart
*/
data?: ChartProps;
/**
* Width of chart
* * @default 80
*/
width?: number;
/**
* Height of chart
* @default 20
*/
height?: number;
/**
* Width of value text
* * @default 80
*/
valueTextWidth?: number;
/**
* Additional CSS class(es) to apply to the SparklineChart.
*/
className?: string;
/**
* The prop used to define the culture to localized the numbers
*/
culture?: string;
/**
* Prop used to determine whether to show the legend or not
*/
showLegend?: boolean;
/**
* Call to provide customized styling that will layer on top of the variant rules.
*/
styles?: SparklineStyles;
}
export declare interface SparklineStyleProps extends CartesianChartStyleProps {
}
/**
* Sparkline styles
* {@docCategory SparklineChart}
*/
export declare interface SparklineStyles {
inlineBlock?: string;
valueText?: string;
}
export declare const Textbox: React_2.FunctionComponent;
declare interface TextboxProps {
text: string;
width: number;
x: number;
y: number;
lineHeight: number;
textAnchor?: 'start' | 'middle' | 'end';
fontSize?: string;
fill?: string;
}
/**
* VerticalBarchart component
* {@docCategory VerticalBarChart}
*/
export declare const VerticalBarChart: React_2.FunctionComponent;
/**
* {@docCategory ChartData}
*/
export declare interface VerticalBarChartDataPoint {
/**
* Independent value of the data point, rendered along the x-axis.
* If x is a number, then each y-coordinate is plotted at its x-coordinate.
* If x is a string, then the data is evenly spaced along the x-axis.
*/
x: number | string | Date;
/**
* Dependent value of the data point, rendered along the y-axis.
*/
y: number;
/**
* Legend text for the datapoint in the chart
*/
legend?: string;
/**
* color for the legend in the chart
*/
color?: string;
/**
* Callout data for x axis
* This is an optional prop, If haven;t given legend will take
*/
xAxisCalloutData?: string;
/**
* Callout data for y axis
* This is an optional prop, If haven't given data will take
*/
yAxisCalloutData?: string;
/**
* data to render the line along with bars
*/
lineData?: LineDataInVerticalBarChart;
/**
* onClick action for each datapoint in the chart
*/
onClick?: VoidFunction;
/**
* Accessibility data for callout
*/
callOutAccessibilityData?: AccessibilityProps;
}
/**
* Vertical Bar Chart properties
* {@docCategory VerticalBarChart}
*/
export declare interface VerticalBarChartProps extends CartesianChartProps {
/**
* Data to render in the chart.
*/
data?: VerticalBarChartDataPoint[];
/**
* Define a custom callout renderer for a data point.
*/
onRenderCalloutPerDataPoint?: RenderFunction;
/**
* Width of each bar in the chart. When set to `undefined` or `'default'`, the bar width defaults to 16px,
* which may decrease to prevent overlap. When set to `'auto'`, the bar width is calculated from padding values.
* @default 16
*/
barWidth?: number | 'default' | 'auto';
/**
* Colors from which to select the color of each bar.
*/
colors?: string[];
/**
* chart title for the chart
*/
chartTitle?: string;
/**
* Legend text for the line datapoint in the chart
*/
lineLegendText?: string;
/**
* color for the legend of the line in the chart
* @default theme.yellow
*/
lineLegendColor?: string;
/**
* This prop makes sure that all the bars are of same color.
* it will take the first color from the array of colors in
* prop `colors` or if `colors` prop is not given then default color is palette.blueLight
* @default false
*/
useSingleColor?: boolean;
/**
* Call to provide customized styling that will layer on top of the variant rules.
*/
styles?: VerticalBarChartStyles;
/**
* The prop used to define the culture to localized the numbers
*/
culture?: string;
/**
* it's padding between bar's or lines in the graph
*/
xAxisPadding?: number;
/**
* options for the line drawn
*/
lineOptions?: LineChartLineOptions;
/**
* Prop to hide the bar labels
* @default false
*/
hideLabels?: boolean;
/**
* Maximum width of a bar, in pixels.
* @default 24
*/
maxBarWidth?: number;
/**
* Padding between bars as a fraction of the [step](https://d3js.org/d3-scale/band#band_step).
* Takes a number in the range [0, 1]. Only applicable to string x-axis.
* @default 2/3
*/
xAxisInnerPadding?: number;
/**
* Padding before the first bar and after the last bar as a fraction of
* the [step](https://d3js.org/d3-scale/band#band_step). Takes a number in the range [0, 1].
* Only applicable to string x-axis.
*/
xAxisOuterPadding?: number;
}
/**
* Vertical Bar Chart style properties
* {@docCategory VerticalBarChart}
*/
export declare interface VerticalBarChartStyleProps extends CartesianChartStyleProps {
/**
* color of the datapoint legend
*/
legendColor?: string;
}
/**
* Vertical Bar Chart styles
* {@docCategory VerticalBarChart}
*/
export declare interface VerticalBarChartStyles extends CartesianChartStyles {
/**
* Style for the lines representing the ticks along the x-axis.
* @deprecated This style cannot be customized anymore
*/
xAxisTicks?: string;
/**
* Style for the line representing the domain of the y-axis.
* @deprecated This style cannot be customized anymore
*/
yAxisDomain?: string;
/**
* Style for the lines representing the ticks along the y-axis.
* @deprecated This style cannot be customized anymore
*/
yAxisTicks?: string;
/**
* Style for the bar labels
*/
barLabel: string;
}
/**
* {@docCategory ChartData}
*/
export declare interface VerticalStackedBarDataPoint extends Omit {
/**
* Independent value of the data point, rendered along the x-axis.
* If x is a number, then each y-coordinate is plotted at its x-coordinate.
* If x is a string, then the data is evenly spaced along the x-axis.
* If data type on x is Date, then the data is spaced evenly by d3-scale.
*/
x: number | string | Date;
}
/**
* {@docCategory ChartProps}
*/
export declare interface VerticalStackedChartProps {
/**
* data for the points in the chart
*/
chartData: VSChartDataPoint[];
/**
* Data for x axis label for multistacked Vertical bar chart
*/
xAxisPoint: number | string | Date;
/**
* Callout data for x axis
* This is an optional prop, If haven't given, legend will take
*/
xAxisCalloutData?: string;
/**
* line data to render lines on stacked bar chart
*/
lineData?: LineDataInVerticalStackedBarChart[];
/**
* Accessibility data for Whole stack callout
*/
stackCallOutAccessibilityData?: AccessibilityProps;
}
/**
* {@docCategory ChartData}
*/
export declare interface VSChartDataPoint {
/**
* data the datapoint in the chart
*/
data: number;
/**
* Legend text for the datapoint in the chart
*/
legend: string;
/**
* color for the legend in the chart
*/
color?: string;
/**
* Callout data for x axis
* This is an optional prop, If haven;t given legend will take
*/
xAxisCalloutData?: string;
/**
* Callout data for y axis
* This is an optional prop, If haven't given data will take
*/
yAxisCalloutData?: string;
/**
* Accessibility data for callout
*/
callOutAccessibilityData?: AccessibilityProps;
}
declare enum XAxisTypes {
NumericAxis = 0,
DateAxis = 1,
StringAxis = 2
}
declare enum YAxisType {
NumericAxis = 0,
DateAxis = 1,
StringAxis = 2
}
export declare interface YValueHover {
legend?: string;
y?: number;
color?: string;
data?: string | number;
shouldDrawBorderBottom?: boolean;
yAxisCalloutData?: string | {
[id: string]: number;
};
index?: number;
callOutAccessibilityData?: AccessibilityProps;
}
export { }