We are happy with how our OHLC chart turned out. Now, we turn our attention to creating a candlestick chart. We consider this might work well on the dashboard.
We open the OHLC chart we just created and save it as a new file. We only need to set one option to make it a candlestick chart, but we also want to make a few other cosmetic changes. We execute the following steps:
The first change is the data feed that will pull in the stock prices of the last 14 days. We also update our title:
... var stockPrice = $.jqplot ('stockPrice', "./data/last_14.json", { title:'Last 14 Days - jQ Big Box Electronics (jqBBE)',
Under
rendererOptions
for our series, we setcandleStick
totrue
:... series: [ { renderer:$.jqplot.OHLCRenderer, rendererOptions: { lineWidth: 2, candleStick: true } } ],
Previously, we used
numberTicks
to limit the number of ticks jqPlot created for our axes. For this...