Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] What is the current grouped bar chart in the develop dc.js that's in verson 3.0.11? I see two versons in two other branches but was there one pulled into the develop branch? #1519

Closed
kgp99 opened this issue Mar 8, 2019 · 8 comments

Comments

@kgp99
Copy link

kgp99 commented Mar 8, 2019

I'm trying to create a grouped bar chart that will group by keys in multi key dimension if possible then show x labels based on the keys so for a 3 key dimension there will be 3 x-labels , one is the last dimension key, second is label when grouped by the second dimension key and finally the 3rd by the first dimension key. Possible having brackets for each other after the first label that is by each child/element.

Is this possible in dc right now without making it yourself by using d3.js?

I'm hoping it'd be something similar in a sense to colorAccessor that colors by key like this:

.colorAccessor(function (dim, colors) {
return [dim.key[2], colors.key];
})

I do see some issues here that are older and either are in a different branch or only show it in a group with one x label.

@kgp99 kgp99 changed the title [Question] What is the current grouped bar chart in the delvop dc.js that's in verson 3.0.11? I see two versons in two other branches but was there one pulled into the devlop branch? [Question] What is the current grouped bar chart in the delvop dc.js that's in verson 3.0.11? I see two versons in two other branches but was there one pulled into the develop branch? Mar 8, 2019
@kgp99 kgp99 changed the title [Question] What is the current grouped bar chart in the delvop dc.js that's in verson 3.0.11? I see two versons in two other branches but was there one pulled into the develop branch? [Question] What is the current grouped bar chart in the develop dc.js that's in verson 3.0.11? I see two versons in two other branches but was there one pulled into the develop branch? Mar 11, 2019
@kgp99 kgp99 closed this as completed Mar 11, 2019
@gordonwoodhull
Copy link
Contributor

Sorry, I didn't entirely understand this question, so I didn't respond. I think you are looking for functionality that I haven't found a way to merge, specifically #1459.

It is available in a branch of this project and that ticket gives details how to install the branch from NPM.

It is a significant project to figure out how to merge this in a maintainable way, so I can't quite just "push the button" on this one.

@gordonwoodhull
Copy link
Contributor

gordonwoodhull commented Mar 11, 2019

As for modifying the axis accordingly, I don't think d3-axis supports hierarchical ticks. You'd probably have to hack that part yourself, unfortunately.

@kgp99
Copy link
Author

kgp99 commented Mar 11, 2019

Oh, my bad. Something like that but with it being grouped twice, I did find that but didn't want to use that version if it wasn't ready to be a part of the develop version. I saw #558 and it seemed the first scenario would work well with using cross filter keys to group it by something then use it again to group it by another thing if it could do that.

For the axis, there is this solution for nvd3.js using only d3, https://stackoverflow.com/questions/39608492/nvd3-dual-x-axis-in-stackedgroupedchart, but was hoping I could call a new x-axis inside of my dc chart so it could be linked to the chart internally and not me having to link it myself so it could line up with ease and pass a cross filter dimension key that the chart already has to the second or further x-axis.

Thanks for responding.

@kgp99
Copy link
Author

kgp99 commented Mar 11, 2019

Is it best to comment here or on Stack overflow? I only put it there as I realized all questions for dc was to be put on Stack overflow.

@gordonwoodhull
Copy link
Contributor

If it's a feature request, then it belongs here, but if it's a question about how to do something with the existing library without changing it, then it belongs on SO.

Of course it's somewhat ambiguous if you don't know whether it can be done with the existing library, so in that case it's okay to ask either place. Either way is fine with me... I keep up with both as much as I can, so there is no need to cross-post.

@gordonwoodhull
Copy link
Contributor

Yes, there have been a number of attempts to get this into the library but no one has come up with a great design yet. I think the fundamental issue is that groups, stacks, and composites are all different ways to further slice/rollup the data. Grouping probably needs its own API rather than been stuffed into another feature.

That said, I think #1459 is probably the best implementation we have right now.

I wasn't aware of that technique for adding extra axes. That's pretty interesting, however dc.js currently doesn't support it, so you'd definitely have to hack it one way or another. One thought is to use the "axis chart" developed by @ialarmedalien, which separates out just the axis functionality. I don't know if it would work for this use case.

@kgp99
Copy link
Author

kgp99 commented Mar 11, 2019

I guess the grouping part was the ambiguous one as it's being done but it's not done yet completely and the x axis is also ambiguous but I'd like to request for it to be done if possible.

I've seen a bit of each of the open grouped or stacked bar charts but not the source code only the examples that I believe have only a few differences using the same few functions. Just wondering why wasn't #558 working or forked as it seemed to put a grouped possibly stacked version of a bar graph in a different space all together so it wouldn't affect a standard bar graph, seemed like a perfect testing ground in my opinion.

Thanks for the info, I thick I'd rather not use that version and wait until something finds it's way into the develop version.

@gordonwoodhull
Copy link
Contributor

Hey, if #558 works for you, then go for it. 😉

The author submitted #679 with his version of the feature, but unfortunately the PR also includes a lot of unrelated changes, so I was unable to merge it.

The sad truth about maintaining an open source project is that most contributions need large amounts of work to merge them. When I receive PRs that are ready to go, cleanly implemented, and with tests, I can merge them pretty quickly. But they usually only cover a few cases, break something else, or have irrelevant changes included.

I don't have a lot of time to do development for other people, as this is just a volunteer project for me.

I hope to take a look at cleaning up #1459, but I can't promise any particular ETA. There are some good ideas in #558 that might help.

Contributions welcome. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants