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)
上一篇 2022年7月21日 上午8:36
下一篇 2022年7月21日 上午8:36


相关推荐

  • SPSS(二)SPSS实现多因素方差分析模型(图文教程+数据集)

    SPSS(二)SPSS实现多因素方差分析模型(图文教程+数据集)SPSS(二)SPSS实现多因素方差分析模型单因素方差分析上一篇博客https://blog.csdn.net/LuYi_WeiLin/article/details/89917656已经介绍完毕这篇博客我们主要来学习多因素方差分析多因素方差分析,就是同时考虑若干个控制因素的情况下,分别分析它们的改变是否造成观察变量的显著变动(多个自变量,一个因变量)自变量类型以分类变量为主也可以…

    2022年10月21日
    4
  • 憨批的语义分割重制版6——Pytorch 搭建自己的Unet语义分割平台「建议收藏」

    憨批的语义分割重制版6——Pytorch 搭建自己的Unet语义分割平台「建议收藏」憨批的语义分割13——Pytorch搭建自己的Unet语义分割平台注意事项学习前言什么是Unet模型代码下载Unet实现思路一、预测部分1、主干网络介绍2、加强特征提取结构3、利用特征获得预测结果二、训练部分1、训练文件详解2、LOSS解析训练自己的Unet模型注意事项这是重新构建了的Unet语义分割网络,主要是文件框架上的构建,还有代码的实现,和之前的语义分割网络相比,更加完整也更清晰一些。建议还是学习这个版本的Unet。学习前言还是快乐的pytorch人。什么是Unet模型Unet是一个

    2022年6月15日
    26
  • 理解公网IP和内网IP的区别「建议收藏」

    理解公网IP和内网IP的区别「建议收藏」什么是内网IP、公网IP?内网IP:由图可以看到路由器(第一层),交换机(第二层)然后是自己的电脑,所谓的内网就是从路由器以下开始的。我们内网用户的电脑都是经过交换机和路由器之后才能连到外网。路由器只需一个公网IP就可以供下面多个电脑联网使用。由于不同的内网IP能够重复使用。所以内网IP通常有以下类型:10.0.0.0~10.255.255.255172.16.0.0~172.31.2…

    2022年4月29日
    73
  • linux(11)配置环境变量「建议收藏」

    linux(11)配置环境变量「建议收藏」前言在自定义安装软件的时候,经常需要配置环境变量,下面进行详细解析&nbsp;环境变量配置文件|用户|配置文件||:|:||系统环境|/ect/profil

    2022年7月29日
    11
  • 递归改成循环_递归比循环效率高吗

    递归改成循环_递归比循环效率高吗Java递归,递归改循环为什么大家都说不建议用递归?递归容易造成栈溢出,在jdk1.5前虚拟机给每个栈桢的运行空间128kb,在1.5以后为1m的运行空间.递归是指先进后出,也就是说第一进栈的对象会最后一个出站,然后栈桢的空间只有1m,生产环境的数据需要递归的深度,一般情况下我们无法通过测试来进行模拟。所以对于递归的深度不可把控的情况下,是有栈溢出的风险。一个简单的例子测试递归的深度递…

    2025年12月16日
    4
  • fcntl和select函数彻底搞明白

    fcntl和select函数彻底搞明白fcntl 和 select 函数彻底搞明白 nbsp 第一 fcntl 函数详细使用 nbsp nbsp nbsp nbsp nbsp nbsp fcntl 有强大的功能 它能够复制一个现有的描述符 获得 设置文件描述符标记 获得 设置文件状态标记 获得 设置异步 I O 所有权 获得 设置纪录锁 当多个用户共同使用 操作一个文件的情况 Linux 通常采用的方法就是给文件上锁 来避免共享资源产生竞争的状态 fcntl 文件锁有两种类型 建议性锁和强制

    2026年3月17日
    1

发表回复

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

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