Problem/Motivation

This is a support request, but I think could be useful for others as this should be a common example.

I'm trying to build a chart similar to this with the CHARTS module...

Desired Chart

For this example, here is the build

One content type called "Cars". The Car node can be categorized by fields for both the "Brand name" and "Model type" (both fields are taxonomy terms reference fields).

I want to display a column chart showing the number of nodes (inventory, y-axis) for each "Model Type" grouped under the "Brand Name" on the x axis.

Tried aggregating in views, and read a ton of other posts... but no success.

What am I missing. Or is this functionality not possible???

Thanks!

Comments

ChuckSimply created an issue. See original summary.

andileco’s picture

Hey, thanks for your question. One way to do this is create a parent view display and add two "Chart attachment" displays to your view. Each display would be filtered for one of "Sedan", "Coup", or "SUV". You'd want to have the parent display filtered for a model type that you'd expect to be present across all brands due to the way Views works. Does this help?

chucksimply’s picture

Thank you for the quick reply @andeileco.

So my issue is the "Model Type" needs to be populated dynamically. I have let's say 50 different model types. BMW may have 3 of them, Mercedes may have 4 different types, and Audi... 5 that are totally different from the others.

I appreciate your suggestion, but I need more of a dynamic way to populate this part of the chart.

Any further ideas?

Thanks again!

andileco’s picture

Category: Support request » Feature request

Thanks for reporting this... changing to a feature request and will be working on it soon.

chucksimply’s picture

Awesome! I look forward to this feature!

andileco’s picture

Version: 8.x-3.2 » 5.0.x-dev

Have a patch for the 5.0.x branch, want to incorporate that first and then backport for 8.x-3.x if possible.

andileco’s picture

Status: Active » Needs review
StatusFileSize
new14.03 KB

Testing the patch.

  • andileco committed fd3a928 on 5.0.x authored by nikathone
    Issue #3207514 by andileco, ChuckSimply, nikathone: How to create an...

andileco’s picture

Version: 5.0.x-dev » 8.x-3.x-dev
Status: Needs review » Needs work
andileco’s picture

Status: Needs work » Fixed

I thought more about this...the solution is really to upgrade to 5.0.x (it doesn't make sense to apply this because in 8.x-3.x, we abuse the grouping option to represent stacking - 5.0.x fixes this). You'll get many more benefits by doing so too.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.