UNPKG

@devexperts/dxcharts-lite

Version:
30 lines (29 loc) 1.83 kB
/* * Copyright (C) 2019 - 2026 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { DataSeriesModel, VisualSeriesPoint } from '../../model/data-series.model'; import { HTSeriesDrawerConfig, SeriesDrawer } from '../data-series.drawer'; import { Viewable } from '../../model/scaling/viewport.model'; import { Point } from '../../inputlisteners/canvas-input-listener.component'; export interface DifferenceCloudDrawPredicates { showLine?: boolean; showCloud?: boolean; backgroundColor?: string; } /** * Point used to draw difference type indicator (clouds) (e.g. Ichimoku indicator) */ export interface DifferencePoint { diffPoints: [VisualSeriesPoint, VisualSeriesPoint]; } export declare class DifferenceCloudDrawer implements SeriesDrawer { constructor(); draw(ctx: CanvasRenderingContext2D, allPoints: VisualSeriesPoint[][], model: DataSeriesModel, hitTestDrawerConfig: HTSeriesDrawerConfig): void; private drawLine; protected drawDifference(ctx: CanvasRenderingContext2D, lineColor: string, nextLineColor: string, diffPoints: DifferencePoint[], curSeries: DataSeriesModel, nextSeries: DataSeriesModel, hitTestDrawerConfig: HTSeriesDrawerConfig, drawPredicates?: DifferenceCloudDrawPredicates): void; protected fillCloud(ctx: CanvasRenderingContext2D, color: string, linePoints: Point[], nextLinePoints: Point[], hitTestDrawerConfig: HTSeriesDrawerConfig, drawPredicates?: DifferenceCloudDrawPredicates): void; protected mapDataSeriesDiffPointsIntoPoints(points: VisualSeriesPoint[], view: Viewable): Point[]; } export declare const isDifferenceTool: (type: string) => type is "DIFFERENCE";