在WPF中增加图表组件中曲线的命中选择区域 [英] Increasing the Hit Selection area of a Curve in Chart Component in WPF

查看:101
本文介绍了在WPF中增加图表组件中曲线的命中选择区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是WPF的新手,正在研究Chart Custom控件,
我想允许用户轻松单击图表中的任何曲线以添加所需的信息.
但是问题是,单击曲线非常困难.
有什么方法可以增加图表上曲线"的选择区域?

在此先感谢...

Hi All,

I am fairly new to WPF and working on Chart Custom control,
I wanted to allow user to click easily on any curve in the Chart to append desired information.
But the problem is, Clicking on the curve is very difficult.
Is there any way by which we can increase the selection area of the Curve on the chart?

Thanks in advance...

推荐答案

我了解这个问题.我想到的第一件事是用透明曲线或其他Shape填充目标曲线,这些曲线或形状除了透明度和厚度外,都是相同的曲线或形状.可以使用属性Shape.StrokeThickness http://msdn.microsoft.com/en-us/library/system.windows.shapes.shape.strokethickness.aspx [
I understand the problem. First thing which comes to my mind is padding your target curve with the transparent curve or other Shape which identical curve or shape, except transparency and thickness. This pad shape should be made much thicker by using the property Shape.StrokeThickness, http://msdn.microsoft.com/en-us/library/system.windows.shapes.shape.strokethickness.aspx[^].

If you do so, you can handle the hit test on the padded curve and do the same action as the hit was done on your target curve.

This is just a suggestion. I did not face with this problem yet, just thought about it. So, I''m not sure if this is the best or the only technique.

—SA


这篇关于在WPF中增加图表组件中曲线的命中选择区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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