When I am to assign a chord to a stacked notes, if a beam is present,
do I include the notes connected by the beam(the red box)? or do I ignore them(blue box)?
When I am to assign a chord to a stacked notes, if a beam is present,
do I include the notes connected by the beam(the red box)? or do I ignore them(blue box)?
It depends. Sometimes the beamed notes are part of the chord, sometimes they're not (e.g., passing tones), and sometimes the "stacked" note is not a chord tone (e.g., an accented passing tone) and the beamed note is.
In the given example, the beamed notes are to be ignored. Since the Roman numerals are given, we can see that clearly those beamed notes aren't part of the prevailing harmony.
But consider the following:
If only the stacked notes are considered, the chord looks like C major. But the second beamed note is Bb, making the chord C7.
Another case occurs in an idiomatic jazz ornament: adding a blue note on the beat, then moving to the chord tone.
This is clearly a C major chord, but if only the stacked notes are considered, it looks like C minor.
Generally you can have anything, but classically you have a few common ways how these things can happen:
In your case note that the blue notes are consonant in the chord, thus clearly chord notes, while the following note isn’t. So it is easy to see that these are passing notes. Suppose you reverse the order of the 8th notes (a b c d → b a d c). Then you’d have suspensions. To determine the chords try to evaluate if a note is in fact a chord note, and ignore them if they are not.