dc.js

Set proper dc.selectMenu drop-down options

你离开我真会死。 提交于 2019-12-13 18:33:33
问题 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <div id = "selectbox"> </div> <div id = "chart1"> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src = "https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/js/bootstrap.min.js"></script> <script src="https://cdnjs.cloudflare

Is there a way to set a default color for the un-selected boxes in heatmap in dc.js when crossfilter is applied?

浪子不回头ぞ 提交于 2019-12-13 17:33:02
问题 When i select a cell in the Heatmap, the surrounding cells turn into a "grey" color which is defined in the DC CSS styling file. When the crossfilter is applied between two heatmaps the remaining un matched cells in the other maps turn to a respective color depending on the data set uploaded i'm assuming. Is there a way to set this to the default "grey" color as in the first selected Heatmap var data = [ { [ { "x54": -0.882989, "x1": -0.696828, "row": 1, "column": 1 }, { "x54": -0.876465, "x1

dc scatter plot binding onClick event

拥有回忆 提交于 2019-12-13 14:24:33
问题 I am using dc.scatterPlot .. Not able to find how can I bind mouse on click to different symbols (data points) in scatter plot. I think I should first access _symbol and then set attribute, but it seems like there is no way to access _symbol of scatter plot or may be I am getting this completely wrong. Please suggest. var individualEventchart = dc.seriesChart("#event-individual-chart"); var symbolScale = d3.scale.ordinal().range(d3.svg.symbolTypes); var symbolAccessor = function(d) { return

Angular dc.js filter issue

隐身守侯 提交于 2019-12-13 08:01:26
问题 I'm using this angular addon for using dc.js charts with Angular. I'm using this example with a custom behavior, I added an input box in order to filter the Run value from the inputbox value, angular is catching the variable change but dc.js doesn't filter accordingly. here is my custom html and js: <!DOCTYPE html> <html lang="en"> <head> <title>dc.js - Pie Chart Example</title> <meta charset="UTF-8"> <link rel="stylesheet" type="text/css" href="//dc-js.github.io/dc.js/css/dc.css"/> <script

dc.js - unable to plot line chart on average

那年仲夏 提交于 2019-12-13 05:13:23
问题 I'm creating a line chart using dc.js . Link for the fiddle. Challenge I'm facing is. I'm trying to plot a line graph on average of values which is not happening currently. In the fiddle I have two javascript variables namely - dateHits and dateDimTotal . dateHits is produced using reduceSum and dateDimTotal is the average on date. If I group the line chart using dateHits . Line chart appears without any problem. But if I replace the dateHits to dateDimTotal nothing appears. Someone help me

Why dc.js doesnt draw choropleth map?

匆匆过客 提交于 2019-12-13 04:48:48
问题 I tried to make map with dc.js library but it doesnt draw the map. I used "US Venture Capital Landscape 2011" example.(link) Here my codes: trChart.width(800) .height(500) .dimension(ilDim) .group(ilGroup) .colors(d3.scale.quantize().range(["#E2F2FF", "#C4E4FF", "#9ED2FF", "#81C5FF", "#6BBAFF", "#51AEFF", "#36A2FF", "#1E96FF", "#0089FF", "#0061B5"])) .colorDomain([0, 200]) .colorCalculator(function (d) { return d ? trChart.colors()(d) : \'#ccc\'; }) .overlayGeoJson(map.features, "SEHIR",

Plotting top values of a group on dc.js bar chart

浪尽此生 提交于 2019-12-13 04:34:02
问题 I'm trying to plot only top(n) or least(n) values of a particular Crossfilter group in dc.js, but I'm not sure how to achieve this. I've checked it in console.log() that my group is returning values as needed, but how can I plot those top values in the chart? groupForBandwidthConsumed = dimByOrgName.group().reduceSum(function (d) { return d.bandwidthConsumed; }); groupForBandwidthConsumed.top(Infinity).forEach(function (d) { console.log(d.key, d.value); }); I read that .data() function helps

How to make row chart for multilabel data in dc.js

╄→尐↘猪︶ㄣ 提交于 2019-12-13 01:05:55
问题 I have data with one column that is a list of labels for each data point. I would like to use dc.js to make a row chart that plots the number of occurrences of each label. Data looks like this: Date , Labels 1/1/2015 , "A, B, C" 1/2/2015 , "B" 1/3/2015 , "C, A" 1/4/2015 , "A" I would like a row chart that aggregates them like this: A: 3 B: 2 C: 2 My code so far: var labels = ["A", "B", "C"]; var labelBar = dc.rowChart("#label-bar"); d3.csv('data.csv', function (csv) { var data = crossfilter

DC.js choropleth map chart CSS conflicting with colouring, no map showing. How can I turn off the fill:none?

微笑、不失礼 提交于 2019-12-13 00:12:38
问题 I have included the html code below which imports dc.js's javascript and css. When i load the page all the elements are in the correct place. When I select a county path element and deselect the fill:none css then the map shows as it should. screen shots: fill:none ON fill:none OFF HTML: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>D3: Choropleth</title> <link href="https://cdnjs.cloudflare.com/ajax/libs/dc/1.7.5/dc.min.css" rel="stylesheet"/> <script src="https:/

dc-js disable selecting slices on click for pie chart

无人久伴 提交于 2019-12-12 20:17:40
问题 I'm looking for bar chart brushOn(false) analog for pie chart. This code also does not work for me: chart.renderlet (_chart) -> _chart.selectAll(".pie-slice").on "click", (d) -> _chart.filter null My dc-js version is 2.0 回答1: According to https://groups.google.com/forum/#!msg/dc-js-user-group/Fxg4vykNSqI/hgdj2PEomHsJ : pieChart.filter = function() {}; I tried this out at http://jsfiddle.net/djmartin_umich/3chM6/ and it seems to work as desired. 来源: https://stackoverflow.com/questions/24783004