Color Manager

I generate reports (containing Tag clouds images) from tables that contain the same column names but different row numbers and contents. e.g.

 

Table 1

Transport Type         Sum

Car                           10

Train                         5

Plane                        8

 

If I run all nodes at once to generate a tag cloud the, then the color manger runs fine on the first run.  If the next time I run the workflow I have more 'Transports Types': e.g.

 

Table 2

Transport Type         Sum

Boat                           10

Bus                             5

Bike                            8

Lorry                          10

 

The the color manger cannot run without opening the node first, I see the error "Color mapping does not match possible values",

 

but if table 2 has less transport types than table 1, the workflow runs without problems.  

 

I would like to run the workflow as a batch job (So I am never sure how many rows I will have), is there anyway of getting around this problem.  I have attached a domain calculator, but I still observe the same phenomenon.

--Stephen 

 

Hi Stephen,

on which column is the color chosen? Numerical, Categorical?

 

What my first try out would be is to build a color model on a table containing all possible values and for your true data only use the color appender which then uses the color model.

Iris

Hi Iris

This sounds like a great plan, thanks!

I Just tried it :(

 

I am using the 'nominal' value so in this example "transport Type", I have ~1000 possible different classifications.  

 

The Color Manager cannot cope with anything >60. 

Any other suggestions?

--Stephen

Okay, this makes it more complicated, but hey, we can do it ;)

Use the Math node to add a counter (hence a numerical value which represents the category) to your "all possible values" table. Just return ROWINDEX in the Math Formula node.

Then apply the color manager on your newly created counter column.

In the report generation you now have to combine the visualization table with the color table by joining on the class column.

It's a little bit complicated but should work.

Iris