Questions tagged [d3.js]
D3.js is a JavaScript library for creating interactive data-bound visualisations of documents using HTML, SVG, and Canvas. Questions should mention the version number of D3 you are using.
d3.js
39,353
questions
-1
votes
0
answers
13
views
Screenshotting of SVG D3 diagram with wrong rounding edges
I'm trying to take a screenshot of SVG of my Sankey diagram generated by D3.js in React app. Every time I try to capture it using different libraries and methods, the edges of the links become rounded....
0
votes
0
answers
27
views
Leaflet - SVGs in Custom Pane not updating position
I am using d3.js to draw svgs on a basic map in Leaflet. I want my custom pane lay on top. I have created a pane and it works just fine.
// draw overlay in custom pane
function drawBorderOverlay() {
...
0
votes
0
answers
13
views
Build errors when using d3 in a sharepoint 2019 spfx environment
I have a devenvironment setup for Sharepoint 2019/SPSE and i can create webparts but have problem when using d3.js. Adding import * as d3 from 'd3' generates a bunch of type-errors when running gulp ...
0
votes
0
answers
26
views
Irregular Samples (Bodyweight) to a Smart Trend Curve [closed]
I have measured values. Specifically, it is about body weight measurements that can also calculate the approximate fat and muscle percentage.
I'm wondering what procedure I can use to achieve the best ...
0
votes
0
answers
51
views
SVG rounds edges with large stroke-width
I met a problem during sankey diagram generating with d3 and screenshoting it with html2canvas.
D3 looks fine with this code of links:
<svg id="svg" width="740" height="400">
<g fill="...
0
votes
0
answers
14
views
How make own d3.arc function?
I try make own d3.arc function but can't count arc's large-arc-flag and sweep-flag.
createArc (bands) {
const innerRadius = this.maxRadius * 0.8
const outerRadius = this.maxRadius * 0.95
...
0
votes
0
answers
10
views
How to calculate the center of pie slice with pie chart created with D3?
I created a pie chart with D3. I want to calculate the center of each pie slice, so I can draw a line/path from the center of each pie slice. At the end of the line, it'll have text.
Code Playground
I ...
1
vote
0
answers
32
views
D3 Issue with custom link strength on update
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js"></script>
<style>
svg {
border: 1px black solid;
}
</style&...
1
vote
1
answer
16
views
Issues with Event Handlers D3.js Update Function
I’m experiencing an issue where the mouseover event isn’t working after integrating the update function into my D3.js code. It seems the event listeners are not being recognized or triggered as ...
1
vote
1
answer
23
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,...
2
votes
0
answers
54
views
Trouble with correctly triangulating a polygon on a sphere in THREE.js
tldr: help I can't correctly triangulate a GeoJSON polygon in 3D space to make it spherical and it has been haunting me for weeks. The question at the end of this novel is "Is this a poly2tri ...
0
votes
1
answer
68
views
How to install the D3 library
I have an issue with the methods in the D3 library. I am a fairly new to JS and my background is more in Python and Java. I am currently just testing out to make some visuals on a webpage and for some ...
0
votes
0
answers
21
views
How to sort and align the nodes vertically in the graph using d3.js and angular 13
I have used the d3.js graph structure to draw the flow chart. I have managed to align each node vertically at each level. However, I am facing several issues:
I am unable to sort the nodes based on ...
1
vote
1
answer
30
views
Limit chart bottom labels to 7
I'm working on a D3 line chart that requires bottom labels to be 7, but the chart has more data than 7 and want to limit it.
Here is a work-in-progress jsfiddle:
jsfiddle.net/JosephMurphy/au2y7pLs/16/...
0
votes
0
answers
46
views
D3 scaleTime getting really strange dates
I am working on a timeline in d3. My expectations are that it shows the day of today, and then the user can zoom in/out to see more times and dates. However to start with it gets me a date in 2034 and ...