Skip to content

Commit

Permalink
chore: add jsdocs for conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Caele committed Nov 24, 2020
1 parent a7cce00 commit c0113d1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 29 deletions.
28 changes: 0 additions & 28 deletions apis/conversion/src/export-format.js

This file was deleted.

2 changes: 1 addition & 1 deletion apis/conversion/src/hypercube.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-prototype-builtins */
/* eslint-disable guard-for-in */
/* eslint-disable no-restricted-syntax */
import createExportFormat from './export-format';
import createExportFormat from './exportFormat';
import utils from './utils';
import arrayUtils from './array-util';
import helpers from './helpers';
Expand Down
13 changes: 13 additions & 0 deletions apis/nucleus/src/viz.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ export default function viz({ model, halo, initialError, onDestroy = async () =>
takeSnapshot() {
return cellRef.current.takeSnapshot();
},
/**
* Converts the visualization to a different registred type
* @ignore
* @param {string} newType - Which registered type to convert to
* @param {boolean=} forceUpdate - Whether to run setProperties or not, defaults to true.
* @returns {Promise<object>} Promise object that resolves to the full property tree of the converted visualizatiom
* @example
* const viz = await embed(app).render({
* element,
* id: 'abc'
* });
* viz.convertTo('barChart');
*/
async convertTo({ newType, forceUpdate = true }) {
const propertyTree = await conversion.convertTo({ halo, model, cellRef, newType });
if (forceUpdate) {
Expand Down
1 change: 1 addition & 0 deletions apis/stardust/api-spec/spec.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
'../supernova/src/**/*.js',
'../locale/src/translator.js',
'../theme/src/**/*.js',
'../conversion/src/**/*.js',
],
api: {
stability: 'stable',
Expand Down

0 comments on commit c0113d1

Please sign in to comment.