Citi Bike has sparked lawsuits and struggled with glitches — but ridership has steadily surged along the way.

New Yorkers took 3.2 million trips during the first 100 days of the program and traveled an average of almost 30,000 miles daily, according to new data revealed about the program. During that time period, riders pedaled almost 6.9 million miles — the equivalent of 29 trips to the moon or 275 trips around the world.

Union Square is the most popular area for Citi Bike, with three of the city’s busiest docking stations, including one on 17th Street and Broadway.

“We have nearly double the activity of Manhattan’s average,” said Scott Hobbs of the Union Square Partnership. “It’s a reflection that Union Square is a transportation hub.”

The nearby Flatiron District is the second-most popular, followed by Battery Park City, Soho, the West Village and Chelsea. All top 10 most-popular neighborhoods are in Manhattan.

The data were showcased in a set of graphics created by Foursquare designer Zack Davenport and Etch co-founder Michael Yap, who calculated the most popular neighborhoods for Citi Bike based on the number of rides starting and ending at each docking station.

New Yorkers so far have outpedaled their British counterparts, taking almost 5,000 more daily trips than bike-share users in London — even though they have more stations and bikes across The Pond.

Weekly and daily passes are more popular than annual-membership options.

So far, $47.5 million has been invested in the program by Citibank and MasterCard — including $13.7 million on docks and $13.5 million on kiosks. It has earned about $8.5 million in revenue as of Sept. 15.

Although the program has been successful in attracting riders, it has been the subject of recent lawsuits. The Plaza hotel recently filed suit, saying the long bike rack outside its building is an eyesore.

Several New Yorkers have also sued the city after tripping over docking stations.

And A Manhattan man recently hit one Citi Bike rider with a $1 million lawsuit after he was struck by the cyclist.