|
|
@ -14,24 +14,28 @@ export type Serie = { |
|
|
|
yOrientation?: yAxisOrientation, |
|
|
|
yOrientation?: yAxisOrientation, |
|
|
|
}; |
|
|
|
}; |
|
|
|
// TODO: move some options to line-chart
|
|
|
|
// 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 = { |
|
|
|
export type Options = { |
|
|
|
margin?: Margin; |
|
|
|
margin?: Margin; |
|
|
|
eventsCallbacks?: { |
|
|
|
eventsCallbacks?: Events; |
|
|
|
zoomIn?: (range: AxisRange[]) => void, |
|
|
|
events?: Events; |
|
|
|
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, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
axis?: AxesOptions; |
|
|
|
axis?: AxesOptions; |
|
|
|
grid?: GridOptions; |
|
|
|
grid?: GridOptions; |
|
|
|
crosshair?: CrosshairOptions; |
|
|
|
crosshair?: CrosshairOptions; |
|
|
|