Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Gordon Woodhull
    @gordonwoodhull
    It won’t be hard to copy it into a fork later. IMO you should get it working and gauge interest from the community, then do a PR.
    Gliesian LLC
    @gliesian-llc
    okay thanks.
    this is what it looks like now...
    alt
    Gordon Woodhull
    @gordonwoodhull
    Nice! And you’re working on the interactive parts now?
    Gliesian LLC
    @gliesian-llc
    i am...
    i'm lost though... i would at first simply like to pass the colors.... but in a dc.js like fashion.
            .colorAccessor(function (d) { return d.value; })
            .colors(['#000001', '#000002', '#000003', '#000004'])
    like that...
    this is how i instantiate the object now...
    var myCompassRoseChart = compassRoseChart();
    d3.select("#compass_rose_chart")
    .datum(data)
    .call(myCompassRoseChart)
    Gordon Woodhull
    @gordonwoodhull
    Yes, it looks like you’ve picked up a different reusable chart pattern from the one that dc.js uses.
    Gliesian LLC
    @gliesian-llc
    :(
    Gordon Woodhull
    @gordonwoodhull
    That one is pretty good too, I think it’s the one recommended by Mike Bostock.
    Gliesian LLC
    @gliesian-llc
    :)
    put i need it in sync with dc.
    but i need it in sync with dc.
    i guess i need to refactor it.
    i guess i need to refactor it? Can you point me to the DC pattern I need to use
    Gordon Woodhull
    @gordonwoodhull
    Arye Shalev
    @pantchox
    @gordonwoodhull thanks a bunch for your reply! the graph component looks awesome :) my question was more in a general way, if you work with graphs you might know what i need and mean.
    basically i want to graph out twitter hourly top hashtags graph, so i have a set of tweets where each tweet has one or more tags, i want to make a network graph of the most popular hashtag (by its count/freq) and also see related hashtags using jaccard similarity or some say use adjacent matrix (still working on the calculation) so i want a graph like hivemindmap.com where you have nodes which are hashtags, the bigger the bigger the count and edges, so each node that has an edge it means it was together in a tweet, as well the width of the edge will be how strong the connection using the related algo i mentioned. so basically i am trying to mimic hivemindmap.com but create from scratch, it doesnt have to be with dc.js but i just don't know from where to start or you have a library you recommand for me that can be customized to do the same
    thanks!
    Gordon Woodhull
    @gordonwoodhull
    Hey @pantchox, from my perspective it sounds like getting the data together is the tricky part, deciding how to measure similarity and so on. There are any number of libraries you could use to draw it once you have the data. Cytoscape, sigma.js seem to be the big ones. But if you wanted to write it from scratch there are plenty of examples using just d3-force. Guess it depends how you want it to look & interact.
    Arye Shalev
    @pantchox
    ok thanks!
    i will update you with my results
    Gliesian LLC
    @gliesian-llc
    When testing a new chart... how does the chart get to /dc.js and /web/js/dc.js? It is manually moved or does some command automatically append the new code?
    Gordon Woodhull
    @gordonwoodhull
    Look in Gruntfile.js - this is essentially a makefile which tells how to build things. There is a command concat which takes the files from src/ and concatenates them. There is a command copy which copies files from the root and node_modules/ into web/js
    Gliesian LLC
    @gliesian-llc
    Thanks Gordon.
    got it... 'grunt copy'... wonderful.
    Gliesian LLC
    @gliesian-llc
    So 'group' is mandatory by not used for dc.dataTable?
    Gordon Woodhull
    @gordonwoodhull
    What makes you think it's not used? What's confusing is that it does something completely different. It's not a crossfilter group but a function.
    http://dc-js.github.io/dc.js/docs/html/dc.dataTable.html#group
    Gliesian LLC
    @gliesian-llc
    Maybe the documentation should be updated here: (http://dc-js.github.io/dc.js/docs/html/dc.baseMixin.html#group__anchor) to reflect what you just said?
    Gliesian LLC
    @gliesian-llc
    I need to reduce down a JSON dataset for a uniq field. Is there an easy way to do this with a crossfilter dimension?
    Gordon Woodhull
    @gordonwoodhull
    Hrrrmm. I regard the override of .group() in dc.dataTableto be an aberration, as it has a completely different meaning. But yes, I guess there could be a note in the base saying that the datatable has done something horrible and wrong with the same name.
    You can write any function you want for the dimension key. So you could even do JSON.stringify(d) if you had to. IIRC there isn't even an efficiency concern, since it only happens when the rows are inserted.
    Gliesian LLC
    @gliesian-llc
    hmmm.. I still can't do it... all I want to do it reduce the data set for unique values of one of the fields.
    Gordon Woodhull
    @gordonwoodhull
    You're just trying to fetch a field out of some JSON? Maybe try putting a debugger or console.log inside the dimension key accessor and make sure the data is the shape you are expecting / make sure that the accessor is working correctly?
    Gliesian LLC
    @gliesian-llc
    I want to change the dimension, group, etc, from a multi-listbox or similar selector... is this possible in dc.js, if so are there any examples anywhere?
    Gordon Woodhull
    @gordonwoodhull
    Yes, you should be able to set the group/dimension and then just redraw()
    Here’s an example: http://dc-js.github.io/dc.js/examples/switching-time-intervals.html
    It does a bit more than that, but anyway, yes, usually you can just set dimension and/or group and do a redraw.
    Kiran Mathew Mohan
    @privateOmega

    @gordonwoodhull Hey Gordon, Is it at all possible to use d3.ascending with datatable when a cross filter group is passed as dimension.

    An interesting feature of the data table is that you can pass a crossfilter group to the dimension, as long as you specify the order as d3.descending, since the data table will use dimension.top() to fetch the data in that case, and the method is equally supported on the crossfilter group as the crossfilter dimension.

    Gordon Woodhull
    @gordonwoodhull
    Hi @privateOmega! Sure, see the related issue for a "fake dimension" solution: dc-js/dc.js#1115
    Kiran Mathew Mohan
    @privateOmega
    @gordonwoodhull Thanks man. Will check it out.
    Attila Berényi
    @aberenyi
    @gordonwoodhull hey there - thanks for the awesome charing library. I need to produce some stacked row charts, so I looked around and found this issue: dc-js/dc.js#397. The fork mentioned in there is pretty old, so I thought I'd start it with a clean slate. Any suggestions of where to begin?
    Gordon Woodhull
    @gordonwoodhull
    Would love to have this feature - obviously it's something people ask all about all the time. I think the main difficulty in the current architecture is that the cap mixin and the stacked mixin fill the same niche - they both try to preprocess the data using the .data() hook. And both put the data in a slightly incompatible format.
    Attila Berényi
    @aberenyi
    I see. This will be fun!
    Gordon Woodhull
    @gordonwoodhull
    If you don't need capping, it might be easier to drop that part (but of course we couldn't merge such a change into the library).
    Attila Berényi
    @aberenyi
    Noted, cheers
    Gordon Woodhull
    @gordonwoodhull
    It's an interesting challenge for sure! Feel free to ask questions as you dive in.
    Attila Berényi
    @aberenyi
    :+1: