All Questions
878
questions
0
votes
2
answers
108
views
Getting d3.max value for grouped bar chart y domain
I've created a grouped bar chart and am trying to set the y domain to the largest bar value. Doing that rather than a static number that has to be changed depending on the data. I'm confused on how to ...
0
votes
1
answer
43
views
Values in array read in from d3.csv are undefined outside of function despite global variable declaration
Thank you in advance for your help!
I have declared four arrays globally in my code. Then, in the function to read the data from the csv, I assign the data values to array elements. However, the array ...
0
votes
1
answer
58
views
d3 csv load api change
It's been awhile since I've used d3, and I was reading how the old syntax for loading a csv:
d3.csv("path/to/csv.csv", function(x){...}) no longer worked. But I'm using v7 from this location:...
1
vote
1
answer
59
views
Group duplicated names listed in CSV file and display the total number of each group in seperate Div using d3.js
I have a CSV file with a column containing duplicated names (strings). I like to group all the aliked/duplicate names, count them/add them and place their total in a div; ie., Div Base 1: 20, Div ...
0
votes
0
answers
147
views
d3.csv() is returning my index.html file instead of the csv file
I am trying to use d3.csv() to read in my data. When logging my data using console.log(data), instead of returning the contents of the csv, the console is showing each line of my index.html file.
...
1
vote
0
answers
36
views
D3 choropleth + overpass api >> csv URL call = invalid characters in csv header?
Experimenting a bit here with using an overpass api URL call >> csv for direct d3 charting. As longitude and latitude are special column declarations for overpass (called with an initial ::), ...
-4
votes
1
answer
152
views
Read CSV File with React from a static Link
I wish to read a CSV file with React from a static Link(Button), no Module, no Drag.
import { csv } from "d3";
const file = "/dummydata/template.csv";
const readCsv = () =>...
1
vote
2
answers
476
views
React/Javascript - saving values from local csv into useState / useEffect
I'm trying to load the data from a csv into useState via a useEffect state. But I can't get it to work.
My csv contains data like this:
Date Value1 Value2
2020/7/20 1 ...
1
vote
0
answers
93
views
How can I select csv files through dropdown menu in d3.js
Actually I am trying to select csv file for my chart from dropdownmenu using d3.js but it is not selecting the options
window.filename = "{path}"; //file path thatI want to change through ...
1
vote
0
answers
178
views
ReactJS / D3.js - import/use local csv file
I'm new to building a react app. And I'm trying to follow a simple tutorial to create a linechart. I'm following this tutorial: https://paulho1973.medium.com/create-line-chart-with-d3-and-react-...
2
votes
1
answer
673
views
d3.csv() function from D3.js library works but gives a blank error [duplicate]
I use d3.CSV() function, and it works. Nevertheless, it gives a blank error!
I have to figure out this problem as it may cause complications later.
CSV file:
Food,Rating
Pizza,90
Ice Cream,92
...
1
vote
1
answer
631
views
Upload a csv file in apps script from google drive blocked by CORS policy
I want to generate a D3.js tree from a google sheet.
In the exemple I followed, the tree is generated with a csv.
So, I have generated with apps script a csv file on my google drive from a google ...
1
vote
1
answer
80
views
Prob reading bar chart with d3js v7 Error: <rect> attribute height: Expected length, "NaN"
Dear stack overflow community,
I've been trying to create a bar chart using d3v7 for one of my Uni projects, following the _Blocks_ example. However, I am getting an error as mentioned in this ...
1
vote
0
answers
26
views
d3.csv returning each row instead of an array [duplicate]
I am totally beginner in D3 and i've trying to make some graphs of an external dataset. I've choose a Premier League Dataset, but when i call d3.csv to create an array with all data, the function ...
0
votes
1
answer
33
views
The array does not output properly
let test = [];
d3.csv("cgvList.csv", function (data) {
if (data.poi_nm == "CGV") {
let obj = {};
obj.content = '<div>' + data.branch_nm + '</div>';
...