We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Processing sketch: http://redwood.colorado.edu/scho5922/idv/beerdata/web-export/index.html
What I want to do: When the brewery logo is moused over, it should colorize the points from that respective brewery. For example, Avery Brewing (rollover is near the top of the "A") should only display the beers/points that are white. Only Avery has a rollover at this time.
What I need help with: how to assign a parent/child relationship to breweries/beers so when a brewery logo is rolled over it only colorizes those respective beers.
I know the concept of what I need to do, I just don't have the processing experience to do so. Any help with the basic code formula would be greatly appreciated.
~thanks
Answers
You can make a Brewery class, with the name of the brewery, and a list of Beer instances.
You can limit the drawing of Beers to the currently selected brewery name, this can be done with your current code.
Note: I suggest you use two loops to draw the labels: there are regularly incrementing / decrementing values, just map an index to them.
Thanks for the answer, but the solution was something I had tried earlier, but I missed a set of parentheses. In the class in void testRollover, I just needed to declare a double-if statement; testing for both brewery and mouse location.
I am however still having problems with an aspect of this project you may be able to help with. On Avery and Boulder Beer there is some text overlap- any idea how I could fix that, short of inputting individual points?