This commit is contained in:
lihu 2023-02-07 00:39:27 +08:00
parent 50787284a4
commit 0ffb9a8e4d
5 changed files with 15 additions and 14 deletions

View File

@ -7,3 +7,4 @@ indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

View File

@ -199,4 +199,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

2
NOTICE
View File

@ -2,4 +2,4 @@ KLineChart
Copyright (c) 2019 lihu
TradingView Lightweight Charts
Copyright (с) 2019 TradingView, Inc. https://www.tradingview.com/
Copyright (с) 2019 TradingView, Inc. https://www.tradingview.com

View File

@ -199,3 +199,4 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

24
types/index.d.ts vendored
View File

@ -488,18 +488,6 @@ export interface MouseTouchEvent extends Coordinate {
isTouch?: boolean;
preventDefault?: () => void;
}
export interface Figure<A = any, S = any> {
name: string;
attrs: A;
styles: S;
draw: (ctx: CanvasRenderingContext2D, attrs: A, styles: S) => void;
checkEventOn: (coordinate: Coordinate, attrs: A, styles: S) => boolean;
}
export declare type FigureTemplate<A = any, S = any> = Pick<Figure<A, S>, "name" | "draw" | "checkEventOn">;
export declare type FigureCreate<A = any, S = any> = Pick<Figure<A, S>, "name" | "attrs" | "styles">;
export declare type FigureConstructor<A = any, S = any> = new (figure: FigureCreate<A, S>) => ({
draw: (ctx: CanvasRenderingContext2D) => void;
});
export interface YAxis extends Axis {
isFromZero: () => boolean;
}
@ -872,6 +860,18 @@ export interface Chart {
resize: () => void;
destroy: () => void;
}
export interface Figure<A = any, S = any> {
name: string;
attrs: A;
styles: S;
draw: (ctx: CanvasRenderingContext2D, attrs: A, styles: S) => void;
checkEventOn: (coordinate: Coordinate, attrs: A, styles: S) => boolean;
}
export declare type FigureTemplate<A = any, S = any> = Pick<Figure<A, S>, "name" | "draw" | "checkEventOn">;
export declare type FigureCreate<A = any, S = any> = Pick<Figure<A, S>, "name" | "attrs" | "styles">;
export declare type FigureConstructor<A = any, S = any> = new (figure: FigureCreate<A, S>) => ({
draw: (ctx: CanvasRenderingContext2D) => void;
});
declare function checkCoordinateOnArc(coordinate: Coordinate, arc: ArcAttrs): boolean;
declare function drawArc(ctx: CanvasRenderingContext2D, attrs: ArcAttrs, styles: Partial<LineStyle>): void;
export interface ArcAttrs {