예제 #1
0
        public static PlotModel CreateChart(
            this StatisticsCollection statisticalQuantities,
            string chartName, ChartType chartType = ChartType.Line)
        {
            var data = CreateDataPointCollection(statisticalQuantities);

            return(PlottingUtil.CreatePlotModel(data, chartName, chartType));
        }
예제 #2
0
        public static PlotModel CreateAndPrintChart(
            this StatisticsCollection statisticalQuantities,
            string filePath, string chartName, ChartType chartType = ChartType.Line,
            int width = 640, int height = 480, ChartImageFormat imageFormat = ChartImageFormat.Png)
        {
            var dataCollection = CreateDataPointCollection(statisticalQuantities);

            //ignore if no data
            if (dataCollection.Count == 0)
            {
                return(null);
            }

            //creates chart
            var chartModel = PlottingUtil.CreateAndPrintChart(
                dataCollection, filePath, chartName, chartType, width, height, imageFormat);

            return(chartModel);
        }
예제 #3
0
 public virtual void SaveImage(string imgFilePath, int width, int height, ChartImageFormat format)
 {
     PlottingUtil.ExportChartToImage(imgFilePath, width, height, this.plotView.Model, format);
 }