I'm a bit new to D3, so I apologize if this is trivial.
I want to create a histogram that allows a user to brush over parts of a histogram and display all of the selected data points in a table separate of the histogram. Basically, I want to create (http://square.github.com/crossfilter/) in D3 using a "brush". All of the examples that I've seen have bar charts instead of histograms. I couldn't get anything to work by creating the brush in a histogram visualization. Is this possible or should I just re-tool a bar graph into a pseudo-histogram?
Thank you!
Related
I have a set of polygons where the position of their vertices (corners) are defined as latitude/longitude values.
I want to use D3 to draw these. I don't want anything fancy (like a background containing the world map, etc). The only thing I want to do is to draw the polygons.
I have looked up on Google for a solution, but what I find is things like http://datamaps.github.io or https://github.com/mbostock/d3/wiki/Geo-Paths and they all show a background of the world map or the like which is what I don't want to do.
Suggestions are welcome.
In your particular case, using the geo functionality of D3 seems like overkill -- all you need to do is use the D3 scales to convert the coordinates to screen coordinates, i.e.
var scale = d3.scale.linear().domain([minCoord, maxCoord]).range([minScreen, maxScreen]);
Demo (based on provided fiddle) here.
I am using Dimple.js to plot several data series and I need to add a candlestick or hi/lo series on to my existing chart. After some analysis, I have found two possible approaches to do this:
1) Use the floating bar option in Dimple.js. Since the "widths" (heights on the chart, but widths for the floating bar) would be all different, I would need a different data series for each candlestick. This feels like a hack, but the one advantage is that this would be using Dimple to do all the rendering. I would probably not go this route unless some had a thought on how to make this less of a hack.
2) Drop down to D3 to draw lines between the points. I can use Dimple.js to graph both the top and bottom elements of the candlestick, then use D3 to draw the line between the points. I would do a selectAll() on one of the series, and then draw a path to the related point in the other series.
If there are other suggestions on an approach, please let me know. Thanks!
You can use this example to build candlestick charts using d3.js
I'm new to JavaFX and implemented a scatter chart with various data series. That works well so far, but I want to highlight the data in a specific area as these are ok and all outside the area are bad. so my plan is to draw two lines in the chart, for example one at y=80 and one at y=120. is there a comfortable way to accomplish this? I wanted to avoid drawing the lines with a LineBuilder or so.
In Qlikview 11 I managed to set up (amongst others) a nice scatter chart without any major problems. Now I would like to be able to zoom into a region in that chart. Intuitively this could be accomplished by selecting a rectangular region with the mouse. Incidentally this works fine in "regular" line or bar charts. The new x and y axis regions correspond to the selected rectangle. However this does not happen with my scatter chart. I suspect this has something to do with the way dimensions are handled in scatter charts. For easier understanding I appended to screen-shots of the status quo - or how I don't want it to be.
Full chart with selected region http://img801.imageshack.us/img801/4873/6ccc.png
Chart displaying only the selected data http://imageshack.us/a/img138/9053/kck5.png
From what it looks like, I would guess that the scatter plot has hard coded axis max and mins. Check the "Axes" tab under chart properties, and uncheck the scale boxes. That should allow the chart to zoom in.
How to create Half pie arc in d3
I'm following an example with full pie chart. How do I create Half pie chart?
code so far
http://tributary.io/inlet/5260888
Solution: http://tributary.io/inlet/5273835
d3's pie layout has functions to set the startAngle and engAngle properties which can create partial pie charts.
I had a similar requirement, however the missing part isn't half, but a changing fraction of the whole. in order to achieve this, I just set the "stroke" and "fill" for the missing segment to "none".