dc.js

Load large dataset into crossfilter/dc.js

心已入冬 提交于 2019-12-02 19:39:00
I built a crossfilter with several dimensions and groups to display the data visually using dc.js. The data visualized is bike trip data, and each trip will be loaded in. Right now, there's over 750,000 pieces of data. The JSON file I'm using is 70 mb large, and will only need to grow as I receive more data in the months to come. So my question is, how can I make the data more lean so it can scale well? Right now it is taking approximately 15 seconds to load on my internet connection, but I'm worried that it will take too long once I have too much data. Also, I've tried (unsuccessfully) to get

Reorder datatable by column

前提是你 提交于 2019-12-02 18:47:46
I was wondering if there is any known way to efficiently add a "Reorder" feature to my datatables in dc.js. It would be great if my users, after having done their selection with the charts, could decide according to which column the filtered rows should be ordered (by clicking on the column header for example). Any ideas where to start? Thanks a lot I like to use JQuery datatables for this: http://datatables.net/ First add the table and the header row: <table id="dc-data-table" class="list table table-striped table-bordered"> <thead> <tr> <th>Country</th> <th>Users</th> </tr> </thead> </table>

Disable interactivity in dc.js

十年热恋 提交于 2019-12-02 17:14:55
问题 I have a number of bar charts created using dc.js . In the default behavior, the user can click+drag on any of them to update the crossfilter. How can I make a chart "display-only"? That is, the chart will update when other components update the crossfilter, but the user can't select data in the "display-only" chart to update the crossfilter. 来源: https://stackoverflow.com/questions/32302885/disable-interactivity-in-dc-js

dc.js: Adding Totals to Bar Chart

限于喜欢 提交于 2019-12-02 16:23:29
问题 I'm trying to create a bar chart in dc.js with the totals label at the end of the charts. Right now, I can't find any documentation on parameters or functions to pass through that'll allow it to happen. Any help would be greatly appreciated! 回答1: Gordon, you are correct that this is a duplicate of a problem that you mentioned in a comment! However, I found the answer didn't work because .renderlet chaining was removed. Here's a reworked version of it that worked for me (kinda, there is still

performance issue using dc.js and ui-router with tabs

和自甴很熟 提交于 2019-12-02 14:39:44
问题 I'm using dc.js with angular.js's ui-router. My goal is to have two routing states. Each should present multiple graphs. Everything works fine, but everytime the routing state changes, the performance of the graphs gets slower. I think that the problem maybe is located on dc.js or my usage of it. Everytime the routing state changes, new graphs will be invoked. Maybe dc.js doesn't delete the old ones. Is there an option in dc.js to delete the graphs? 回答1: There is the undocumented dc

dc and crossfilter - calculating percentage within records

╄→гoц情女王★ 提交于 2019-12-02 10:57:31
I'm trying to calculate and plot percentage (%) in one of my dc charts. I have read the API and multiple examples regarding reduce functions (add, remove & init etc) I referred to 1st & 2nd for my codes. I want to calculate decay percentage ( sum(decay_data)/sum(all_data) ; decay_data is defined in data by "decay_ind==1" ) I'm still not getting anything in the graph due to some issue, the value accessor is also used but, there could be some issue in that. In the code, please just see "percentgroup" and "datedimension" only, others are for separate charts. My code so far : var chart = dc

dc.js heatmap deselected colors

末鹿安然 提交于 2019-12-02 09:46:29
In dc.js I have linked a heatmap with a bar chart. When a range is selected on the bar chart, the heatmap defaults to the first color in the color scheme instead of the gray deselected color. How can I get the heatmap to use the gray color? The solution is to use a custom reduce function on the group. In so doing, I can set the value of a deselected item to null and then use an appropriate color for all null values. 来源: https://stackoverflow.com/questions/40580748/dc-js-heatmap-deselected-colors

Custom legend based on color of bars in a dc.js composite chart

别来无恙 提交于 2019-12-02 09:36:16
问题 I implemented a composite chart with two bar charts in which one bar chart consists of bars with different colored bars. Now, I want to create a custom legend that represents each color bar (similar to https://dc-js.github.io/dc.js/examples/pie-external-labels.html used for pie chart). Below is the code snippet of what I've done so far: var buttonPress = dc.barChart(composite) .dimension(joyTimeDimension) //.renderlet(colorRenderlet) //.colors('red') .colors(colorbrewer.Set1[5]) .colorDomain(

performance issue using dc.js and ui-router with tabs

你离开我真会死。 提交于 2019-12-02 07:35:17
I'm using dc.js with angular.js's ui-router. My goal is to have two routing states. Each should present multiple graphs. Everything works fine, but everytime the routing state changes, the performance of the graphs gets slower. I think that the problem maybe is located on dc.js or my usage of it. Everytime the routing state changes, new graphs will be invoked. Maybe dc.js doesn't delete the old ones. Is there an option in dc.js to delete the graphs? There is the undocumented dc.chartRegistry.deregister(chart,group) : https://github.com/dc-js/dc.js/blob/master/src/core.js#L70 But a bigger

How to filter precisely on date?

耗尽温柔 提交于 2019-12-02 06:07:59
问题 I'm using a lineChart to show created date (one field in my data), it works fine and I can select, but I need a more precise filter: only for items created today, this week, last week, this month, last month Is there already an example of how it's done? I'm struggling on how to apply a daterange filter 回答1: Since this question comes up now and then and it would be nice to have a decent example, I went back to NorthSide's question from a while back and fixed up the fiddle. dc.js - add drop