d3.js

d3.j radial tree node links different sizes

三世轮回 提交于 2020-02-06 07:57:26
问题 I would like to change the link length between e.g. the first node generation to the second -> having in the end individual lengths to match for longer node titles. How can I do that? I couldn't find anything related to it but as I'm relatively new to d3.js/JS I maybe just missed the right keywords I made a JSFiddle with the problem: https://jsfiddle.net/j0kaso/0c9ed6Lv/47/ So with regards to the example, I would like to move children level 1 & 2 closer to the root/ level 0. In case this does

d3.j radial tree node links different sizes

元气小坏坏 提交于 2020-02-06 07:55:30
问题 I would like to change the link length between e.g. the first node generation to the second -> having in the end individual lengths to match for longer node titles. How can I do that? I couldn't find anything related to it but as I'm relatively new to d3.js/JS I maybe just missed the right keywords I made a JSFiddle with the problem: https://jsfiddle.net/j0kaso/0c9ed6Lv/47/ So with regards to the example, I would like to move children level 1 & 2 closer to the root/ level 0. In case this does

D3 pack layout with variable padding

此生再无相见时 提交于 2020-02-06 06:41:27
问题 I am not able to get variable padding using d3.layout.pack().padding(). I want to put different padding at group and at leaf nodes. d3.layout.pack() .sort(null) .size([this.width , this.height]) .children(function (d) { return d.values; }) .value(function (d){ return 1; }) .padding(function (d){ return d.padding; }) .nodes({ values: outerClusterData }) // Sample data outerClusterData = [ { key: "africa", padding: 100, values: [ { name: "city1", padding: 10 }, { name: "city2", padding: 10 } ]

D3 pack layout with variable padding

若如初见. 提交于 2020-02-06 06:40:45
问题 I am not able to get variable padding using d3.layout.pack().padding(). I want to put different padding at group and at leaf nodes. d3.layout.pack() .sort(null) .size([this.width , this.height]) .children(function (d) { return d.values; }) .value(function (d){ return 1; }) .padding(function (d){ return d.padding; }) .nodes({ values: outerClusterData }) // Sample data outerClusterData = [ { key: "africa", padding: 100, values: [ { name: "city1", padding: 10 }, { name: "city2", padding: 10 } ]

How to remove empty rows in tables when they are zero, and how to allow selection in only one table at a time?

≯℡__Kan透↙ 提交于 2020-02-05 14:56:31
问题 I created two tables that relate. When I select one or more items from Table A, Table B is resized according to that selection and vice versa. However, I need to lock the selection of the two tables at the same time. For example, if I click on the sellers Miguel and Sede , in Table B the values and cities corresponding to these two sellers will be rendered. And if in Table B I click on the cities of Faro and Loulé , automatically the sellers Miguel and Sede should be deselected. What happens

How to remove empty rows in tables when they are zero, and how to allow selection in only one table at a time?

笑着哭i 提交于 2020-02-05 14:55:16
问题 I created two tables that relate. When I select one or more items from Table A, Table B is resized according to that selection and vice versa. However, I need to lock the selection of the two tables at the same time. For example, if I click on the sellers Miguel and Sede , in Table B the values and cities corresponding to these two sellers will be rendered. And if in Table B I click on the cities of Faro and Loulé , automatically the sellers Miguel and Sede should be deselected. What happens

Simple way to add raw data to dc.js composite chart via Ajax

浪子不回头ぞ 提交于 2020-02-05 07:11:05
问题 I have a composite chart of 2 line charts however I need to add a third chart to it. This third chart will have these unique properties: The data will come in via an ajax call and be available as a two dimensional array [[timestamp,value],[timestamp,value]...] Every new ajax call needs to replace the values of the previous one It does not need to respect any of the filters and will not be used on any other charts It will however need to use a differently scaled Y axis.. (and labeled so on the

Simple way to add raw data to dc.js composite chart via Ajax

别说谁变了你拦得住时间么 提交于 2020-02-05 07:10:17
问题 I have a composite chart of 2 line charts however I need to add a third chart to it. This third chart will have these unique properties: The data will come in via an ajax call and be available as a two dimensional array [[timestamp,value],[timestamp,value]...] Every new ajax call needs to replace the values of the previous one It does not need to respect any of the filters and will not be used on any other charts It will however need to use a differently scaled Y axis.. (and labeled so on the

Why is there whitespace / “overlap” between rect elements where there shouldn't be?

风格不统一 提交于 2020-02-05 06:22:51
问题 I'm using d3.js to generate some rects which are directly above one another, in this fashion: var greenRed = d3.select(".green-red").append("svg") .attr("height", 120); greenRed.append("rect") .attr("fill", "green") .attr("x", 0) .attr("y", 0) .attr("height", 50) .attr("width", 300); greenRed.append("rect") .attr("fill", "red") .attr("x", 0) .attr("y", 50) .attr("height", 50) .attr("width", 300); I've noticed that depending on which colours are stacked on top of one another, there is either a

Chrome svg rendering issues - d3 - polylines

大憨熊 提交于 2020-02-05 05:13:25
问题 I am experiencing issues when rendering a d3 svg graph with polylines. It does work on chrome Version 70.0.3538.67 (Official Build) (64-bit) but not on my current version Version 78.0.3904.108 (Official Build) (64-bit). I am using d3 version v5.9.2. The issue does not occur when I remove the polylines connecting my d3 rendered foreign objects. The "shadows", moves around depending on how I move the picture around/zooming, sometimes all of them are gone but a few shadows are most often shown.