react-financial-charts
Version:
React charts specific to finance.
134 lines (133 loc) • 3.98 kB
TypeScript
/// <reference types="d3-format" />
import * as PropTypes from "prop-types";
import * as React from "react";
import { strokeDashTypes } from "../utils";
interface InteractiveYCoordinateProps {
readonly onChoosePosition: any;
readonly onDragComplete: any;
readonly onSelect?: any;
readonly onDelete?: any;
readonly defaultPriceCoordinate: {
bgFill: string;
bgOpacity: number;
stroke: string;
strokeDasharray: strokeDashTypes;
strokeOpacity: number;
strokeWidth: number;
textFill: string;
fontFamily: string;
fontWeight: string;
fontStyle: string;
fontSize: number;
text: string;
textBox: {
height: number;
left: number;
padding: {
left: number;
right: number;
};
closeIcon: {
padding: {
left: number;
right: number;
};
width: number;
};
};
edge: {
stroke: string;
strokeOpacity: number;
strokeWidth: number;
fill: string;
fillOpacity: number;
};
};
readonly hoverText: object;
readonly yCoordinateList: any[];
readonly enabled: boolean;
}
interface InteractiveYCoordinateState {
current?: any;
override?: any;
}
export declare class InteractiveYCoordinate extends React.Component<InteractiveYCoordinateProps, InteractiveYCoordinateState> {
static defaultProps: {
onChoosePosition: () => void;
onDragComplete: () => void;
onSelect: () => void;
onDelete: () => void;
defaultPriceCoordinate: {
bgFill: string;
bgOpacity: number;
stroke: string;
strokeOpacity: number;
strokeDasharray: string;
strokeWidth: number;
textFill: string;
fontFamily: string;
fontSize: number;
fontStyle: string;
fontWeight: string;
text: string;
textBox: {
height: number;
left: number;
padding: {
left: number;
right: number;
};
closeIcon: {
padding: {
left: number;
right: number;
};
width: number;
};
};
edge: {
stroke: string;
strokeOpacity: number;
strokeWidth: number;
fill: string;
fillOpacity: number;
orient: string;
at: string;
arrowWidth: number;
dx: number;
rectWidth: number;
rectHeight: number;
displayFormat: (n: number | {
valueOf(): number;
}) => string;
};
};
hoverText: {
enable: boolean;
bgHeight: number;
bgWidth: number;
text: string;
fontFamily: string;
fontSize: number;
fill: string;
bgFill: string;
bgOpacity: number;
};
yCoordinateList: never[];
};
static contextTypes: {
subscribe: PropTypes.Validator<(...args: any[]) => any>;
unsubscribe: PropTypes.Validator<(...args: any[]) => any>;
generateSubscriptionId: PropTypes.Validator<(...args: any[]) => any>;
chartId: PropTypes.Validator<string | number>;
};
private getSelectionState;
private saveNodeType;
private terminate;
constructor(props: any);
render(): JSX.Element;
private readonly handleDelete;
private readonly handleDragComplete;
private readonly handleDrag;
}
export {};