Background image opacity changes

Hi , Here i want to change opacity of the background image of the grid by changing external input event such as range slider(html input). Can u suggest me how to do it.

To have a background image in a diagram that scales and scrolls along with the rest of the diagram, you need to add a Part holding a Picture. See for example this code from the Kitten Monitor sample,

      // the background image, a floor plan
        $(go.Part,  // this Part is not bound to any model data
            width: 840, height: 570,
            layerName: "Background", position: new go.Point(0, 0),
            selectable: false, pickable: false
          $(go.Picture, "")

If you keep a reference to that Part in a variable, you can then set its opacity to a value between 0.0 and 1.0 in your slider’s “change” and “input” event handlers.