如何指定乘法X / Y游标 [英] How to specify multiply X / Y cursors

查看:73
本文介绍了如何指定乘法X / Y游标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,让我先说:我知道MSChart似乎只支持一个CursorX和一个CursorY。


我的客户有一个要求,但是,我们需要能够指定微分游标,即:CursorX A和B并标记A和B之间的差异。


这是否可行?也许我们可以在透明色的另一个系列中重叠相同的系列并使用它的光标?


那或者找到另一个制图组件的供应商确实支持我们想要完成的事情。


总而言之,我们为MSChart支付的费用并不差;这是免费的。


谢谢。

解决方案

Hi MWPowell


我刚刚转换为使用National Instrument组件的MS图表,我的所有工作都依赖于多个游标来定义数据分析的范围。


我的解决方案利用了注释,可以像光标一样抓住并移动。见下文


然后我使用AnnotationPositionChanging事件更新光标位置

     私有   Sub   newVerticalCursor()
         Dim   V3  As  的  DataVisualization.Charting的 LineAnnotation ()
         的  V3
              .AxisX  =  chart1.ChartAreas(" Default" )。AxisX
              .AxisY  =  chart1.ChartAreas(的"默认&现状t; )。AxisY
             .IsInfinitive  =  正确
             .IsSizeAlwaysRelative  =  正确
             .ClipToChartArea  =  "默认"

             .AllowMoving  =  True
             .Name  =  " V3"
             .ToolTip  = 的" V3"
             .X  =  3
             .Width  =  0
              .LineWidth  =  1
             .LineDashStyle  = 的 ChartDashStyle .Solid
           &NBSP ;. LineColor  = 的颜色。蓝色
           &NBSP ; .Visible  =  True
         结束  使用

         chart1。 Annotations.Add(V3)

     End   Sub


First, let me preface by saying: I know that the MSChart seems to only support one CursorX and one CursorY.

My client has a requirement, however, that we need to be able to specify Differential Cursors, that is: a CursorX A and B and label a differential between A and B.

Is this doable? Maybe we could overlap the same series in another series with a transparent color and use its cursors?

That or find another vendor who's charting components does support what we want to accomplish.

All in all, not bad for what we pay for MSChart; which is free.

Thank you.

解决方案

Hi MWPowell

I've just converted to using MS chart from National Instrument components and all my work relies on multiple cursors to define ranges for the data analysis.

My solution makes use of annotaiton, which can be grabbed and moved arround just like a cursor. See below

I then use the AnnotationPositionChanging event to update the cursor locations

    Private Sub newVerticalCursor()
        Dim V3 As New DataVisualization.Charting.LineAnnotation()
        With V3
            .AxisX = chart1.ChartAreas("Default").AxisX
            .AxisY = chart1.ChartAreas("Default").AxisY
            .IsInfinitive = True
            .IsSizeAlwaysRelative = True
            .ClipToChartArea = "Default"
 
            .AllowMoving = True
            .Name = "V3"
            .ToolTip = "V3"
            .X = 3
            .Width = 0
            .LineWidth = 1
            .LineDashStyle = ChartDashStyle.Solid
            .LineColor = Color.Blue
            .Visible = True
        End With
 
        chart1.Annotations.Add(V3)
 
    End Sub


这篇关于如何指定乘法X / Y游标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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