Skip to main content

All Questions

Tagged with
1 vote
1 answer
22 views

Using d3.js to submit multiple JSON requests and bind data to different elements

I am building a configuration page that allows a user to reconcile unmatched data by selecting a match from a list of possibilities. The list of items needing to be matched is generated by the backend,...
Carl Peterson's user avatar
-1 votes
1 answer
37 views

Transform NCDU JSON output file to hierarchical json data like flare.json [d3 example file]

I want to convert the NCDU json file (https://dev.yorhel.nl/ncdu/jsonfmt) to a hierarchical json that can be imported in D3.js using D3.json(). Here is the D3 sample file flare.json (https://raw....
ricardo3889's user avatar
0 votes
1 answer
34 views

d3.json - how to replace URL with object/dynamic data?

New to d3. Creating a sankey diagram. Found a sample that uses an external .json file. The sample uses d3.v3. I know that is old, but I have a tree that also uses that version, so I would prefer to ...
user1009073's user avatar
  • 3,214
0 votes
0 answers
40 views

d3 Race chart - example with year converted to date

I'm working with d3 js framework, and are trying to build a race chart to engage sales. I've found an example which seems to be quite close. The only difference is that it uses years instead of ...
JakobFuglsang's user avatar
1 vote
0 answers
90 views

PHP json_encode returns null to d3.json call

Attempting to use d3.json utilizing a json_encode call in a php file. Getting null data from call. I have the following PHP file called getdata.php: <?php $mysqli = new mysqli('database','user','...
Connor's user avatar
  • 11
1 vote
1 answer
42 views

Rotated x-axis labels do not show when applying brush functionality

I am using D3 to create an area chart with brush functionality on rotated x-axis to an angle of 45 degrees, since they were overlapping, but it is not working. When the graph is initially displayed, ...
Evi's user avatar
  • 13
0 votes
1 answer
55 views

How to pass ids and names to d3 from rails

As with any rationalized database, the IDs, names and data are stored in separate tables. The current script (below) shows the IDs in the legend but I would like to pass in and show the names. The ...
ASing's user avatar
  • 107
2 votes
2 answers
94 views

How to convert Array of hierarchy data into right JSON-Format for D3-Tree-Region

i having problems converting an array of hierarchy data into the right Object format. I trying to convert this: [ {"PARENT_ID": 0,"CHILD_ID": 1,"NAME": "Quality&...
Jegor Wieler's user avatar
1 vote
1 answer
38 views

D3 way to change json data object properties?

I'm using d3v4. Let's say I have the following data, test.json: { "nodes":[ {"name":"a","width":60,"height":40}, {"name":&...
sdbbs's user avatar
  • 5,121
0 votes
1 answer
144 views

Extracting to center a GEOJSON object with D3js

It is showing the whole world projection boundaries, but is not showing the map of vietnam at the center. I will be creating multiple maps from humdata.org that and need each specified country maps at ...
Teg Louis's user avatar
  • 135
2 votes
1 answer
192 views

JSON for Tree Hierarchy Diagram from SQL Server

My goal is to prepare the necessary json for a d3.js tree diagram using sql server (2019). I'm using the sql below to allow up to six node levels. It builds a json string but the output requires ...
puckhead's user avatar
0 votes
1 answer
33 views

"Identical" array of dictionaries, but one has an undefined key

I have some example code to produce Euler diagrams from an array of dictionaries, which works as long as I explicitly define the array within my .js, and it does not work if I use the input from a ....
eigenVector5's user avatar
1 vote
1 answer
69 views

Coloring nodes in d3 v5 based on degree of nodes

In d3 v5, how would you color a node based on degree of the nodes. It must be visually evident that the nodes with a higher degree use darker/deeper colors and the nodes with lower degrees use lighter ...
razwan Al - Bari's user avatar
0 votes
1 answer
185 views

How to import a local file.json with Vue.js and D3.js

I'm trying to work with a local file.json with vue.js and D3.js d3 doesn't find the file on the devServer, i can import it in a const in Vue.js but d3 can't read it, because d3.json is a http request (...
Riton's user avatar
  • 1
2 votes
2 answers
436 views

d3.js proportional symbol map: setting radius of a circle based on data value

I'm following this great example of how to make a map using d3.js with mapbox: https://franksh.com/posts/d3-mapboxgl/ It works great, except I'm wondering how, using this example, one would make the ...
DiamondJoe12's user avatar
  • 1,701

15 30 50 per page
1
2 3 4 5
145