VisiFire示例

VisiFire示例Syntax:LabelText=”#AxisXLabel,#YValue” /> BelowisthechartaftersettingLabelTextproperty:   Modifiers: Modifier

大家好,又见面了,我是你们的朋友全栈君。

VisiFire示例

Syntax:

<vc:Chart … >

<vc:Chart.Series>

<vc:DataSeries>

<vc:DataSeries.DataPoints>

<vc:DataPoint LabelText=”#AxisXLabel, #YValue” />

</vc:DataSeries.DataPoints>

</vc:DataSeries>

</vc:Chart.Series>

</vc:Chart>

 

Below is the chart after setting LabelText property:

 

labeltext.jpg

 

 

Modifiers:

 

Modifier

Description

#AxisXLabel

Returns the axis label value if axis labels is present for that XValue. Otherwise returns XValue.

#Percentage

Returns the percentage value with respect to DataPoints in that series.

#Series

Returns the series name.

#Sum

Returns sum of values in entire chart with same XValue. (Used for stacked charts only)

#XValue

Returns XValue.

#YValue

Returns YValue.

#ZValue

Returns ZValue.

#Open

Returns Open value.

#Close

Returns Close value.

#High

Returns High value.

#Low

Returns Low value.

 

Remarks:

  1. The above modifiers are applicable for LabelText set in DataPoint or DataSeries only.

  2. Modifiers can be used in any combination to display DataPoint specific content.

  3. To display the modifier itself use the ‘#’ twice. For example to display “#XValue” as label use LabelText=”##XValue”

  4. The default value for LabelText in Pie/Doughnut and Funnel charts is “AxisXLabel, #YValue”.

  5. The default value for LabelText in CandleStick and Stock charts is “#Close”.

  6. The default value for LabelText in all other charts is “#YValue”.

  7. For CandleStick and Stock charts, LabelText can be set as LabelText=”#Open, #Close, #High, #Low, #YValue”. For CandleStick and Stock charts, volume information can be stored in YValue property and can be showed as a LabelText for DataPoints. Note that YValue property is not being used in CandleStick and Stock charts.

  8. For Stacked charts, percentage will be calculated from the DataPoints present in each XValue. In other words, percentage will be calculated for stacked DataPoints (in each XValue) from all series.

  9. For CandleStick and Stock charts, percentage will be calculated for Closing price in DataPoints.

示例:

      Chart chart = new Chart();
            chart.ScrollingEnabled = true;
            chart.View3D = false;

            Title title = new Title();
            title.Text = Title+”血型统计(按月分组)”;
            chart.Titles.Add(title);

            Axis axis = new Axis();
            axis.IntervalType = IntervalTypes.Number;
            axis.Suffix = “月”; 
            axis.Interval = 1;
            axis.Title = “血型”;
            chart.AxesX.Add(axis);

            Axis yaxis = new Axis();
            yaxis.Enabled = true;
            // 坐标轴类型,可以是primary或secondary,这个属性只能用于Y轴,只有在设置了DataSeries的AxisYType属性后才会启用
            yaxis.AxisType = AxisTypes.Primary;
            chart.AxesY.Add(yaxis);

            //血型总共5个种类:A,B,AB,O,未知
            string[] bloodType = new string[5] { “A”, “B”, “AB”, “O”, “未知” };
            int[] months = new int[12] {1,2,3,4,5,6,7,8,9,10,11,12};
            for (Int32 j = 0; j < bloodType.Length; j++)
            {

                DataSeries dataSeries = new DataSeries();

                string blood=bloodType[j];
                dataSeries.Name = blood;
                dataSeries.RenderAs = RenderAs.Column;
                dataSeries.ShowInLegend = true;
                dataSeries.XValueType = ChartValueTypes.Numeric;
                dataSeries.ToolTipText = “#Series型血,袋数:#YValue,#AxisXLabel”;

                DataPoint dataPoint;
                for (int i = 0; i < months.Length; i++)
                {

                    dataPoint = new DataPoint();
                    int month = months[i];
                    dataPoint.XValue = month;

                    int count = 0;
                    if (j == 4)
                    {

                        count = list.Where(a => string.IsNullOrWhiteSpace(a.BloodType) && a.FiltrDate.Month.Equals(month)).Count();
                    }
                    else
                    {

                        count = list.Where(a => a.BloodType == blood && a.FiltrDate.Month.Equals(month)).Count();
                    }

                    if (count > 0)
                    {

                        dataPoint.LabelEnabled = true;
                        dataPoint.LabelStyle = LabelStyles.OutSide;
                    }
                    else
                    {

                        dataPoint.LabelEnabled = false;
                    }
                    dataPoint.YValue=count;

                    dataSeries.DataPoints.Add(dataPoint);
                }

                chart.Series.Add(dataSeries);
            }
            BloodChart.Children.Add(chart);

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/162776.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 1DCNN理解

    1DCNN理解1DCNN理解其实这更像一个滑动窗口

    2022年5月3日
    51
  • 图像分割必备知识点 | Unet详解 理论+ 代码

    图像分割必备知识点 | Unet详解 理论+ 代码文章转自:微信公众号【机器学习炼丹术】。文章转载或者交流联系作者微信:cyx645016617Unet其实挺简单的,所以今天的文章并不会很长。喜欢的话可以参与文中的讨论、在文章末尾点赞、在看点一下呗。0概述语义分割(SemanticSegmentation)是图像处理和机器视觉一个重要分支。与分类任务不同,语义分割需要判断图像每个像素点的类别,进行精确分割。语义分割目前在自动驾驶、自动抠图、医疗影像等领域有着比较广泛的应用。上图为自动驾驶中的移动分割任务的分割结果,可以从一张图片中有效的识别

    2022年6月16日
    56
  • linux中安装程序的命令是,Linux安装软件命令是什么

    Linux安装软件命令是什么一、使用dpkg命令安装deb安装包文件Debian软件包命名遵循下列约定:-.deb安装步骤:1、找到相应的软件包,比如xx.deb,下载到本机某个目录;2、cdxx.deb所在的目录;3、sudodpkg-ixx.deb。卸载步骤:1、sudodpkg-rxxSoftName。使用apt在线安装、卸载sudoaptinstallsudoapt…

    2022年4月10日
    53
  • php 开启opcode,php 开启 opcode 测试

    php 开启opcode,php 开启 opcode 测试php 开启 opcode 测试 合理使用 实验环境系统信息 Linuxlocalho localdomain3 10 0 514 10 2 el7 x86 64 1SMPFriMar30 04 05UTC2017x86 64×86 64×86 64GNU Linux 内存 512MCPU1 核 PHP 版本 PHP7 0 21 amp ZendOPcach

    2025年7月3日
    4
  • APP抓包——Fiddler工具

    APP抓包——Fiddler工具Fiddler简介:Fiddler是强大且好用的Web调试工具之一,它能记录客户端和服务器的http和https请求,允许你监视,设置断点,甚至修改输入输出数据。Fiddler的运行机制其实就是本机上监听8888端口的http代理。对于PC端Fiddler启动的时候默认IE的代理设为了127.0.0.1:8888,而其他浏览器是需要手动设置的,所以如果需要监听PC端Chrome网络请求,…

    2022年5月29日
    50
  • HTML+CSS实战(一)——导航条菜单的制作

    HTML+CSS实战(一)——导航条菜单的制作一、垂直导航菜单的制作1、基本的样式清除:*{margin:0;padding:0}2、无序列表圆点去除:ul{list-style:none}3、下划线去除:a{text-decoration:none}4、文本缩进标签text-indent不会影响总体宽度(padding会)5、使用行高line-height可以实现文字默认居中,前提是行高和width相等。6、

    2022年7月22日
    10

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号