d3.js

show additional data properties on mouseover in dc.js

不想你离开。 提交于 2020-01-04 05:10:48
问题 I would like to display additional data labels and values (other than x-axis and y-axis) on mouseover in dc.js. Below are data and the charting code. var people = [ { "id": 1, "name": "Damaris", "gender": "Female", "DOB": "1973-02-18", "MaritalStatus": "false", "CreditCardType": "visa-electron" }, { "id": 2, "name": "Barbe", "gender": "Female", "DOB": "1969-04-10", "MaritalStatus": "true", "CreditCardType": "americanexpress" }, { "id": 3, "name": "Belia", "gender": "Female", "DOB": "1960-04

show additional data properties on mouseover in dc.js

帅比萌擦擦* 提交于 2020-01-04 05:10:09
问题 I would like to display additional data labels and values (other than x-axis and y-axis) on mouseover in dc.js. Below are data and the charting code. var people = [ { "id": 1, "name": "Damaris", "gender": "Female", "DOB": "1973-02-18", "MaritalStatus": "false", "CreditCardType": "visa-electron" }, { "id": 2, "name": "Barbe", "gender": "Female", "DOB": "1969-04-10", "MaritalStatus": "true", "CreditCardType": "americanexpress" }, { "id": 3, "name": "Belia", "gender": "Female", "DOB": "1960-04

D3 - adding grid to simple line chart

*爱你&永不变心* 提交于 2020-01-04 04:34:44
问题 In the following simple line chart, I want to add grid to x and y axis. Can someone help me in that? SNIPPET: <html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.12/angular.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.3.0/d3.min.js"></script> </head> <body ng-app="myApp" ng-controller="myCtrl"> <svg></svg> <script> //module declaration var app =

Complex data object with duplicate 'values' = missing chart bars

走远了吗. 提交于 2020-01-04 04:33:26
问题 I'm not sure if this is a d3 bug or if I'm doing something wrong. Take a look at the following: http://jsfiddle.net/Jakobud/SfWjB/6/ var data = [ { value: 20, color: 'red' }, { value: 30, color: 'blue' }, { value: 30, color: 'purple' } // Same value as 2nd object ]; var w = 140, h = d3.max(data, function(d){ return d.value; }) + 30, barPadding = 4, topPadding = 1, bottomPadding = 20; var svg = d3.select('#chart') .append('svg:svg') .attr('width', w) .attr('height', h); var rects = svg

d3 circles on a leaflet map

*爱你&永不变心* 提交于 2020-01-04 04:06:27
问题 I am using the following code to generate a map with circles; http://jsbin.com/OTaKEDor/2/edit <script src="http://d3js.org/d3.v3.min.js"></script> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" /> <script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.3.9/d3.min.js"></script> <script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script> <script type='text/javascript' id='lt_ws' src='http://localhost:52656/socket.io/lighttable/ws.js'></script>

Uncaught TypeError: d3.schemeCategory20 is not a function

隐身守侯 提交于 2020-01-04 03:39:58
问题 I'm new in d3js and all the javascript-world too. In my html-file I simply import the script like that: <script src="https://d3js.org/d3.v4.min.js"></script> By trying to use following: var ordinalColorScale = d3.schemeCategory20(); I get the exception Uncaught TypeError: d3.schemeCategory20 is not a function at index.html:48 Do I need any other d3js module, which has to be imported? Or what could have caused the problem? 回答1: d3.schemeCategory20 is neither a scale nor a function. It is just

Uncaught TypeError: d3.schemeCategory20 is not a function

会有一股神秘感。 提交于 2020-01-04 03:39:10
问题 I'm new in d3js and all the javascript-world too. In my html-file I simply import the script like that: <script src="https://d3js.org/d3.v4.min.js"></script> By trying to use following: var ordinalColorScale = d3.schemeCategory20(); I get the exception Uncaught TypeError: d3.schemeCategory20 is not a function at index.html:48 Do I need any other d3js module, which has to be imported? Or what could have caused the problem? 回答1: d3.schemeCategory20 is neither a scale nor a function. It is just

How do I use mutationobserver instead of mutation events?

大兔子大兔子 提交于 2020-01-04 03:38:54
问题 I am trying to create my first streamgraph with D3.js. I am starting with a working example which incorporates a tooltip from code posted on-line, http://bl.ocks.org/WillTurman/4631136: When I copy the index.html and data.csv files to my PC (Windows 7), I am able to see the streamgraph in a browser (Firefox). However, I get a JS warning, " Use of Mutation Events is deprecated. Use MutationObserver instead. " What lines of code correspond to the Mutation Event? And how should I edit them to

d3.json call always gets null data

一笑奈何 提交于 2020-01-04 03:04:12
问题 If I make this call to the server from a browser: http://localhost:8080/api/items/number/all.json or from curl (curl -G http://localhost:8080/api/items/number/all.json) I get back the following json: { "language":null, "number":10, "queryId":0, "from":null, "to":null, "percentage":33, "dataInfoSet":null } However when I use d3.json call: d3.json("http://localhost:8080/api/items/number/all.json", function(jsondata){ console.log(jsondata); }); the output from console.log is null. If instead the

What ever happend to the d3j.s force directed graph cluster example see on this image?

杀马特。学长 韩版系。学妹 提交于 2020-01-04 02:56:28
问题 What ever happend to the d3.js example on this image. The force directed graph cluster. Second row, 3rd column? http://vis.stanford.edu/papers/d3 回答1: I guess what you are interested in is the shapes surrounding groups of nodes. The following examples implement it : force-multi-foci with convex hulls alpha-shapes aka concave hulls in d3 Hope this helps, 来源: https://stackoverflow.com/questions/14571538/what-ever-happend-to-the-d3j-s-force-directed-graph-cluster-example-see-on-this