D3 has operations for class name manipulation that you’re used to from jQuery. These include addClass, removeClass, hasClass, and toggleClass. They just go by different names.
If you want to make a gauge chart in S3, you’ll need a needle on your gauge. It’s not hard to draw a triangle, but here’s the extra work to rotate it.