rozetko
3 years ago
5 changed files with 1 additions and 140 deletions
@ -1,94 +0,0 @@ |
|||||||
import { ChartwerkPod, TickOrientation, TimeFormat, AxisFormat } from '@chartwerk/core'; |
|
||||||
import { BarTimeSerie, BarOptions, RowValues } from './types'; |
|
||||||
import * as d3 from 'd3'; |
|
||||||
export declare class ChartwerkBarPod extends ChartwerkPod<BarTimeSerie, BarOptions> { |
|
||||||
barYScale: null | d3.ScaleLinear<number, number>; |
|
||||||
_seriesDataForRendring: any[]; |
|
||||||
constructor(el: HTMLElement, _series?: BarTimeSerie[], _options?: BarOptions); |
|
||||||
protected renderMetrics(): void; |
|
||||||
get isMatchingDisabled(): boolean; |
|
||||||
setSeriesDataForRendering(): void; |
|
||||||
setBarPodScales(): void; |
|
||||||
renderSerie(data: any): void; |
|
||||||
getTrianglePath(x: number, y: number, length: number, options?: { |
|
||||||
max: number; |
|
||||||
min: number; |
|
||||||
}): string; |
|
||||||
getBarOpacity(rowValues: RowValues): number; |
|
||||||
mergeMacthedSeriesAndSort(matchedSeries: any[]): any; |
|
||||||
get seriesUniqKeys(): string[]; |
|
||||||
get seriesForMatching(): BarTimeSerie[][]; |
|
||||||
getZippedDataForRender(series: BarTimeSerie[]): RowValues[]; |
|
||||||
renderSharedCrosshair(values: { |
|
||||||
x?: number; |
|
||||||
y?: number; |
|
||||||
}): void; |
|
||||||
hideSharedCrosshair(): void; |
|
||||||
onMouseMove(): void; |
|
||||||
getSeriesPointFromMousePosition(eventX: number): any[] | undefined; |
|
||||||
getBarColor(serie: any): any; |
|
||||||
onMouseOver(): void; |
|
||||||
onMouseOut(): void; |
|
||||||
contextMenu(): void; |
|
||||||
get barWidth(): number; |
|
||||||
updateBarWidthWithBorders(width: number): number; |
|
||||||
getBarHeight(value: number): number; |
|
||||||
getBarPositionX(key: number, idx: number): number; |
|
||||||
getBarPositionY(val: number, idx: number, values: number[]): number; |
|
||||||
getYScale(): d3.ScaleLinear<number, number>; |
|
||||||
getYMaxValue(): number | undefined; |
|
||||||
} |
|
||||||
export declare const VueChartwerkBarChartObject: { |
|
||||||
render(createElement: any): any; |
|
||||||
mixins: { |
|
||||||
props: { |
|
||||||
id: { |
|
||||||
type: StringConstructor; |
|
||||||
required: boolean; |
|
||||||
}; |
|
||||||
series: { |
|
||||||
type: ArrayConstructor; |
|
||||||
required: boolean; |
|
||||||
default: () => any[]; |
|
||||||
}; |
|
||||||
options: { |
|
||||||
type: ObjectConstructor; |
|
||||||
required: boolean; |
|
||||||
default: () => {}; |
|
||||||
}; |
|
||||||
}; |
|
||||||
watch: { |
|
||||||
id(): void; |
|
||||||
series(): void; |
|
||||||
options(): void; |
|
||||||
}; |
|
||||||
mounted(): void; |
|
||||||
destroyed(): void; |
|
||||||
methods: { |
|
||||||
render(): void; |
|
||||||
renderSharedCrosshair(values: { |
|
||||||
x?: number; |
|
||||||
y?: number; |
|
||||||
}): void; |
|
||||||
hideSharedCrosshair(): void; |
|
||||||
onPanningRescale(event: any): void; |
|
||||||
renderChart(): void; |
|
||||||
appendEvents(): void; |
|
||||||
zoomIn(range: any): void; |
|
||||||
zoomOut(centers: any): void; |
|
||||||
mouseMove(evt: any): void; |
|
||||||
mouseOut(): void; |
|
||||||
onLegendClick(idx: any): void; |
|
||||||
panningEnd(range: any): void; |
|
||||||
panning(range: any): void; |
|
||||||
contextMenu(evt: any): void; |
|
||||||
sharedCrosshairMove(event: any): void; |
|
||||||
renderStart(): void; |
|
||||||
renderEnd(): void; |
|
||||||
}; |
|
||||||
}[]; |
|
||||||
methods: { |
|
||||||
render(): void; |
|
||||||
}; |
|
||||||
}; |
|
||||||
export { BarTimeSerie, BarOptions, TickOrientation, TimeFormat, AxisFormat }; |
|
File diff suppressed because one or more lines are too long
@ -1,29 +0,0 @@ |
|||||||
import { TimeSerie, Options } from '@chartwerk/core'; |
|
||||||
export declare type BarSerieParams = { |
|
||||||
matchedKey: string; |
|
||||||
colorFormatter: (serie: BarTimeSerie) => string; |
|
||||||
}; |
|
||||||
export declare type BarTimeSerie = TimeSerie & Partial<BarSerieParams>; |
|
||||||
export declare type BarOptionsParams = { |
|
||||||
renderBarLabels: boolean; |
|
||||||
stacked: boolean; |
|
||||||
barWidth: number; |
|
||||||
maxBarWidth: number; |
|
||||||
minBarWidth: number; |
|
||||||
maxAnnotationSize: number; |
|
||||||
minAnnotationSize: number; |
|
||||||
matching: boolean; |
|
||||||
opacityFormatter: (data: RowValues) => number; |
|
||||||
annotations: { |
|
||||||
key: string; |
|
||||||
color: string; |
|
||||||
}[]; |
|
||||||
}; |
|
||||||
export declare type BarOptions = Options & Partial<BarOptionsParams>; |
|
||||||
export declare type RowValues = { |
|
||||||
key: number; |
|
||||||
values: number[]; |
|
||||||
additionalValues: (null | number)[]; |
|
||||||
colors: string[]; |
|
||||||
serieTarget: string[]; |
|
||||||
}; |
|
@ -1,8 +0,0 @@ |
|||||||
/** |
|
||||||
* Finds the closest item to a given number in an array using binary search |
|
||||||
* @argument arr: ascending sorted array |
|
||||||
* @argument num: number to find |
|
||||||
* @returns index of the closest item to `num` |
|
||||||
* @returns -1 if given array is empty |
|
||||||
*/ |
|
||||||
export declare function findClosest(arr: number[], num: number): number; |
|
Loading…
Reference in new issue