O'Reilly logo

Learning jqPlot by Scott Gottreu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending the data renderer

The IT department e-mailed us while we were working on our chart. They created some data feeds for us to pull the social media conversion numbers that we need. We are going to create a scatterplot with the total number of daily shares on Twitter and the total conversions. The new data source returns an array so we won't need to change anything.

Our original remoteDataSource function was tailored specifically for our other social media chart. We decide to extract the functionality to retrieve remote data and also make use of dataRendererOptions.

To start off, we create a new file called functions.js inside our js folder. We will save our new function, remoteDataCallback, in this file so we can reuse the code.

We remove ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required