dc.js

DC JS Limiting brushing height

丶灬走出姿态 提交于 2019-12-11 08:14:49
问题 Is there a way to limit the brushing height - say 50% of y axis (only from Y axis 0 - 250, brushing should work) ? Example fiddle JS Code: var hitslineChart = dc.barChart("#chart-line-hitsperday"); var data = [ {date: "12/27/2012", http_404: 2, http_200: 190, http_302: 100}, {date: "12/28/2012", http_404: 2, http_200: 10, http_302: 100}, {date: "12/29/2012", http_404: 1, http_200: 300, http_302: 200}, {date: "12/30/2012", http_404: 2, http_200: 90, http_302: 0}, {date: "12/31/2012", http_404:

Display data point on top of brush

℡╲_俬逩灬. 提交于 2019-12-11 07:55:04
问题 I have a composite chart comprised of a bar chart and scatter plot. I would like to display the scatter plot data points although brushing is enabled. In the current behaviour, the brushing overrides the data point tooltip. Any help to fulfill this requirement please? scatterChart .width(380) .height(200) .margins({ top: 10, right: 20, bottom: 30, left: 40 }) .dimension(scatterDimension) .group(scatterGrouping) .x(d3.scale.linear().domain([0., 100.])) .y(d3.scale.linear().domain([0., 100.]))

Aggregate datatable with percentage for grouped elements dc.js

守給你的承諾、 提交于 2019-12-11 07:53:13
问题 How to display failure % in the data table? I have the following csv and I am calculating the percentage of failures for each "name" field , I want to display the total failure percentage for each "name" in datatable Customer | year| Week |Failure_Reason| name | Type | Count ___________________________________________________________________________ A 2018 29 D Express Air PR 27 ___________________________________________________________________________ A 2018 26 M Express Air PR 58 _________

Dc.js leaflet marker popup showing fields from input data

流过昼夜 提交于 2019-12-11 07:37:20
问题 I'm a dc.js novice working on a dashboard displaying information on charts and a map. I'm currently unable to display information on the marker popup window besides the default, which seems to be a point's coordinates (geo) and the number of occurrences. Current code is: var facilities = xf.dimension(function(d) { return d.geo; }); var facilitiesGroup = facilities.group().reduceCount(); dc.leafletMarkerChart("#test .map",groupname) .dimension(facilities) .group(facilitiesGroup) .width(540)

Summing a column and displaying percentage in a number chart

大城市里の小女人 提交于 2019-12-11 07:13:59
问题 I would like to sum the column elecVotes and then divide it by the elecVote of a state that has been clicked on so that I can show the percentage of the electoral vote that state is worth and display it in a dc.numberDisplay . This is my data structure: //updated ElecVotes.csv: state,elecVotes, Alabama,9 Alaska,3 Arkansas,6 Arizona,11 Florida,29 Georgia,16 Iowa,6 Idaho,4 Indiana,11 Kansas,6 Kentucky,8 data.csv: state,party,votes,winner,elecVote Alabama,Democratic,725704,1,9 Alabama,Republican

dc.js charts not linked

半城伤御伤魂 提交于 2019-12-11 07:08:33
问题 I have two barCharts exactly equivalent except for the .brushOn option : pnlPerDaybarChart .height(300) .width(700) .dimension(dims.date) .group(groups.date.pnlSum) .valueAccessor(function(d) { return Math.abs(d.value); }) .renderTitle(false) .x(d3.time.scale().domain([minDate,maxDate])) .xUnits(d3.time.days) .colors(colorChoice) .colorAccessor(colorAccessorPosNeg) .brushOn(false) .elasticY(true) .margins({left: 70 ,top: 10, bottom: 30, right: 50}) .centerBar(true); pnlPerDaybarChartBrush

multiple numberDisplays from group

♀尐吖头ヾ 提交于 2019-12-11 07:06:37
问题 With the following data, how can I bin by the class column (high, middle, low) and total the values and display each total with its own dc.numberDisplay in this form? 回答1: Well, this is pretty close. Because the number display only displays one number, we need to generate a div for each value we want to display. First, the usual crossfilter stuff, creating a group that bins by class: var data = d3.csv.parse(d3.select('pre#data').text()); data.forEach(function(d) { d.value = +d.value; }) var

dc.js barChart - click on x-axis ticks and labels

与世无争的帅哥 提交于 2019-12-11 06:55:31
问题 i am using dc.js (2.0.0-beta.32) for several bar charts, which may happen to display bars whose values differ of 2-3 orders of magnitude, making smaller values' bars almost zero-height, which are almost impossible to click reliably. i can somehow mitigate this by using a non-linear scale for the bars' height, though this is not really useful because of other constraints i have on data and charts across the project. adding labels via .label() is not doable either because of the layout i have

dc.js Scatter Plot with multiple values for a single key

空扰寡人 提交于 2019-12-11 06:49:40
问题 We have scatter plots working great in our dashboard, but we have been thrown a curve ball. We have a new dataset that provides multiple y values for a single key. We have other datasets were this occurs but we had flatten the data first, but we do not want to flatten this dataset. The scatter plot should us the uid for the x-axis and each value in the inj field for the y-axis values. The inj field will always be an array of numbers, but each row could have 1 .. n values in the array. var

dc.js LineChart Aggregated by Month/Year

廉价感情. 提交于 2019-12-11 06:48:11
问题 I trying to plot a lineChart and I want to aggregate data by Month. I am using dataset from crossfilter documentation with slight modification in date. This is how my dataset looks like: var data = [ {date: "2011-11-14T16:17:54Z", quantity: 2, total: 190, tip: 100, type: "tab"}, {date: "2011-07-10T16:28:54Z", quantity: 1, total: 300, tip: 200, type: "visa"}, {date: "2011-07-15T16:28:54Z", quantity: 1, total: 300, tip: 200, type: "visa"}, {date: "2011-06-14T16:30:43Z", quantity: 2, total: 90,