float GetDbValue (nfloat location) { var step = graphLayer.Frame.Height / (defaultGain * 2); return (float)(-(((location - bottomMargin) / step) - defaultGain)); }