ZedGraph Axis labels
I have two questions about axis labels:
- How do I make a label at the Y2-axis, that shows a highlighted label following the dynamic price (y2-value) of the last bar/candlestick? As the red label in this example:
And possibly also the same on the XAxis
, showing the time of the last bar.
- Also I wonder how to make the time axis plot only every 30 min, and also that it should be full half hours, not arbitrary 30 min spots.. As also shown in the above image.
Ze开发者_运维知识库dGraph is awesome. But takes some time to figure out the tricks and tweaks.. :)
Ad. 1. You probably need to create a custom text object. If I remember correctly:
TextObj label = new TextObj("some text", 1, y2coordinate);
label.Location.CoordinateFrame = CoordType.XChartFractionY2Scale;
label.Location.AlignH = AlignH.Left;
myPane.GraphObjList.Add(label);
to change the color and background, just edit properties of label.FontSpec
Ad. 2.
You need to set manualy the Min
, Max
and MajorStep
of the Scale
object of your axis.
精彩评论