CHAPTER 6

image

Candlestick Charts with D3

In this short but nonetheless important chapter, you will look at candlestick charts. This type of chart is based on a particular data format (OHLC, or open-high-low-close). Thus, you will need to implement a parser to read OHLC data from an external file. Moreover, another nontrivial aspect that you need to solve is how to deal with date and time data.

Although this sounds complex, in this chapter you will discover how the D3 library provides you with tools which make things easy and immediate for you.

You will first begin with building a simple OHLC chart, in order to focus particularly on the reading of ...

Get Create Web Charts with D3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.