Zoomdata Version

Getting Started with the Application Framework

Zoomdata's application framework provides you with the tools you need to query data or embed charts from Zoomdata in your own application. If you want to use Zoomdata charts or data in your own custom application, then read on. You might be looking for information about creating your own custom charts - that's a different section. For information about creating custom charts, see Creating a Custom Chart Template.

Uses of the Application Framework

You can use a query to get data from Zoomdata and use it in your own applications.

You might want to go this route if:
  • You just need the data.
  • You already have a visualization built into your application and you want to keep it, but need data for it.
You can embed a Zoomdata chart in your application and use your query to supply it with data.

You might want to go this route if:
  • You already have a data query set up.
  • You need to use the same query for more than one chart or for charts and other purposes.
You can embed a Zoomdata chart and give it the information it needs to create its own query.

You might want to go this route if:
  • You really just need one chart based on its own query.

Dependencies

The application framework depends upon jQuery. Zoomdata recommends that you link jQuery v1.8 or later.

Accessing the Application Framework

Zoomdata's application framework is provided by linking the zoomdata-client.js file in your web application. You can find zoomdata-client.js on your installation at

https:// yourserver /zoomdata/sdk/2.0/zoomdata-client.js

replacing yourserver with the URL for your server.

Best practice: Use the zoomdata-client.js file found on the Zoomdata installation that will be supplying your data and charts. There is not usually a problem using different versions, but following this guidance avoids such issues and may help Zoomdata support your work.

Linking the zoomdata-client.js file into your web application gives you access to the ZoomdataSDK object. The main purpose of the ZoomdataSDK object is to create a Zoomdata client for your application. Typically, one Zoomdata client is enough, but if you need to access multiple Zoomdata servers, you'll need one client for each one.

Typical Workflows

There is a lot of flexibility with the Zoomdata application framework, but some steps must precede others. When steps must be kept in a particular order, the Zoomdata application framework uses promises to do so. Below is an example of the most common workflow.

Typical Workflow to Embed a Chart

This workflow creates a query independent of the chart and then uses that query to supply the chart with data. The advantage to this workflow is that the independent chart can easily be used for additional purposes such as other calculations or supplying the same data to other charts.

  1. Create a Zoomdata client. Steps to create a client are found in topics about the following steps.
  2. Create a Zoomdata query.
  3. Visualize a Zoomdata chart using data from the query.

To help you get going, you might want to fiddle with an example or download it from GitHub.

Typical Workflow to Query Data

This workflow creates a query and then queries data from it. This workflow is useful if you already have charts in your application and you need to supply them with data from Zoomdata. It's also useful if you just want the data.

  1. Create a Zoomdata client. Steps to create a client are found with steps for creating a query.
  2. Create a Zoomdata query.
  3. Run the Zoomdata query.
  4. Gather and use the queried data.

To help you get going, you might want to fiddle with an example or download it from GitHub.

Next Steps

It might be that you only need to embed a chart or use data from Zoomdata in your own application. You might also want to learn how to:

Was this topic helpful?