dc.js

DC JS : How to highlight rows in an aggregated data table on click, similar to a row chart?

╄→гoц情女王★ 提交于 2019-12-12 20:02:17
问题 I love the DC.JS library and have been trying to create a clickable aggregated table in DC.js with partial success. I want to highlight the rows on click event(multiple selections allowed) similar to the row chart or an ordinal bar chart in dc js. Like a row chart, when multiple selections are made, multiple table rows should be highlighted. I am not able to select the row that I have clicked on, rather, my css selects the first row irrespective of which row I click. I tried to use 'this'

dc.js / crossfilter dimensions (year / week)

青春壹個敷衍的年華 提交于 2019-12-12 19:15:28
问题 I can't make a correct graph showing the data group by week (and different years). pseudo SQL would give: select sum ('task') group by 'year', 'week' (and maybe later 'site') My data looks more or less like this: { "date" : "20150427", "week" : 18, "site" : "a" "task" : 3, } { "date" : "20150427", "week" : 18, "site" : "b" "task" : 4, } { "date" : "20150427", "week" : 18, "site" : "c" "task" : 2, } { "date" : "20150427", "week" : 18, "site" : "d" "task" : 3, } { "date" : "20150428", "week" :

geoChoroplethChart map that displays cities / points of interest with tags

徘徊边缘 提交于 2019-12-12 15:22:31
问题 I've implemented an infographic / map using crossfilter and d3.js. What I would like is to add the functionality of rendering different data entries as points of interest on the map: For example here we have cities in Mexico and data to indicate a metric of tequila consumption. What I would like to make is, for instance, tequila consumption in different cities of Europe. How can I overlay such information over my map of Europe. The thing is, it's very clear how to do this with d3.js but it is

Using dimensions with arrays in dc.js/crossfilter

橙三吉。 提交于 2019-12-12 08:04:31
问题 Crossfilter supports dimensions with arrays since version 1.4.0-alpha.06 https://github.com/crossfilter/crossfilter/wiki/API-Reference#dimension_with_arrays Is it possible to exploit this functionality in dc.js? I haven' found any examples yet... I am aware of the method described in Is there a way to tell crossfilter to treat elements of array as separate records instead of treating whole array as single key?, but that works with earlier versions of crossfilter too (it does not make use of

Single column stacked bar chart in dc.js

不打扰是莪最后的温柔 提交于 2019-12-12 05:56:40
问题 I've been working with dc.js and quite enjoyed the multiple time series, visualised as stacked charts. However, I cannot figure out how to do a single-column stacked chart. My dataset details air strikes. One row per strike, identifying a country, location, and all that stuff. The idea is to have on a single column a stacks of different importance (area) depending on the number of strikes by each country. Such as in this image: Thanks so much for your help! 来源: https://stackoverflow.com

Crossfiltering using google maps

醉酒当歌 提交于 2019-12-12 04:42:26
问题 The map is not showing up. The following is my code. <!doctype html> <html> <head> <link rel="stylesheet" href="bower_components/dcjs/dc.css"> <script src="bower_components/d3/d3.min.js"></script> <script src="bower_components/crossfilter2/crossfilter.min.js"></script> <script src="bower_components/dcjs/dc.js"></script> <script src="bower_components/dc-addons/dist/leaflet-map/dc-leaflet.js"></script> <link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css" /> <script src

dc.js - queries related to axis

懵懂的女人 提交于 2019-12-12 04:39:46
问题 I have some queries with the axis in dc.js. I'm using line and row chart. How can i arrange the row chart labels in a different order? And how can I set the y-axis of a line chart to start to 20 or 30 or 50 instead of 0. Can some help me in this? Fiddle I wanted to make the y axis to start from 200 in the line chart. And also help me in how to arrange the row chart in order of a week. i.e., monday, tuesday and so on. 回答1: I found it. I was so stupid that d3.scale.linear didn't flash. Finally

dc.js and crossfilter custom valueAccesor

爱⌒轻易说出口 提交于 2019-12-12 03:27:23
问题 I am attempting to chart average counts by hour and the custom reduce function is almost working here https://jsfiddle.net/dolomite/6eeahs6z/ There is an issue in that some hours have no activity, e.g. there may be three Sundays in the data but only two have activity: Date, Hour, Count Sun 02/07/17, 22, 5 Sun 09/07/17, 22, 3 The data contains the date 25/07/17 but has no records for hour 22. The correct average for hour 22 on Sunday should therefore be 2.66 but the current method is producing

group.all() call required for data to populate correctly

那年仲夏 提交于 2019-12-12 02:56:01
问题 So I've encountered a weird issue when dealing with making Groups based on a variable when the crossfilter is using an array, instead of a literal number. I currently have an output array of a date, then 4 values, that I then map into a composite graph. The problem is that the 4 values can fluctuate depending on the input given to the page. What I mean is that based on what it receives, I can have 3 values, or 10, and there's no way to know in advance. They're placed into an array which is

Time is repeating in dc.js linechart x axis

我与影子孤独终老i 提交于 2019-12-12 02:13:50
问题 Hello I have a line chart made using dc.js linechart. But i am facing problem in the x axis time values. I am attaching my jsfiddle here. http://jsfiddle.net/6e67uzfn/24/ As you see the same minute is repeating multiple times. But i want to show the same minute only once in the x axis. How can I do that? Here is the sample code which you can find in the jsfiddle also. var data=[ {"id":20,"time":"2015-03-29T20:32:24Z","speed":20}, {"id":21,"time":"2015-03-29T20:32:24Z","speed":15}, {"id":22,