I have a question here, when I read an excerpt from the novel "The Crossing" written by Winston Churchill. I can not understand the following sentence
They occurred only when a passing traveler who hit his fancy chanced that way, or, what was almost as rare, a neighbor.
I have looked up the meaning of the word "chance (v.)", and I found 2 meanings of this word which are "risk" and "not planned" respectively. In this sentence I think the later meaning will be more appropriate. But they often use "to chance to do something = to do sth by chance". I've never seen anything like "to chance that way" before. I could not translate it. What does it mean?