title: How to attach a LineObj y value to a specific Y axis?
body: <p>I am using <a href="https://github.com/discomurray/ZedGraph" rel="nofollow">ZedGraph</a> and I am having a hard time drawing horizontal lines that crosses each Y axes on a <code>GraphPane</code> object.</p>
  
  <p>Drawing a horizontal line on a <code>GraphPane</code> is trivial:</p>
  
  <pre><code>var l = new LineObj(0, y, 1, y);
  l.IsClippedToChartRect = true;
  l.Location.CoordinateFrame = CoordType.XChartFractionYScale;
  pane.GraphObjList.Add(l);
  </code></pre>
  
  <p>However, things are getting more complicated when I have multiple CurveItems attached to many Y axes on the same GraphPane.</p>
  
  <p>I need to draw a horizontal line for each CurveItem, using the scale of any other Y axes than Y or Y2.</p>
  
  <pre><code>foreach(var ci in pane.CurveItems)
  {
      ...
      var l = new LineObj(0, y, 1, y);
      l.IsClippedToChartRect = true;
      l.Location.CoordinateFrame = ??? // CoordType.XChartFractionYScale is for the main Y axis !
      // How to specify a Y value for LineObj
      // and "attach" it to another Y axis than Y and Y2 ?
  }
  </code></pre>
  
  <p>Meanwhile, I could use                         </p>
  
  <pre><code>var yaxis = ci.GetYAxis(foundPane);
  var yy = getHTarget(1d - (y - yaxis.Scale.Min) / (yaxis.Scale.Max - yaxis.Scale.Min));
  ...
  l.Location.CoordinateFrame = CoordType.ChartFraction
  </code></pre>
  
  <p>but it does not really "attach" the LineObj to the Y axis scale.</p>
  
  <p>It looks like I or ZedGraph are missing some parts here.
  Something like <code>l.Location.YAxisIndex</code> used with a <code>XChartFractionYScaleIndexed</code> is lacking.</p>
  
  <p>Before trying to write my custom GraphObj, I would like to hear if someone has a solution for this.</p>