can i get any example code for this?
This sample shows a D3 chart: https://gojs.net/latest/samples/canvases.html. That sample also demonstrates using Piety for drawing charts.
However, the integration is not as easy as it could be with other chart-creating libraries, because D3 renders to SVG and GoJS renders to Canvas, so the SVG must be embedded in a Picture (image). I suggest that you try another gauge-drawing library that renders to Canvas.