Book Image

Learning jqPlot

By : Scott Gottreu
Book Image

Learning jqPlot

By: Scott Gottreu

Overview of this book

Table of Contents (19 chapters)
Learning jqPlot
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a waterfall chart showing expenses against revenue


While we were completing our research, Roshan and Sara sent us the numbers. With everything we need, we get started executing the following steps:

  1. To make a waterfall chart, we need to include the barRenderer plugin file. Tooltips do not work with negative values on waterfall charts, so we include the pointLabels plugin file, and we also add the categoryAxisRenderer plugin file:

    <script src="../js/jqplot.barRenderer.min.js"></script>
    <script src="../js/jqplot.pointLabels.min.js"></script>
    <script src="../js/jqplot.categoryAxisRenderer.min.js"></script>
    <script src="../js/jqplot.canvasTextRenderer.min.js"></script>
    <script src="../js/jqplot.canvasAxisTickRenderer.min.js"></script>
    <script src="../js/functions.js"></script>
    <script>
  2. We include Roshan's numbers for revenue and expenses and Sara's returns number. Roshan sent over a profit number, but jqPlot will...