import { Info } from '../d3/view/Info'; import { SelectedCollectionView } from '../mvc/SelectedCollectionView'; import { DisaggBin } from './DisaggBinOptions'; import { DisaggGraphViewOptions } from './DisaggGraphViewOptions'; /** * A Disaggregation distance/magnitude plot. */ export class DisaggGraphView extends SelectedCollectionView { constructor(options: DisaggGraphViewOptions); /** * Calculate Disaggregation data bounds. * * @param bindata * array of Disaggregation bins * where Bin is an Object: * bin.r * distance to bin (x-axis) * bin.m * magnitude of bin (y-axis) * bin.εdata * array of epsilon data for bin (z-axis) * Each Object has properties: * εdata.value {Number} * % contribution to hazard * εdata.εbin {Number} * id of epsilon bin. * * @return * bounds of Disaggregation data. * Array contains two sub arrays, * containing minimum and maximum values for each axis. */ calculateBounds(bindata: DisaggBin[]): number[][]; /** * Use data extents to set view lookAt, origin, and zoom so plot is * roughly centered within view plot area. */ centerView(): void; /** * Create axes to be plotted. * * TODO: eliminate "magic" numbers. * Extents and tick, label, and title, vectors arre hard coded and work for * the current lookAt, origin, and zoom, combination. */ createAxes(): void; /** * Format x-axis {distance} labels. * * @param c * tick coordinate. * @return * formatted coordinate. */ formatX(c: number[]): string; /** * Format y-axis (magnitude) labels. * * @param c * tick coordinate. * @return * formatted coordinate. */ formatY(c: number[]): string; /** * Format z-axis (percent contribution) labels. * * @param c * tick coordinate. * @return * formatted coordinate. */ formatZ(c: number[]): string; /** * Get data bounds for plotting. * * @return * bounds of Disaggregation data. * Array contains two sub arrays, * containing minimum and maximum values for each axis. */ getBounds(): number[][]; /** * Update displayed data. * * When a model is selected, bins are plotted on the graph. * Otherwise, any existing bins are destroyed and removed from the graph. */ render(): void; /** * Custom legend rendering function for wrapped D33dView. * * @param info * rendering information. * @param info.el * element where legend should be rendered. */ renderLegend(info: Info): void; }