score:3
Accepted answer
Here you can see how to make Bar Chart using d3.js
Now the thing thing that you are trying to achieve is called floating Bar Chart.Although there is not any ready-made Floating bar chart available in d3. But we can achieve it by doing certain change in Bar chart itself. When we are appending Rectangle in bar classes in the above example just change the height attribute to
.attr("height", function(d) { return height - y(d.higher-d.lower)
In this way it gives rectangle from the point lower to higher. Json is in this format
var jsonData=[
{"letter": "A", "higher": .08,"lower": .05},
{"letter": "B", "higher": .05,"lower": .03},
{"letter": "C", "higher": .04,"lower": .02}
]
And for learning d3.js follow this link
Source: stackoverflow.com
Related Query
- D3 how to draw chart with a x data between two y data
- How to draw multiple bars in a row in a bar chart with spaces in between with d3v5?
- how to draw a line between two axes with a data? (d3.js)
- How to draw a Bar Chart with time on xAxis and one or more numeric data for yAxis in d3js?
- How to draw a line / link between two points on a D3 map based on latitude / longitude?
- How to update d3.js bar chart with new data
- How to use linkRadial to draw a link between two points?
- How do I draw an arrow between two points in d3v4?
- How to draw area/fill between two curved lines of different lengths (different x values) in d3
- how to zoom d3.js chart and reload data with greater granularity (in AJAX)
- How to draw line charts with complex data structures in d3
- D3 How to update the chart after selection from drop down menu with new data
- How to plot data points on multi-line chart with multiple y axes
- How to add non linear curve between any two points of area chart in d3.js
- How do you get JSON data and create a line chart with d3.js?
- How can I draw links between nodes with D3.js?
- How to represent each data entry with a pie chart of its values?
- How to draw a line dynamically between two circles
- How to update data in d3 chart with an onchange slider event?
- How to integrate dc.js with d3 horizon chart for data rendering?
- d3.js How to draw line chart with vertical x axis labels
- How to add a second tooltip, with data, from a data driven d3 chart
- How to draw a multi line series graph using d3.js with json data using angular directives
- Draw Chart using Dimple JS with DSV format data
- How to redraw my d3.js chart with data from html form?
- How to draw a 3d bar chart on a world map with d3.js?
- How to draw a multi-line chart with d3 version7 graph with string in x-axis?
- D3.JS how to load 3 csv files and change data on line chart with button click event?
- How to draw timeseries chart by month,year with d3js
- how to move multiple paths to the left with a fluid animation between my data
More Query from same tag
- Text labels on crossfilter bars do not appear
- Angular ng-click's inside a dynamically created d3 chart are not working
- How to catch onDestroy in Angular2 for component that is removed
- D3.js scope issue with external data.json file and brush
- Using d3.interpolateString for a MM:SS transition
- d3.js vertical line on a time axis
- D3 scatterplot using time scale on x-axis -- not working in Firefox
- Lines on eclipse map not drawing to scale in d3.js map
- How to use 'this' in Angular with D3?
- C3/D3 pie legend format / label overlap
- How to select parent of directive with D3.select?
- Creating array from csv with d3.group without group headers
- Limiting D3 treemap Panning
- SVG disappears in firefox on transform
- d3 axis is not showing any values if there is only 1 value in the domain
- Disable a button using d3 / jquery until the action is complete
- How to rotate an object around the center in d3.js
- d3.js and dashcode: anyone tried and won?
- How to draw circles with radii given in kilometers accurately on world map
- How to select all d.data.id ends in a specified word in a d3.tree code?
- useInteractiveGuideline not working correctly in Angular nvd3
- Is it possible to extrude a shape (like a U.S. state) with D3?
- How can I create a basic bar chart with unique counts on the y axis and a category on the x axis?
- D3: Stacked Bar Chart not parsing data correctly
- Get the id attribute of this with d3
- The difference between select using merge and selectAll in D3 update mode
- d3 (v4): giving elements the appearance of momentum?
- D3 zoom - Cannot read property 'apply' of undefined
- Difficulty accessing json file with d3 and flask
- D3.js update Treemap dynamically