Tags

, , ,

For quite a few days, I have been trying my hand at generating charts and visualizations using D3.js.

While there are many examples available on the Internet, making them work on the local system takes some time. Additionally, understanding how D3 itself works takes time. Am yet to get comfortable with it. Still using a lot of example crutches to make charts happen.

Coming to the main point.

One of the problems that I have faced while using D3.js is that code that works with D3 v2 fails when using D3 v3. While there might be some genuine reasons for failure – due to internal changes, one of the reasons for failure is that fact that D3 V3 uses Greek symbols for some math computations. Symbols like Theta, Phi, Rho and the like.

The script to draw a chart displays correctly in my editor – Notepad++ – but fails in Firefox — throwing an error on the above mentioned characters.

To make the script work properly, we need to include the following tag in the ‘head’ section of the HTML file.

<meta charset='utf-8'>

Got the answer from StackOverflow

Advertisements