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


相关推荐

  • 七牛云文件上传_七牛云价格

    七牛云文件上传_七牛云价格七牛云上传图片到七牛云并返回图片URL鸣谢’追逐盛夏流年’:https://blog.csdn.net/j1231230/article/details/80061834在开发项目的时候,经常会用到上传图片的功能,如果把图片全都存放在项目路径下,会导致项目越来越臃肿,因此可以考虑把图片上传交给第三方处理,此处我们采用七牛云进行图片存储。一.七…

    2026年2月17日
    4
  • 黑客帝国代码雨以及其灵活使用——道家真言!!(附带相关知识点)

    黑客帝国代码雨以及其灵活使用——道家真言!!(附带相关知识点)canvasid myCanvas script consts window screen constw myCanvas width s width consth myCanvas height s height constctx myCanvas getContext 2d constp Array Math floor w 10 1 fill 0 con script canvasid myCanvas

    2026年3月18日
    3
  • mac 2022 idea 激活码_在线激活

    (mac 2022 idea 激活码)最近有小伙伴私信我,问我这边有没有免费的intellijIdea的激活码,然后我将全栈君台教程分享给他了。激活成功之后他一直表示感谢,哈哈~https://javaforall.net/100143.htmlIntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,上面是详细链接哦~0VOE…

    2022年3月30日
    152
  • 深度学习:文本CNN-textcnn

    深度学习:文本CNN-textcnn对于文本分类问题,常见的方法无非就是抽取文本的特征,比如使用doc2evc或者LDA模型将文本转换成一个固定维度的特征向量,然后在基于抽取的特征训练一个分类器。然而研究证明,TextCnn在文本分类问题上有着更加卓越的表现。从直观上理解,TextCNN通过一维卷积来获取句子中n-gram的特征表示。TextCNN对文本浅层特征的抽取能力很强,在短文本领域如搜索、对话领域专注…

    2022年4月19日
    124
  • GTX 750等低配显卡如何玩转Deepfakes?[通俗易懂]

    GTX 750等低配显卡如何玩转Deepfakes?[通俗易懂]这里说的Deepfakes软件还是DeepFaceLab,人工智能换脸,是使用深度学习方法来实现的。而深度学习程序对电脑配置要求是非常高的,尤其是跑模型这个环节。很多低配电脑,根本就跑步起来。比如像GTX750,1G显存。默认情况下这种配置肯定跑不了这个程序,但是通过自定义参数也能跑。这对于低配玩家来说绝对是个好消息。首先,你需要获取的DFL的版本为DeepFaceLabCUDA…

    2022年5月20日
    157
  • rpm安装gcc

    rpm安装gcc使用原始安装介质,操作系统为RedHatEnterpriseLinuxServerrelease7.4(Maipo)rpm-ivh\gcc-4.8.5-16.el7.x86_64.rpm\cpp-4.8.5-16.el7.x86_64.rpm\glibc-devel-2.17-196.el7.x86_64.rpm\…

    2022年6月12日
    37

发表回复

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

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