Add Scatterplot Chart
Is there a way to generate a scatter chart (Don't connect line points)? The bubble chart seems to render quite large bubbles with titles in them, and there doesn't seem to be a way to disconnect the points in a line chart. Alternatively there should be a way to skip null points in a line chart so that it doesn't keep connecting to 0 for missing data.
For new you can simulate scatterplot using a bubble chart with radius set to a fixed number (e.g. 3), and we are planning to add scatterplot soon in this library.
The bubbles even with a tiny number for the radius look very big. Can the line graph "skip" null values? Thank you for this library in any case, it is very neat.
Scatterplot should be quite easy to implement, and since quite a few user had asked for it, I have scheduled for v1.6. I currently have limited bandwidth however will put scatterplot on top of the list.
@NickQiZhu Are you going to take a pass at this? Or should I add it to my list to do over the next week or two?
Yeah, I can take this.
I have the same issue with bubble radius. Even if pass in a very small number, it seems the smallest r I got is still around 10. I can use renderlet and call d3 directly to re-render the nodes to a smaller r, but there's always a transition which means they always started very big whenever crossfilter is called.
Yeah, I see this too. As in the recent color refactoring, there is some custom code in the bubble chart for calculating the radius which is doing something which IMO a d3 scale would do better.
I was going to suggest a patch but then waited to see what happened with scatterplot. I guess the point of that component is to start clean with a new chart without a lot of these special cases.
it seems right now the min radius is fixed to 10.
It's fairly easy to change the source code to an expected value.
On Mon, Oct 14, 2013 at 6:43 PM, Gordon Woodhull [email protected]:
Yeah, I see this too. As in the recent color refactoring, there is some custom code in the bubble chart for calculating the radius which is doing something which IMO a d3 scale would do better.
I was going to suggest a patch but then waited to see what happened with scatterplot. I guess the point of that component is to start clean with a new chart without a lot of these special cases.
— Reply to this email directly or view it on GitHubhttps://github.com/NickQiZhu/dc.js/issues/252#issuecomment-26303664 .
First cut of the scatterplot is now available on master. Some future improvement I have in mind:
- multi-series plotting (color coded)
- poly brushing
Working on poly brushing similar to: http://bl.ocks.org/mbostock/4343214 Also working on making this colorable so that it can be used in CompositeCharts.
@NickQiZhu can you list what your remaining plans are - and any approach you would like to see taken, in case someone else wants to jump in?
I think the current state is relatively complete for a simple single-series plotting. However in my initial cut I decided to hide all data points with 0 value, now thinking of it might not be a good decision. Also transition is by default disabled for scatterplot since it is typically used to plot large number of data points for clustering or classification; not entirely sure if it is a sane default (a bit inconsistent with other charts).
Finally I think scatterplot should be able to support multi-series plotting (perhaps extends series chart?) for example red vs. blue data points. Also what @sclevine is doing is a another perfect use case for scatterplot; being able to filter on two different dimensions perhaps.
A few weeks ago I was able to plug in scatterplot as-is with the series chart; the only change I had to make was to use the color function. (0 isn't even a valid key for series chart.)
But then I wasn't sure about the relative merits of series and just setting colors based on data... series doesn't do as much for scatterplots as for line charts, because the dots aren't connected. I guess both approaches have their uses.
@gordonwoodhull I don't think the color hack even is needed anymore with the changes I made in #403
:D
On Thu, Nov 21, 2013 at 11:18 AM, Jacob Rideout [email protected]:
Closed #252 https://github.com/NickQiZhu/dc.js/issues/252.
— Reply to this email directly or view it on GitHubhttps://github.com/NickQiZhu/dc.js/issues/252 .
@jrideout We're still working on polybrushing and multi-series plotting. We should have a pull request ready today or tomorrow. We only need to get composite chart brushing with subchart scatterplots to filter correctly.
-@sclevine and @chopstickninja
@chopstickninja Cool - please reference #170 from your PR for that feature
Will do. This is what we have so far: https://github.com/pivotalforks/dc.js/commits/scatterplot-improvements
I have been waiting for the update with scatter graph. and I think people who are using this amazing library also really want it.
When will be the update of scatter graph available? or Can I use it even it is a beta version?