Forum Discussion
DataViewMapping in capabilities, specifying 3 different categorical mappings
Hey Deldversveld,
Do you know for certain that you can only map once? Can you further iterate on that. Or are you saying that per data role you can only allocate to one datamapping?
If you take a look at the combo chart in the visualisation playground it has multiple dataviewmappings assosciated to it.
dataViewMappings: [
{
conditions: [
{ 'Category': { max: 1 }, 'Series': { max: 0 } },
{ 'Category': { max: 1 }, 'Series': { min: 1, max: 1 }, 'Y': { max: 1 } },
],
categorical: {
categories: {
for: { in: 'Category' },
dataReductionAlgorithm: { top: {} }
},
values: {
group: {
by: 'Series',
select: [
{ for: { in: 'Y' } }
],
dataReductionAlgorithm: { top: {} }
}
},
rowCount: { preferred: { min: 2 }, supported: { min: 0 } }
}
}, {
conditions: [
{ 'Category': { max: 1 }, 'Series': { max: 0 }, 'Y2': { min: 1 } },
{ 'Category': { max: 1 }, 'Series': { min: 1, max: 1 }, 'Y': { max: 1 }, 'Y2': { min: 1 } },
],
categorical: {
categories: {
for: { in: 'Category' },
dataReductionAlgorithm: { top: {} }
},
values: {
select: [
{ for: { in: 'Y2' } }
],
dataReductionAlgorithm: { top: {} }
},
rowCount: { preferred: { min: 2 }, supported: { min: 0 } }
},
}
],
thoughts?
I was thinking a long your lines until i saw the combo chart. I have my base visualisation working with the single data view mapping.
This is really to activate category colouring but with two groupings and a single measure. As opposed to a combo chart which is one grouping i.e. axis and two measures.
You're right! I had not looked at the capabilities for combo chart. No suggestions on a solution, but I'll try to look into it later tonight.
- allaboutdata10 years agoAdvocate II
yeah cool okay, keen to see if you can find the way to do it.
Knocking my head over it, you should be able to do it if the combo chart works that way.
- jcbowyer10 years agoFrequent Visitor
Were you able to find a solution to this? I am having the same struggle.