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


C# DataSeries.Add方法代码示例

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


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

示例1: MakeData

 private static commonClass.DataSeries MakeData(databases.tmpDS.marketDataDataTable dataTbl, DataFields type)
 {
     commonClass.DataSeries ds = new commonClass.DataSeries();
     switch (type)
     {
         case DataFields.Count:
             for (int idx = 0; idx < dataTbl.Count; idx++) ds.Add(dataTbl[idx].val0); break;
         case DataFields.Volume:
             for (int idx = 0; idx < dataTbl.Count; idx++) ds.Add(dataTbl[idx].val1); break;
         case DataFields.DateTime:
             for (int idx = 0; idx < dataTbl.Count; idx++) ds.Add(dataTbl[idx].onDate.ToOADate()); break;
     }
     return ds;
 }
开发者ID:oghenez,项目名称:trade-software,代码行数:14,代码来源:dataClass.cs

示例2: DataSeries

        public static DataSeries operator <<(DataSeries ds, int n)
        {
            DataSeries retVal = new DataSeries();
            for (int idx = n; idx < ds.Count; idx++) retVal.Add(ds[idx]);
            retVal.FirstValidValue = ds.FirstValidValue - n;
            if (retVal.FirstValidValue < 0) retVal.FirstValidValue = 0;

            return retVal;
        }
开发者ID:nguyenhaiquan,项目名称:trade-software,代码行数:9,代码来源:dataClass.cs

示例3: PlotProfitChart

        public void PlotProfitChart()
        {
            string saveSort = tradeEstimateSource.Sort;
            tradeEstimateSource.Sort = "";
            databases.tmpDS.tradeEstimateDataTable tbl = tradeEstimateSource.DataSource as databases.tmpDS.tradeEstimateDataTable;
            chartPnl.ResetGraph();
            chartPnl.RemoveAllCurves();
            DataSeries xSeries = new DataSeries();
            DataSeries ySeries = new DataSeries();
            for (int idx = 0; idx < tbl.Count; idx++)
            {
                if (!allTransactionMenuItem.Checked && tbl[idx].ignored) continue;
                ySeries.Add((double)tbl[idx].profit);
                xSeries.Add(tbl[idx].onDate.ToOADate());
            }

            //Handle bug in graph for curve with only on point ????
            if (ySeries.Count > 1)
            {
                chartPnl.myGraphObj.SetSeriesX(xSeries.Values, Charts.AxisType.DateAsOrdinal);
                chartPnl.myGraphObj.SetFont(Settings.sysChartFontSize);
                chartPnl.myGraphObj.ChartMarginTOP = constProfitChartMarginTOP;
                chartPnl.myGraphObj.ChartMarginBOTTOM = constProfitChartMarginBOTTOM;

                CurveItem curveItem = chartPnl.myGraphObj.AddCurveBar("profit", ySeries.Values, Settings.sysChartVolumesColor, Settings.sysChartVolumesColor, 1);
                chartPnl.myGraphObj.DefaultViewport();
                chartPnl.PlotGraph();
            }
            tradeEstimateSource.Sort = saveSort;
        }
开发者ID:oghenez,项目名称:trade-software,代码行数:30,代码来源:profitEstimate.cs


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