You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
4.2 KiB

4 months ago
import type { IBubbleSetOptions } from 'bubblesets-js';
import type { ContourStyleProps } from '../elements/shapes';
import type { RuntimeContext } from '../runtime/types';
import type { ID } from '../types';
import type { BasePluginOptions } from './base-plugin';
import { BasePlugin } from './base-plugin';
/**
* <zh/>
*
* <en/> BubbleSets options
*/
export interface BubbleSetsOptions extends BasePluginOptions, IBubbleSetOptions, ContourStyleProps {
/**
* <zh/>
*
* <en/> Member elements, including nodes and edges
*/
members: ID[];
/**
* <zh/>
*
* <en/> Elements to avoid, these elements will not be included when drawing the contour, currently only nodes are supported
*/
avoidMembers?: ID[];
}
/**
* <zh/>
*
* <en/> BubbleSets
* @remarks
* <zh/> BubbleSets Christopher Collins 2009 "Bubble Sets: Revealing Set Relations with Isocontours over Existing Visualizations"
*
* <zh/> "气泡"
*
* <en/> BubbleSets was originally proposed by Christopher Collins in the 2009 paper "Bubble Sets: Revealing Set Relations with Isocontours over Existing Visualizations".
*
* <en/> The principle is to represent sets by creating a shape similar to a bubble. Each set is represented by a unique "bubble", and the elements in the set are contained within this bubble. If two sets have an intersection, then the two bubbles will have an overlapping part, which represents the intersection of the two sets.
*/
export declare class BubbleSets extends BasePlugin<BubbleSetsOptions> {
private shape;
private bubbleSets;
private path;
private members;
private avoidMembers;
private bubbleSetOptions;
static defaultOptions: Partial<BubbleSetsOptions>;
constructor(context: RuntimeContext, options: BubbleSetsOptions);
private bindEvents;
private init;
private parseOptions;
private drawBubbleSets;
private updateBubbleSetsPath;
private getPath;
/**
* <zh/>
*
* <en/> Add member elements
* @param members - <zh/> | <en/> single or multiple
*/
addMember(members: ID | ID[]): void;
/**
* <zh/>
*
* <en/> Remove member elements
* @param members - <zh/> | <en/> single or multiple
*/
removeMember(members: ID | ID[]): void;
/**
* <zh/>
*
* <en/> Update member elements
* @param members - <zh/> | <en/> value or callback function
*/
updateMember(members: ID[] | ((prev: ID[]) => ID[])): void;
/**
* <zh/>
*
* <en/> Get member elements
* @returns <zh/> | <en/> member elements array
*/
getMember(): string[];
/**
* <zh/>
*
* <en/> Add elements to avoid
* @param avoidMembers - <zh/> | <en/> single or multiple
*/
addAvoidMember(avoidMembers: ID | ID[]): void;
/**
* <zh/>
*
* <en/> Remove elements to avoid
* @param avoidMembers - <zh/> | <en/> single or multiple
*/
removeAvoidMember(avoidMembers: ID | ID[]): void;
/**
* <zh/>
*
* <en/> Update elements to avoid
* @param avoidMembers - <zh/> | <en/> single or multiple
*/
updateAvoidMember(avoidMembers: ID | ID[]): void;
/**
* <zh/>
*
* <en/> Get elements to avoid
* @returns avoidMembers <zh/> | <en/> member elements array
*/
getAvoidMember(): string[];
/**
* <zh/>
*
* <en/> Destroy
* @internal
*/
destroy(): void;
}