Chapter 7. Stock Market Charts – OHLC and Candlestick Charts

So far, we have created line charts and looked at various plugins to extend the functionality of our charts. Now, we will move on to OHLC and candlestick charts, which are used to visualize stock prices. We will also use several of the plugins we learned about in the last chapter to make our charts more interactive. In this chapter, we will cover the following topics:

  • Gaining an understanding of the parts and using OHLC and candlestick charts
  • Building an OHLC chart with last quarter's stock data and using the highlighter plugin to show all the data points
  • Building a candlestick chart with the last 14 days of data
  • Adding the cursor plugin to allow us to zoom in on a colored candlestick chart
  • Creating canvas overlay lines using dates and adding tooltips to the lines
  • Adding values to our remote data array, and then skipping some of those values when we create our tooltip

Looking at the employee stock option plan

On Tuesday morning, we show up for our 10 o'clock meeting. Roshan, Sara, and several other executives are there. A few minutes later, Roshan stands and starts the meeting. "I want to start by introducing Bob Albricht. He is a financial consultant helping us create our employee stock option plan. Remember, these meetings are privileged and not to be discussed until we make a public announcement."

We look at each other and shrug. Roshan continues, "Today we're discussing how to best communicate the benefits of this new program to our employees." I raise my hand, "Roshan, what do we contribute to this meeting?"

Roshan smiles, "Well, we want a stock chart on the dashboard you are creating. This way, the company's performance will be in front of everyone when they log in."

I ask, "Can't we just use a line chart?" Bob speaks up, "You can use a line chart, but it might be better to use an OHLC chart or a candlestick chart." Bob looks at Roshan and motions to the whiteboard, "May I?"

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.40.189