D3 example folded chart table in jsfiddle

I refer to this d3 example from the Stacked Bar Chart and try to implement in jsfiddle 1

I want to add this example to jsfiddle , I added only 5 external sources with the csv source file, but I had no way out.

Here is my jsfiddle 2

Can anyone help with this that I need to add there.

+4
source share
1 answer

The problem is that you need to insert csv data in a different way, since it cannot be included in a script like js / css, and is not requested from javascript due to browser restrictions .

You can, for example, include it in the HTML part of the script:

 <pre id="csvdata"> date,wounds,other,disease 5/1854,0,95,105 [...] </pre> 

I updated my script , now it works.

+2
source

Source: https://habr.com/ru/post/1480749/


All Articles