dc-js / dc.js

Multi-Dimensional charting built to work natively with crossfilter rendered with d3.js
Apache License 2.0
7.41k stars 1.81k forks source link

Add Tagcloud to core dc.js library #1253

Open ghost opened 7 years ago

ghost commented 7 years ago

Add Tagcloud to core dc.js library http://dc-js.github.io/dc.js/docs/html/

References: http://gliesians.com/tag-demo2.faces http://www.primefaces.org/showcase/ui/data/tagCloud.xhtml http://robertjliguori.blogspot.com/2016/09/how-to-create-tagcloud-with-primefaces.html

gordonwoodhull commented 7 years ago

I've seen some dc.js-compatible word clouds out there, for example these:

https://github.com/adixsyukri/dc-wordcloud https://github.com/EliezerIsrael/dc-wordcloud

I'm not hugely inclined to bring in every chart to the core library, especially if it already exists elsewhere. There are license issues with some (GPL). Also writing tests is no small chore.

Ideally dc.js should be more of a framework and going forward I hope to implement a more modular structure like that of d3v4.

ghost commented 7 years ago

I understand, thanks for the consideration... just FYI though, I have links to most of the d3 charting libraries here that you can use for references in adding features and refinements to your existing charts: http://robertjliguori.blogspot.com/2016/11/data-driven-documents-d3-javascript.html. DC.JS is great, thank you for building and maintaining this API. :)

gordonwoodhull commented 7 years ago

That's a great resource, thanks! Yes there certainly are a lot of d3 charting libraries and there does not seem to be consolidation on one standard library happening.

I think this is because it is easy to get started on a charting library but once you try to add all the features it gets very complicated very fast. You end up needing to implement a "grammar of graphics" and I don't think any JS library does that. Certainly this library does not either.

What dc.js does offer is a data model, i.e. the integration with crossfilter and the automatic filtering and transitions. Also it does not require you to transform your data to any particular format; an array of anything will do, as long as you can write accessors to fetch data for each visual encoding.

tttp commented 7 years ago

fyi, we did use this code https://github.com/tttp/doi/blob/master/js/dc.js#L8738 on a project for Transparency International:

http://www.integritywatch.eu/

gordonwoodhull commented 7 years ago

Thanks @tttp, looks like that is https://github.com/EliezerIsrael/dc-wordcloud, right?