From b4945faedd82add975ba6605e3c947c191dc7e41 Mon Sep 17 00:00:00 2001 From: jos Date: Tue, 17 Jun 2014 11:48:44 +0200 Subject: [PATCH] Renamed DataSet option `convert` to `type`. --- HISTORY.md | 6 +- docs/dataset.html | 10 +-- examples/timeline/02_interactive.html | 2 +- examples/timeline/03_a_lot_of_data.html | 2 +- examples/timeline/06_event_listeners.html | 5 +- src/DataSet.js | 85 ++++++++++++----------- src/timeline/Timeline.js | 2 +- test/dataset.js | 6 +- 8 files changed, 62 insertions(+), 56 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index f4c363f3..0fdf68c5 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,7 +2,7 @@ http://visjs.org -## not yet released, version 1.1.1 +## not yet released, version 2.0.0 ### Timeline @@ -19,6 +19,10 @@ http://visjs.org - Fixed dataManipulation.initiallyVisible functionality (thanks theGrue). - Forced typecast of fontSize to Number. +### DataSet + +- Renamed option `convert` to `type`. + ## 2014-06-06, version 1.1.0 diff --git a/docs/dataset.html b/docs/dataset.html index 0828e37e..723affae 100644 --- a/docs/dataset.html +++ b/docs/dataset.html @@ -91,7 +91,7 @@ console.log('filtered items', items); // retrieve formatted items var items = data.get({ fields: ['id', 'date'], - convert: { + type: { date: 'ISODate' } }); @@ -149,7 +149,7 @@ var data = new vis.DataSet([data] [, options]) - convert + type Object.<String, String> none @@ -227,7 +227,7 @@ var data = new vis.DataSet([data] [, options]) Number[] Get ids of all items or of a filtered set of items. - Available options are described in section Data Selection, except that options fields and convert are not applicable in case of getIds. + Available options are described in section Data Selection, except that options fields and type are not applicable in case of getIds. @@ -649,7 +649,7 @@ DataSet.map(callback [, options]); - convert + type Object.<String, String> An object containing field names as key, and data types as value. @@ -700,7 +700,7 @@ data.add([ // retrieve formatted items var items = data.get({ fields: ['id', 'date', 'group'], // output the specified fields only - convert: { + type: { date: 'Date', // convert the date fields to Date objects group: 'String' // convert the group fields to Strings } diff --git a/examples/timeline/02_interactive.html b/examples/timeline/02_interactive.html index e2f5e417..32d8f97d 100644 --- a/examples/timeline/02_interactive.html +++ b/examples/timeline/02_interactive.html @@ -22,7 +22,7 @@