score:5
Accepted answer
Maybe the data.report
array is not sorted by timestamp (the sample provided is unsorted). In your code, you assume that those values are sorted. You can try using
// Compute the timestamp extent
var timeExtent = d3.extent(data.report, function(d) { return d.timestamp; });
dc.barChart("#graphTimeOverview")
// more settings here
.x(d3.time.scale().domain(timeExtent.map(function(d) { return new Date(d); })))
.round(d3.time.hour.round)
.xUnits(d3.time.hours)
.renderHorizontalGridLines(true);
It would be easier to tell what is the problem if you provide a jsFiddle.
score:0
I started using dc.js few days ago, so I don't know for sure. But, I think your code should go in
d3.csv("data.csv", function(data) { //your-code };
or
d3.json("data.json", function(data) {//your-code};
or
jQuery.getJson("data.json", function(data){//your-code});
Source: stackoverflow.com
Related Query
- Trouble using DC.js (crossfilter and d3 convenience library) - bar chart not showing values
- Bar chart using d3.js , pandas and flask
- X axis not displaying on bar chart using d3.js
- Using d3.layout.stack() and parsing csv for bar chart
- Stacked Bar Chart using d3.js stack layout; the bar sections not always in correct place
- How to show values stacked bar chart utilizing dc.js and d3.js?
- D3.js bar chart - axis and labels not working / transitioning
- grouped Bar chart using D3 grid issue and console errors
- D3 bar chart not working properly with all negative and positive values
- Make responsive D3 Hierarchical bar chart and show tooltip
- Using d3-tip and CSS hover effect with d3 stacked bar chart
- NVD3 LineChart: Some xAxis dates do not show at the beginning and end of the axis, despite I am using the tickValues() method
- D3 line chart does not show tool tip and data points properly
- How to show D3 chart using Bootstrap modal popup when click on button and download it as image format
- Why does my bar chart using scaleBand not line up with my tick marks?
- D3 bar chart does not dynamically update y-axis and x-axis properly
- Chart min max values from each given day using crossfilter and dc.js
- How to use log scale to show proper stacked bar chart using d3 JS?
- dc.js and crossfilter stack bar chart with filtered versus unfiltered
- d3.js - add text above bar chart not show
- dc.js - Chart not rendering (single row bar chart - horizontal row), with the exception of legend, axes and tick marks/values (which do render)
- Stacked bar chart not showing and no errors in console log either
- How to show the unhighlighted/ not selected data points on scatter plots when using brush/group in dc.js? And is multiple brushes possible in dc.js
- D3js v5 Trying to select multiple bars in bar chart using brush and saving values to variable and table
- Trying to draw a bar chart in D3 and I am not seeing the output
- Having trouble making a bar chart bar onClick create changes to scatter chart points using D3
- D3.js bar chart not animating correctly and leaving behind artifacts after animation
- How to get Average from DOW of Date column using crossfilter to populate in bar chart
- How to filter data using DC, D3, and Crossfilter to produce a bar chart?
- Can not show labels in group bar chart d3js v6
More Query from same tag
- d3.geo.path() to draw multiple routes on a map
- how to pass returned data stored as a variable from a d3.json call as an argument to circle radius
- Why is my reducer behaving differently between the first filter and subsequent filters applied in dc.js?
- D3.js animation in conjuction with jQuery update
- what is d.source? [Documentation is referring itself]
- D3 module on Drupal doesn't show examples
- Mouseover is not working in d3.js by attaching it to circles
- d3 grid lines, have done some research but still stuck
- IE9 detects z-index events different than Chrome/Firefox - how to fix?
- Changing the appearance of D3 links
- Nicing a linear scale with a negative lower bound
- AJAX is not a function error in d3/flask interface
- How to get second bars to show on grouped bar chart?
- Visualising Neo4j graph in a web page
- D3 axis without using d3.svg.axis() method
- Can not capture mouseover event while dragging on an svg
- d3.js force-collapsible with labels
- dc.js apply some, but not all chart selections to numberDisplay, while maintaining the interactions between charts in place
- How to add height to a d3.js globe marker, mimicking a push-pin?
- Can't get marker to display in nvd3 bullet chart when marker value is zero
- Svg getComputedTextLength function always returning zero
- D3.js scaling and use of logarithmic scale
- Dimple JS - Removing gap between the y-axis and the chart
- Working Zoom/Pan example with D3.js?
- d3.js to show a popup window with a form on click of image
- d3.js Compressing links of a component
- d3.js sorting by rollup field
- d3.js zoom behavior: changing the scale while keeping translation consistent
- DC.js stack in line chart not showing
- How can I reference this data in this JSON file?