Habeck (Minister for Economic Affairs and Climate Action) went on live TV a week or two ago and called German nuclear power plants a "high risk technology" that "needs to be shut down as planned". There has never been a nuclear accident in a German NPP and they've consistently achieved a 90 % capacity factor.
Now, NPPs are of course pretty expensive, and purely from a $/kWh perspective it's pretty difficult for the large-scale-engineering kind of power plant (this extends to any kind of thermal plant) to compete with the cheaper renewables. But $/kWh is not everything - NPPs are plannable and commandable capacity (unless you're the French), renewables aren't, so their kilowatt-hours are not actually directly comparable.
Naturally natural gas especially in Germany is not primarily used for electricity generation, but largely for process heat, residential heating and as a chemical. A lot of that could be replaced by using electricity, but that'd be quite expensive, too. However, even though natgas isn't used primarily for electricity, due to merit order / economic dispatch the gas price has a hugely outsized impact on electricity prices. This, among with very high taxes and dues on electricity, is what causes world-record prices in Germany.
With 17 reactors Germany still consumed a lot of gas. Even if electricity were 100% nuclear, Germany would still consume a lot of gas. Only a small percentage of the gas Germany uses is burned for electricity. Most goes towards heating homes and industrial processes.
We're talking about whether keeping the nuclear plants on would have made Germany independent of Russian gas. If we had heat pumps everywhere we might as well use renewable energy, that's cheaper than nuclear.
For power generation, lignite and coal stayed about the same, gas increased from 20 to 30, oil stayed about the same. The only thing that went significantly down was nuclear going from 22.4 to 8.1.
It all depends on where your priorities are, and obviously getting rid of nuclear was more important than burning Russian stuff into the atmosphere.
Your chart shows installed capacity, which is different from total power output. For gas plants in particular, since they are used as peaker plants with low capacity factors. In 2021 only 12% of the natural gas consumed in Germany was turned into electricity. In 2011 it was 14%.