Skip to content

Commit

Permalink
fix(tooltip): fixing group tooltip props
Browse files Browse the repository at this point in the history
labelFill, valueFill and withShape are at the options level.
position is optional.
  • Loading branch information
markmcdowell committed Jul 29, 2020
1 parent 71acd57 commit ba43c36
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/tooltip/src/GroupTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ interface GroupTooltipProps {
readonly displayFormat: (value: number) => string;
readonly displayInit?: string;
readonly displayValuesFor: (props: GroupTooltipProps, moreProps: any) => any;
readonly labelFill?: string;
readonly layout: layouts;
readonly onClick?: (event: React.MouseEvent, details: any) => void;
readonly options: {
Expand All @@ -22,19 +21,17 @@ interface GroupTooltipProps {
withShape?: boolean;
}[];
readonly origin: [number, number];
readonly position: "topRight" | "bottomLeft" | "bottomRight";
readonly valueFill?: string;
readonly position?: "topRight" | "bottomLeft" | "bottomRight";
readonly verticalSize?: number; // "verticalSize" only be used, if layout is "vertical", "verticalRows".
readonly width?: number; // "width" only be used, if layout is "horizontal" or "horizontalRows".
readonly withShape: boolean; // "withShape" is ignored, if layout is "horizontalInline" or "vertical".
}

export class GroupTooltip extends React.Component<GroupTooltipProps> {
public static defaultProps = {
className: "react-financial-charts-tooltip react-financial-charts-group-tooltip",
layout: "horizontal",
displayFormat: format(".2f"),
displayInit: "n/a",
displayInit: "",
displayValuesFor: (_, props) => props.currentItem,
origin: [0, 0],
width: 60,
Expand Down

0 comments on commit ba43c36

Please sign in to comment.