B4Print.com

Applications => Adobe InDesign => Topic started by: Diddler on January 03, 2019, 02:01:47 AM

Title: GrepHeatStyle
Post by: Diddler on January 03, 2019, 02:01:47 AM
At Wits end and wanting advice on how to fix. (easily please).

So I've just spent the last 5+ months working on a massive project. I mean massive as this is a Heatmap designed to show us visually where things happen in our State. I have drawn the map in Illy and imported and linked to Layers and Variable Data so i can view by Name/Postcode (zip)/ distribution areas yada yada yada. see attachments.

All was going great until they now I've been informed the client wants a recap of the last few months which pushes the numbers past my range of 1% to 100% of a colour. You will see by looking at the numbers represented in the Heatmap (Let's call them beers consumed for that area) that it works perfectly except for once it goes above 100. If above 100 it only displays the first two digits for the colour %. (circled in yellow). The GrepHeatStyle script will only allow for 100 (I believe).

Looking for advice on how to display the numbers above 100 in total to be a different colour or background pattern?
I know I could change them manually but there are 420+ area variables so far and I nowhere near finished.

Any advice from you scripting pros will be greatly appreciated.

Cheers  :drunk3:





 
Title: Re: GrepHeatStyle
Post by: Joe on January 03, 2019, 09:26:33 AM
Yeah I think it can only do 100, ie...1% to 100%. Can your values display in a percentage instead of number of beers. For example if the max number of beers is 200 than one beer would be .5 (%), 2 beers would display as 1 (%) and 200 beers would display as 100 (%). Probably not a good solution but it is all I've got.
Title: Re: GrepHeatStyle
Post by: Tracy on January 03, 2019, 09:54:56 AM
wow! wish I knew how to help, that looks fascinating.
I think DCurry knows about GREPS
You can't get those to a random color obviously to select similar and recolor
Title: Re: GrepHeatStyle
Post by: DCurry on January 03, 2019, 10:34:38 AM
Thanks for the props, Tracy, but I really know very little about GREPs. I've used them a couple times to format some price tags.

The only idea I can think of to do this is instead of using the numbers to create a screened percentage, could you instead create individual color swatches and name the swatch the number? For instance, you would have a color called 1, another called 2, etc. For the swatches 1-100 you would make it its corresponding screen percentage, then when it goes over 100 you'd have to figure out a different color and make it whatever you want.

Of course, with 420 swatches that would mean lot of work, but I think you might be in for a lot of work no matter how you slice it.

Also, I have no clue how you'd implement my idea, but you've gotten pretty far with the way you have it now so I suspect you can get there if you like the idea.
Title: Re: GrepHeatStyle
Post by: Slappy on January 03, 2019, 09:31:43 PM
Might want to float it by the IndesignSecrets folks, there's a few GREP Wizards over there. I think that part of their Forum is open to non-subscribers too.

Wish I'd learned that aspect of InDy, just never seems to be enough time or brain power left in a day.
Title: Re: GrepHeatStyle
Post by: swampymarsh on January 06, 2019, 06:59:28 AM
I know some regex/grep – however this sounds more like an Illustrator script?

Hard to comment without knowing more of the technical details.
Title: Re: GrepHeatStyle
Post by: Diddler on January 07, 2019, 12:41:28 AM
Cheers for the input guys n gals. I eventually just went back and modified the GREP script (100 times) so it now sees the colours in groups of 2%.

I will eventually re-modify the script later this week so I have ranges of 5%. So in theory I can go to 500.


Time for a  :drunk3:
Title: Re: GrepHeatStyle
Post by: Tracy on January 07, 2019, 11:24:30 AM
Good job Diddler!
Title: Re: GrepHeatStyle
Post by: Kermy812 on January 22, 2019, 01:03:08 PM
Just a thought, could you just constrain you data in another column to be proportional to a range on 1 to 100? I had to do something similar once and someone else had similar problem mrexel.com.
https://www.mrexcel.com/forum/excel-questions/748864-convert-series-numbers-1-5-scale-relative-highest-lowest-2.html

I think this would be for a range of 1 to 100:
=IF(A1="","",CEILING((A1-MIN(A:A)+1)/((MAX(A:A)-MIN(A:A)+2)/100),1))
it would look at column "A" for the largest value to set as 100, then set all values proportional to it.