You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
import { Serie, Options } from '@chartwerk/core'; |
|
|
|
|
|
type ScatterDataParams = { |
|
pointType: PointType; |
|
lineType: LineType; |
|
pointSize: number; |
|
colorFormatter?: ColorFormatter |
|
} |
|
type ScatterOptionsParams = { |
|
// TODO: this options is not used anywhere, let's remove it |
|
voronoiRadius: number; |
|
} |
|
export type ScatterData = Serie & Partial<ScatterDataParams>; |
|
export type ScatterOptions = Options & Partial<ScatterOptionsParams>; |
|
|
|
export enum PointType { |
|
NONE = 'none', |
|
CIRCLE = 'circle', |
|
RECTANGLE = 'rectangle' |
|
} |
|
|
|
export enum LineType { |
|
NONE = 'none', |
|
SOLID = 'solid', |
|
DASHED = 'dashed' |
|
} |
|
|
|
export type ColorFormatter = (datapointsRow: any[], pointIdx) => string; |
|
|
|
export type MouseMoveEvent = { |
|
bbox: { |
|
clientX: number, |
|
clientY: number, |
|
x: number, |
|
y: number, |
|
chartWidth: number, |
|
chartHeight: number, |
|
}, |
|
data: { |
|
xval: number, |
|
yval: number, |
|
highlighted?: HighlightedData, |
|
} |
|
} |
|
|
|
export type HighlightedData = { |
|
xValue: number, yValue: number, customValue: number, |
|
pointIdx: number, totalPointIdx: number, |
|
serieInfo: { target: string, alias?: string, class?: string, idx?: number } |
|
}
|
|
|