Zoomdata Version

Migrating from the Legacy SDK


Starting with Zoomdata v2.2, the Zoomdata application is powered by a new client library (Zoomdata Client Library v2.0). This client library makes the full power of Zoomdata analytics and visualization available to your custom applications. The advantages of the new library include:

  • an enhanced Embedding API that is more lightweight and offers more control over embedded visualizations
  • a brand new data-oriented Query API that allows you to extract data directly from a Zoomdata server

To continue with Zoomdata v2.2 using an embedded application of Zoomdata from a previous version, you must perform the following migration tasks.

  • Code used to embed a visualization needs to be adjusted.
  • Custom chart templates themselves need some recoding.

This document covers the steps needed to upgrade your application to use the new JavaScript client library. For information about reworking a custom chart to make it compatible with the new Zoomdata client library and client application, see Migrating Custom Chart Templates (coming soon).

Adjusting Code Used To Embed Charts

To continue using a chart embedded using the legacy SDK and its client library, you must retool the embedding code.

Code segment Legacy Client Library New Client Library
Library link 1. Downloaded from Github
2. Hosted by developer
3. Linked in header using HTML <link> element
1. Hosted in the Zoomdata server at
and in minified form at
2. Linked in header using HTML <link> element
Credentials Previously, credentials were passed as a value directly to the ZoomdataClient constructor. Now, credentials are passed as a JavaScript object. This packaging allows more flexibility, because the object can contain different kinds of credentials.

var credentials = {
Application Previously, Zoomdata server parameters were passed directly to the ZoomdataClient constructor and in an unparsed form. Now, server parameters are passed as an object parsed into individual values.

var application = {
secure: true           // boolean,
host: 'yourserver',
port: 8080              // or whatever
path: '/zoomdata'
Client instantiation ZoomdataClient() constructor expected an object with three values.

var theClient = new ZoomdataClient({
host: 'yourserver:8080/zoomdata',
secure: false
createClient() method expects an object with two member objects.

var theClient = ZoomdataSDK.createClient({
credentials: credentialConfigObject,
application: applicationConfigObject
Chart location DOM object

vizLocation = document.getElementById('visualization');
DOM object

vizLocation = document.getElementById('visualization');
Chart instantiation Used client.visualize() method.

element: vizLocation    source: 'Real Time Sales',    visualization: 'Packed Bubbles',
The object used by the client.visualize() method now requires new values.

element: vizLocation,
config: queryConfig,
source: {name: 'Real Time Sales'},
visualization: 'Packed Bubbles',
variables: { }
Data control Accessed filters using, for example,

Uses underlying query and data accessors, for example

Chart format control Chart formatting could not be directly affected by the embedding environment. Uses data accessors, for example

theViz["dataAccessors"]["Bubble Color"].setColorSet(newColors)