We get back from lunch and jump into creating the colored candlestick chart for Calvin. It will only require a couple of changes to our previous chart. We save the original as a new file, and then begin our modifications executing the following steps:
We include the cursor plugin file because the zooming feature is part of the cursor plugin:
<script src="../js/jqplot.cursor.min.js"></script> <script> $(document).ready(function(){ function dataPull(remoteData,options) { return [remoteData]; }
We add the
enablePlugins
option before we create our chart. This way we don't have to enable each plugin individually. Next, we change the remote data feed back to the JSON feed with the first three quarters of data, and we also update our title:$.jqplot.config.enablePlugins = true; var stockPrice = $.jqplot ('stockPrice', "./data/q1_q3_2012.json", { title:'Q1-Q3 2012 - jQ Big Box Electronics (jqBBE)', axesDefaults: { ...