/// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            string filePath = null;

            if (!DA.GetData <string>(0, ref filePath))
            {
                return;
            }

            ScatterPlotMatrixData data = new ScatterPlotMatrixData();

            data.Data = ChartsUtilities.DataToJsonString(ChartsUtilities.Data2FromCsv(filePath));

            DA.SetData(0, data);
        }
Beispiel #2
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            string filePath = null;

            if (!DA.GetData <string>(0, ref filePath))
            {
                return;
            }

            NormalizedStackedBarChartData data = new NormalizedStackedBarChartData();

            data.Data = ChartsUtilities.DataToJsonString(ChartsUtilities.Data2FromCsv(filePath));

            DA.SetData(0, data);
        }
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            string filePath = null;
            Domain domain   = null;

            if (!DA.GetData <string>(0, ref filePath))
            {
                return;
            }
            DA.GetData <Domain>(1, ref domain);

            GroupedBarChartData data = new GroupedBarChartData();

            data.Data   = ChartsUtilities.DataToJsonString(ChartsUtilities.Data2FromCsv(filePath));
            data.Domain = domain;

            DA.SetData(0, data);
        }
        /// <summary>
        ///     Parallel Coordinates Data.
        /// </summary>
        /// <param name="FilePath">File Path for CSV file.</param>
        /// <returns name="Data">Parallel Coordinates Data.</returns>
        /// <search>parallel, coordinates, data, csv</search>
        public static ParallelCoordinatesData DataFromCSV(
            object FilePath)
        {
            // get full path to file as string
            // if File.FromPath is used it returns FileInfo class
            string _filePath = "";

            try
            {
                _filePath = (string)FilePath;
            }
            catch
            {
                _filePath = ((FileInfo)FilePath).FullName;
            }

            ParallelCoordinatesData data = new ParallelCoordinatesData();

            data.Data = ChartsUtilities.DataToJsonString(ChartsUtilities.Data2FromCsv(_filePath));

            return(data);
        }
        /// <summary>
        ///     Normalized Stacked Bar Chart Data object.
        /// </summary>
        /// <param name="FilePath">Path to a CSV file.</param>
        /// <returns name="Data">Data Class for use with Stacked Bar Chart.</returns>
        /// <search>normalized, data, stacked bar chart, chart, bar, grouped</search>
        public static NormalizedStackedBarChartData DataFromCSV(
            object FilePath)
        {
            // get full path to file as string
            // if File.FromPath is used it returns FileInfo class
            string _filePath = "";

            try
            {
                _filePath = (string)FilePath;
            }
            catch
            {
                _filePath = ((FileInfo)FilePath).FullName;
            }

            NormalizedStackedBarChartData data = new NormalizedStackedBarChartData();

            data.Data = ChartsUtilities.DataToJsonString(ChartsUtilities.Data2FromCsv(_filePath));

            return(data);
        }
Beispiel #6
0
        /// <summary>
        ///     Grouped Bar Chart Data object.
        /// </summary>
        /// <param name="FilePath">Path to a CSV file.</param>
        /// <param name="Domain">Y Domain of a chart.</param>
        /// <returns name="Data">Data Class for use with Grouped Bar Chart.</returns>
        /// <search>data, grouped bar chart, chart, bar, grouped</search>
        public static GroupedBarChartData DataFromCSV(
            object FilePath,
            [DefaultArgumentAttribute("Charts.MiscNodes.GetNull()")] Domain Domain)
        {
            // get full path to file as string
            // if File.FromPath is used it returns FileInfo class
            string _filePath = "";

            try
            {
                _filePath = (string)FilePath;
            }
            catch
            {
                _filePath = ((FileInfo)FilePath).FullName;
            }

            GroupedBarChartData data = new GroupedBarChartData();

            data.Data   = ChartsUtilities.DataToJsonString(ChartsUtilities.Data2FromCsv(_filePath));
            data.Domain = Domain;

            return(data);
        }