当前位置: 首页>>代码示例>>C#>>正文


C# DataPoint.SetValueXY方法代码示例

本文整理汇总了C#中DataPoint.SetValueXY方法的典型用法代码示例。如果您正苦于以下问题:C# DataPoint.SetValueXY方法的具体用法?C# DataPoint.SetValueXY怎么用?C# DataPoint.SetValueXY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataPoint的用法示例。


在下文中一共展示了DataPoint.SetValueXY方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: uxGamesRepeater_ItemDataBound

        protected void uxGamesRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            UserMeanGameScore mgs = (UserMeanGameScore)e.Item.DataItem;
            //e.Item.FindControl("uxIndividualCharge");

            if (Session["SessionId"] != null)
            {
                Guid sessionId = new Guid(Session["SessionId"].ToString());
                GamesScoreWS.GameScoreService gsClient = new GamesScoreWS.GameScoreService();
                IndividualGameResults igResults = gsClient.FetchIndividualGames(sessionId, mgs.GameId);
                if (igResults.Success)
                {
                    Chart createChart = (Chart)e.Item.FindControl("uxIndividualCharge");
                    createChart.Titles.Add(mgs.Game);
                    Series resultsSeries = createChart.Series["GameScores"];
                    foreach (t_GameResults gr in igResults.GameResultList)
                    {
                        DataPoint dp = new DataPoint();
                        decimal indexical = ((decimal)gr.Score / (decimal)gr.Total) * 100;
                        dp.SetValueXY(gr.Created.ToShortDateString(), indexical);
                        dp.ToolTip = string.Format("{0} out of {1} in {2} seconds", gr.Score, gr.Total, gr.TestDuration);
                        resultsSeries.Points.Add(dp);
                    }
                }
            }
        }
开发者ID:kbinghamibs,项目名称:UMKC5551_Project,代码行数:26,代码来源:Default.aspx.cs

示例2: CreateChart

        public static void CreateChart(string imagePath,string name, IEnumerable<BenchResult> results, Func<BenchResult,double> selector)
        {
            Chart chart = new Chart();
            chart.Width = 500;
            chart.Height = 400;
            chart.Titles.Add(name);
            var area = new ChartArea("Default");
            chart.ChartAreas.Add(area);
            var series = new Series("Default");
            chart.Series.Add(series);
            area.AxisX.LabelAutoFitStyle = LabelAutoFitStyles.LabelsAngleStep90;
            area.AxisX.LabelStyle.TruncatedLabels = false;
            area.AxisX.Interval = 1;
            series.ChartType = SeriesChartType.Column;
            series.IsValueShownAsLabel = true;
            series.XValueType = ChartValueType.String;

            series.YValueType = ChartValueType.Int32;

            foreach(var r in results.OrderBy( r => selector(r)))
            {
                DataPoint point = new DataPoint();
                point.SetValueXY(r.Serializer.Replace("Adapter",""),(int)Math.Round(selector(r)));
                point.AxisLabel = r.Serializer.Replace("Adapter", "");
                series.Points.Add(point);
            }

            chart.SaveImage(imagePath, ChartImageFormat.Png);
        }
开发者ID:etishor,项目名称:SerializationTests,代码行数:29,代码来源:ChartHelper.cs

示例3: SetDataPoint

        private DataPoint SetDataPoint(decimal revenue, string day)
        {
            DataPoint p = new DataPoint();

            p.SetValueXY(day, revenue);
            return p;
        }
开发者ID:appliedi,项目名称:MerchantTribe,代码行数:7,代码来源:WeeklySalesChart.aspx.cs


注:本文中的DataPoint.SetValueXY方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。