|
|
|
@ -14,24 +14,28 @@ export type Serie = {
|
|
|
|
|
yOrientation?: yAxisOrientation, |
|
|
|
|
}; |
|
|
|
|
// TODO: move some options to line-chart
|
|
|
|
|
|
|
|
|
|
export type Events = { |
|
|
|
|
zoomIn?: (range: AxisRange[]) => void, |
|
|
|
|
panning?: (event: { ranges: AxisRange[], d3Event: any }) => void, |
|
|
|
|
panningEnd?: (range: AxisRange[]) => void, |
|
|
|
|
zoomOut?: (centers: {x: number, y: number}) => void, |
|
|
|
|
mouseMove?: (evt: any) => void, |
|
|
|
|
mouseClick?: (evt: any) => void, |
|
|
|
|
mouseOut?: () => void, |
|
|
|
|
onLegendClick?: (idx: number) => void, |
|
|
|
|
onLegendLabelClick?: (idx: number) => void, |
|
|
|
|
contextMenu?: (evt: any) => void, // the same name as in d3.events
|
|
|
|
|
sharedCrosshairMove?: (event: any) => void, |
|
|
|
|
renderStart?: () => void, |
|
|
|
|
renderEnd?: () => void, |
|
|
|
|
componentRenderEnd?: (part: RenderComponent) => void, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export type Options = { |
|
|
|
|
margin?: Margin; |
|
|
|
|
eventsCallbacks?: { |
|
|
|
|
zoomIn?: (range: AxisRange[]) => void, |
|
|
|
|
panning?: (event: { ranges: AxisRange[], d3Event: any }) => void, |
|
|
|
|
panningEnd?: (range: AxisRange[]) => void, |
|
|
|
|
zoomOut?: (centers: {x: number, y: number}) => void, |
|
|
|
|
mouseMove?: (evt: any) => void, |
|
|
|
|
mouseClick?: (evt: any) => void, |
|
|
|
|
mouseOut?: () => void, |
|
|
|
|
onLegendClick?: (idx: number) => void, |
|
|
|
|
onLegendLabelClick?: (idx: number) => void, |
|
|
|
|
contextMenu?: (evt: any) => void, // the same name as in d3.events
|
|
|
|
|
sharedCrosshairMove?: (event: any) => void, |
|
|
|
|
renderStart?: () => void, |
|
|
|
|
renderEnd?: () => void, |
|
|
|
|
componentRenderEnd?: (part: RenderComponent) => void, |
|
|
|
|
}; |
|
|
|
|
eventsCallbacks?: Events; |
|
|
|
|
events?: Events; |
|
|
|
|
axis?: AxesOptions; |
|
|
|
|
grid?: GridOptions; |
|
|
|
|
crosshair?: CrosshairOptions; |
|
|
|
|