Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/annotations/src/Annotate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { GenericChartComponent } from "@react-financial-charts/core";

export interface AnnotateProps {
readonly className?: string;
readonly clip?: boolean;
readonly with: React.ElementType;
readonly when: (value: any, index: number, array: any[]) => boolean;
readonly usingProps?: any;
Expand All @@ -12,10 +13,13 @@ export class Annotate extends React.Component<AnnotateProps> {
public static defaultProps = {
className:
"react-financial-charts-enable-interaction react-financial-charts-annotate react-financial-charts-default-cursor",
clip: true,
};

public render() {
return <GenericChartComponent svgDraw={this.renderSVG} drawOn={["pan"]} />;
const { clip } = this.props;

return <GenericChartComponent clip={clip} svgDraw={this.renderSVG} drawOn={["pan"]} />;
}

private readonly renderSVG = (moreProps: any) => {
Expand Down