What would help most if if you had a sketch of what you want to produce, as there are some methods that may or may not work depending on the outcome you want. For example, if you wanted to have a linear scale against the bar, then having these both as independent components is going to cause you misalignment grief at slightly differing resolutions.
This is what I typically use for analogue bars. It's a single SVG that contains the bar and the linear scale, as well as other things like static marker indicators (e.g. for showing alarm limits)