@amcharts/amcharts5
Version:
amCharts 5
155 lines • 4.6 kB
TypeScript
import type { DataItem } from "../../core/render/Component";
import type { Color } from "../../core/util/Color";
import type { ColorSet } from "../../core/util/ColorSet";
import type { MapSankeySeries, IMapSankeySeriesDataItem } from "./MapSankeySeries";
import { Series, ISeriesSettings, ISeriesDataItem, ISeriesPrivate, ISeriesEvents } from "../../core/render/Series";
import { MapPolygon } from "./MapPolygon";
import { ListTemplate } from "../../core/util/List";
export interface IMapSankeyNodesDataItem extends ISeriesDataItem {
/**
* Node name.
*/
name: string;
/**
* Node color.
*/
fill: Color;
/**
* Sum of values of all incoming links.
*/
sumIncoming: number;
/**
* Sum of values of all outgoing links.
*/
sumOutgoing: number;
/**
* Sum of values of all links: incoming and outgoing.
*/
sum: number;
/**
* A list of incoming link data items.
*/
incomingLinks: Array<DataItem<IMapSankeySeriesDataItem>>;
/**
* A list of outgoing link data items.
*/
outgoingLinks: Array<DataItem<IMapSankeySeriesDataItem>>;
/**
* Node longitude.
*/
longitude: number;
/**
* Node latitude.
*/
latitude: number;
/**
* Related [[MapPolygon]] object (circle or bar shape).
*/
mapPolygon: MapPolygon;
}
export interface IMapSankeyNodesSettings extends ISeriesSettings {
/**
* A field in data that holds name for the node.
* @default "name"
*/
nameField?: string;
/**
* A field in data that holds color used for node fill.
* @default "fill"
*/
fillField?: string;
/**
* A field in data that holds the node longitude.
* @default "longitude"
*/
longitudeField?: string;
/**
* A field in data that holds the node latitude.
* @default "latitude"
*/
latitudeField?: string;
/**
* A [[ColorSet]] that series will use to apply to its nodes.
*/
colors?: ColorSet;
}
export interface IMapSankeyNodesPrivate extends ISeriesPrivate {
}
export interface IMapSankeyNodesEvents extends ISeriesEvents {
}
/**
* Holds instances of nodes for a [[MapSankeySeries]].
*
* @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-sankey-series/} for more info
* @since 5.17.0
* @important
*/
export declare class MapSankeyNodes extends Series {
static className: string;
static classNames: Array<string>;
_settings: IMapSankeyNodesSettings;
_privateSettings: IMapSankeyNodesPrivate;
_dataItemSettings: IMapSankeyNodesDataItem;
_events: IMapSankeyNodesEvents;
/**
* Related [[MapSankeySeries]].
*/
flow: MapSankeySeries | undefined;
/**
* Flag indicating user has explicitly set node data.
* Prevents auto-clearing of nodes when link data changes.
* @ignore
*/
_userDataSet: boolean;
/**
* A [[ListTemplate]] of all node polygons.
*
* `mapPolygons.template` can be used to configure node appearance.
*
* @default new ListTemplate<MapPolygon>
*/
readonly mapPolygons: ListTemplate<MapPolygon>;
/**
* @ignore
*/
_applyThemes(force?: boolean): boolean;
/**
* @ignore
*/
protected _afterNew(): void;
/**
* @ignore
*/
protected _onDataClear(): void;
/**
* Processes a newly added node data item, assigning a fill color
* and creating its map polygon.
*
* @param dataItem Data item to process
*/
protected processDataItem(dataItem: DataItem<this["_dataItemSettings"]>): void;
/**
* @ignore
*/
_updateNodeColor(dataItem: DataItem<this["_dataItemSettings"]>): void;
/**
* Creates a MapPolygon visual for a node data item.
* @ignore
*/
makeMapPolygon(dataItem: DataItem<this["_dataItemSettings"]>): MapPolygon;
/**
* Add an incoming link to a node data item.
* @ignore
*/
addIncomingLink(dataItem: DataItem<this["_dataItemSettings"]>, link: DataItem<IMapSankeySeriesDataItem>): void;
/**
* Add an outgoing link to a node data item.
* @ignore
*/
addOutgoingLink(dataItem: DataItem<this["_dataItemSettings"]>, link: DataItem<IMapSankeySeriesDataItem>): void;
/**
* @ignore
*/
disposeDataItem(dataItem: DataItem<this["_dataItemSettings"]>): void;
}
//# sourceMappingURL=MapSankeyNodes.d.ts.map