如何在TChart中绘制多边形/矩形 [英] How To Draw Polygon/Rectangle In TChart

查看:74
本文介绍了如何在TChart中绘制多边形/矩形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只需要一点推动.我有一个带有tpointseries系列的图表.我很难弄清楚如何将系列绘制为多边形/矩形.

I just need a little push. I have a chart with a series as a tpointseries. I am having difficultly in figuring out how to draw the series as a polygon/rectangle.

当我指多边形或矩形时,您有4个角(bottom_left X/Y,top_left X/Y,top_right X/Y和bottom_right XY)创建4条线并填充这4个角之间的区域.

When I mean polygon or rectangular, you have 4 corners (bottom_left X/Y, top_left X/Y, top_right X/Y and bottom_right XY) which create 4 lines and fill the area between those 4 corners.

非常感谢.

推荐答案

1)创建具有矩形样式的TChartShape类型系列,并添加具有所需坐标的形状

1) Create series of TChartShape type with rectangle style and add shape with needed coordinates

2)在OnAfterDraw事件处理程序中在图表画布上绘制矩形

2) Draw rectangle on chart canvas in OnAfterDraw event handler

这篇关于如何在TChart中绘制多边形/矩形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆