SilverLight-Visifire图表控件简单应用

SilverLight-Visifire图表控件简单应用,第1张

概述今天在网上看到一个强大SilverLight图表控件: 链接网址:http://visifire.com/ 我用的版本是:3.6.8 代码: 引用SLVisifire.Charts.dll        Imports Visifire.Charts        Imports Visifire.Commons                   Me.LayoutRoot.Children.C

今天在网上看到一个强大Silverlight图表控件:

链接网址:http://visifire.com/

我用的版本是:3.6.8

代码:

引用SLVisifire.Charts.dll

       imports Visifire.Charts
       imports Visifire.Commons

 

       

        Me.LayoutRoot.Children.Clear()
        Dim chart As New Chart
        chart.WIDth = 450.0
        chart.Height = 300.0
        '去除水印效果,如果没有购买产品,水印是去不掉的
        '如果想去掉水印,可以添加一个StackPanel遮罩层将水印去掉
        chart.Watermark = False
        '是否添加3D效果,默认非3D效果
        chart.VIEw3D = True
        '图表皮肤,有3种默认皮肤,theme1,theme2,theme3
        '注:未实现枚举,有待进一步改进
        chart.theme = "theme1"
        '图表颜色集合
        chart.colorSet = "VisiGreen"
        '图表的工具栏是否可用,现在默认只有一个保存为图片的功能
        chart.ToolbarEnabled = True
        chart.ScrollingEnabled = True
        chart.AnimatedUpdate = True
        chart.CornerRadius = New CornerRadius(7.0)
        chart.ShadowEnabled = True
        'chart标题
        Dim Title As New Title
        Title.Text = "Visifire图表演示"
        Title.padding = New Thickness(0.0,10.0,15.0,10.0)
        chart.Titles.Add(Title)

        Dim tip = New Visifire.Charts.tooltip()
        tip.VerticalAlignment = VerticalAlignment.Bottom
        tip.Text = "Visifire图表演示Tip"
        chart.tooltips.Add(tip)

        Dim legend = New Legend()
        chart.Legends.Add(legend)

        Dim axi As New Axis         axi.Title = "X轴参数代表含义"         'X轴刻度类型         axi.IntervalType = Visifire.Charts.IntervalTypes.Number         'X轴刻度间隔         axi.Interval = 2.0         chart.AxesX.Add(axi)         Dim axiY As New Axis         'Y轴参数最小值         axiY.AxisMinimum = 1         'Y轴参数后缀         axiY.Suffix = ".00"         'y轴参数前缀         axiY.Prefix = "数字:"         axiY.Title = "Y轴参数代表含义"         chart.AxesY.Add(axiY)         '图表中的单个数据线         Dim dataSerIEs As New DataSerIEs         '单个数据线         dataSerIEs.RenderAs = Visifire.Charts.RenderAs.Column         dataSerIEs.LegendText = "数据线1"         Dim count As Integer = 6         Dim random As New Random()         For i As Integer = 0 To count - 1             '单个数据线中的数据点             Dim dataPoint As New DataPoint             dataPoint.YValue = random.Next(1,100)             dataPoint.tooltipText = (i + 1).ToString + "-" + dataPoint.YValue.ToString()             'AddHandler dataPoint.MouseleftbuttonUp,New RoutedEventHandler(AddressOf dataPointMouseleftBtnUp)             dataSerIEs.DataPoints.Add(dataPoint)         Next         Dim dataSerIEs2 As New DataSerIEs         '单个数据线         dataSerIEs2.RenderAs = Visifire.Charts.RenderAs.Column         dataSerIEs2.LegendText = "数据线2"         Dim count2 As Integer = 6         Dim random2 As New Random()         For i As Integer = 0 To count - 1             '单个数据线中的数据点             Dim dataPoint2 As New DataPoint             dataPoint2.YValue = random.Next(1,100)             dataSerIEs2.DataPoints.Add(dataPoint2)         Next         chart.SerIEs.Add(dataSerIEs)         chart.SerIEs.Add(dataSerIEs2)         Me.LayoutRoot.Children.Add(chart)

总结

以上是内存溢出为你收集整理的SilverLight-Visifire图表控件简单应用全部内容,希望文章能够帮你解决SilverLight-Visifire图表控件简单应用所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1073765.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存