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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 深度学习入门系列1:多层感知器概述

    深度学习入门系列1:多层感知器概述本人正在学习《deeplearningwithpython》–JasonBrownlee,有兴趣的可以一起学习。人工智能系列1:多层感知器概述待更新:人工智能系列2:用Keras构建你的第一个神经网络人工智能系列3:深度学习模型性能评价人工智能系列4:使用keras模型与scikit-learn进行通用机器学人工智能系列5:项目:花种的多分类人工智能系列6:项目:声纳二分类人工智能系列7:项目:波士顿房屋价格回归人工智能系列8:保存模型以便稍后进行序列化人工智能系列9:训练期.

    2022年9月13日
    0
  • siamfc++代码_siacoin

    siamfc++代码_siacoinSiamFC++:TowardsRobustandAccurateVisualTrackingwithTargetEstimationGuidelines摘要。视觉跟踪问题要求对给定目标进行高效的鲁棒分类和精确的状态估计。以往的方法提出了多种目标状态估计方法,但很少有方法考虑到视觉跟踪问题本身的特殊性。在仔细分析的基础上,为高性能通用目标跟踪器的设计提供了一套实用的目标状态估计指导原则。遵循这些指导原则,我们通过引入分类和目标状态估计分支(G1)、无模糊性分类评分(G2)、无先验知识跟

    2022年10月1日
    0
  • Maven的GroupID和ArtifactID的含义「建议收藏」

    标签:目的   left   就会   定义   平时   包名   项目   rep   depend   groupID:是项目组织唯一的标识符,实际对应Java的包的结构,是main目录里Java的目录结构。artifactID:是项目的唯一标识符,实际对应项目的名称,就是项目根目录的名称。 1.基础掌握&lt;groupId&gt;com.yucong.commonma…

    2022年4月14日
    229
  • 对象转JSON首字母大写[通俗易懂]

    对象转JSON首字母大写[通俗易懂]最近在做一个第三方接口,接口给的数据类型如下请求报文如下{“A0144″:”12141256″,”AB6AM”:”中国银行支行”,”STATUS”:1}一般按照对象转JSON会使首字母小写,与接口文档不相符,因此需要转为大写,在字段名称前加@JSONField(name=””)注释即可如下:packagecn.com.cis.acic.util.personHr.vo.request;importcom.alibaba.fastjson.annotation.JS…

    2022年9月16日
    1
  • Python:将列表转为字符串的3种方法「建议收藏」

    Python:将列表转为字符串的3种方法「建议收藏」#一天一个Python小技巧#将列表转为字符串:1、使用for循环testlist=[‘h’,’e’,’l’,’l’,’o’]teststr=”foriintestlist:teststr+=iprint(teststr)2、join方法:testlist=[‘h’,’e’,’l’,’l’,’o’]teststr=””.join(testlist)print(teststr)3、reduce方法:fromfunctools

    2022年5月9日
    51
  • redux-saga入门[通俗易懂]

    redux-saga入门[通俗易懂]redux-saga的介绍、API、使用案例

    2022年9月19日
    0

发表回复

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

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