Tag: d3.js

How to make a horizontal Stacked bar chart with D3

I just started using D3.js, and have been trying to make this stacked bar chart horizontal(link below). https://github.com/DeBraid/www.cacheflow.ca/blob/master/styles/js/d3kickchart.js http://cacheflow.ca/blog/index.html (You can find the chart in the middle of the page) As a result, I completely stacked on the half way… I would greatly appreciate it if anyone gives me some guides to archive this. Problem […]

Plot d3 chart on to Leaflet / Mapbox map

I have a radial d3 chart that I would like to plot / overlay on to a Leaflet / Mapbox map at lat,long co-ordinates. I have looked around and the solutions all seem to be plotting circles onto the map using cx, cy positions, which is not what I need. Can I add the SVG […]

.csv binding to d3.js trouble

New guy starting out in d3.js, coming from PHP/python, but my JS knowledge is very weak. I am trying to bind an X/Y position to a scatterplot and I keep getting an error Error: Invalid value for attribute d=”MNaN,NaN” or Error: Invalid value for attribute cx=”NaN” Error: Invalid value for attribute cy=”NaN” and I am […]

D3.js Drag svg element over other element and detect it

Hy, So lets say I have two rect elements: A: not draggable B: draggable And what I want is when I drag B (with the help of d3.js) and after dragging release it on A, I want to detect this. Is there any way to do this? Thanks in advance

mpld3 generated html missing xticklabels and color in the legend

I am simply using the matplotlib example here and writing it out as html using mpld3. However the generated html using mpld3 is missing the xticklabels and color in the legend. If I generate the plot without converting to html it is generated just fine with xticklabels and contains color in the legend. Its the […]

Internet Explorer 11 D3 javascript error – SCRIPT5 Access is denied

I’m trying to open this D3 along with this json on IE11, but the screen is just blank. When I Inspect Element to check console, it shows this error : SCRIPT 5 : Access is denied. File: d3.min.js, Line: 1, Column: 10922 I tried many fixes like lowering security, allowing active content, adding specific tags […]

Extending Bokeh to match D3.js

As I understand it, Bokeh looks to provide for Python, similar capability that D3.js provides for JavaScript. Some advantages for Bokeh I can see include the use of HTML Canvas (so we can render more to the browser), Abstract Rendering and a lower barrier to entry for people familiar with Python over JavaScript but wanting […]

Angularjs NVD3 Custom X Axis

I have the following plunker where I want to wrap the X Axis labels to next line. I have the following configuration in my controller to customize the x axis but it is not working xAxis: { axisLabel: ‘X Axis’, tickFormat: function(d){ var words = d.split(‘ ‘),label = ”; for (var i=0; i< words.length; i++) […]

How to append javascript file to the body from javascript file which is in the same directory. Java server faces 2 JSF2

I have test.js file, it has an initialization function window.onload = function initiliaze() { … }, which is invoked whenever the window is created. I would like to include other javascript file “d3.min.js” , which is located in the same directory as test.js file is located, into the HTML body when initiliaze() is called. This […]

D3.js – Tween Arc position, inner Radius and outer Radius – D3.js Arc

I am trying to work out how to tween multiple arcs to new positions, while also changing the size of the arc in terms of its inner and outer radius. Meaning it will move from its current position on the canvas to its new position while also morphing to its new shape based on changes […]