src/app/configurations/graph.configuration.ts
Visual configuration for the GraphComponent.
Properties |
arrowPoints |
arrowPoints:
|
Type : []
|
markerBoxSize |
markerBoxSize:
|
Type : number
|
markerPadding |
markerPadding:
|
Type : number
|
markerPath |
markerPath:
|
Type : string
|
markerRef |
markerRef:
|
Type : number
|
nodeRadius |
nodeRadius:
|
Type : number
|
tooltipFadeInTame |
tooltipFadeInTame:
|
Type : number
|
tooltipFadeOutTime |
tooltipFadeOutTime:
|
Type : number
|
tooltipOpacity |
tooltipOpacity:
|
Type : number
|
export interface GraphConfiguration {
nodeRadius: number;
tooltipOpacity: number;
tooltipFadeInTame: number;
tooltipFadeOutTime: number;
markerBoxSize: number;
markerPadding: number;
markerRef: number;
arrowPoints: [number, number][];
markerPath: string;
}
const nodeRadius = 24;
const tooltipOpacity = 1;
const tooltipFadeInTame = 500;
const tooltipFadeOutTime = 200;
const markerBoxSize = 4;
export const DEFAULT_GRAPH_CONFIGURATION: GraphConfiguration = {
nodeRadius,
tooltipOpacity,
tooltipFadeInTame,
tooltipFadeOutTime,
markerBoxSize,
markerPadding: nodeRadius + 2 * markerBoxSize,
markerRef: markerBoxSize / 2,
arrowPoints: [
[0, 0],
[0, markerBoxSize],
[markerBoxSize, markerBoxSize / 2],
],
markerPath: [0, 0, markerBoxSize, markerBoxSize].join(','),
};