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

Using the second xaxis and smoothing lines

We save the previous chart as a new file and begin making our modifications as follows:

  1. We want an array containing various shades of the purple used by the company. We can use these colors for our lines, bars, pie wedges, and even our backgrounds. We also want this in a central place along with the functions to help us theme our charts. With that in mind, we create a file called themes.js and add an array called company_colors to hold our shades of purple as follows:
    var company_colors = [ "#400040", "#8C008C", "#D8BFD8", "#DE6FA1", "#9400D3" ];
  2. Next, we return to our file containing our HTML, 1168_10_03.html. We include the themes.js file in our HTML. After setting dataRendererOptions, we set seriesDefaults ...

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