ZedGraph 轴标签

发布于 2024-09-25 00:44:04 字数 456 浏览 0 评论 0 原文

我有两个关于轴标签的问题:

  1. 如何在 Y2 轴上制作标签,以显示最后一个柱/烛台的动态价格(y2 值)后面的突出显示标签?如此示例中的红色标签:

在此处输入图像描述

并且可能在 XAxis 上也相同,显示最后一个柱的时间。

  1. 另外我想知道如何制作每 30 分钟一次的时间轴图,而且它应该是完整的半小时,而不是任意的 30 分钟点..也如上图所示。

ZedGraph 太棒了。但需要一些时间来弄清楚技巧和调整..:)

I have two questions about axis labels:

  1. 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:

enter image description here

And possibly also the same on the XAxis, showing the time of the last bar.

  1. 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.

ZedGraph is awesome. But takes some time to figure out the tricks and tweaks.. :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

彩虹直至黑白 2024-10-02 00:44:04

广告。 1.
您可能需要创建一个自定义文本对象。如果我没记错的话:

TextObj label = new TextObj("some text", 1, y2coordinate);              
label.Location.CoordinateFrame = CoordType.XChartFractionY2Scale;
label.Location.AlignH = AlignH.Left;
myPane.GraphObjList.Add(label);

要更改颜色和背景,只需编辑 label.FontSpec

Ad 的属性即可。 2.
您需要手动设置Min、MaxMajorStep /html/T_ZedGraph_Scale.htm" rel="noreferrer">缩放 轴对象。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文