Skip to content

API reference

eles.removeData — Collection > Data and scratch. Cytoscape.js signatures, parameters and return contract.

eles.removeData — Collection › Data and scratch

Preview · Collection › Data and scratch

Read in the complete API reference · All API members

#eles.removeData()

// Remove all keys
eles.removeData(): this

Remove application data keys.

Returns this

this collection, for chaining

Example

eles.data('temporary', 1);
eles.removeData();
console.log(eles.first().data('temporary')); // undefined

Example graph and handle setup

#eles.removeData(names)

// Remove the specified keys
eles.removeData(names: string): this

Remove application data keys.

Parameters
NameDescription
names: string

space-separated key names; omit to clear every key

Returns this

this collection, for chaining

Example

eles.data('temporary', 1);
eles.removeData('temporary');
console.log(eles.first().data('temporary')); // undefined

Example graph and handle setup

Also spelled eles.removeAttr.