Exemplo n.º 1
0
        public XYpairs(List <string> vars, Color color)
        {
            _pairs = new List <XYpair>();

            for (int i = 0; i < vars.Count; i++)
            {
                for (int j = i + 1; j < vars.Count; j++)
                {
                    XYpair pair = new XYpair {
                        xvar = vars[i], yvar = vars[j], color = color
                    };
                    _pairs.Add(pair);
                }
            }
        }
Exemplo n.º 2
0
        public DxScatterplot(DxScatterplotSettings settings, DataTable mydt, XYpair pair)          //, string xvar, string yvar, string titleinput, string colorsby)
        {
            _settings            = settings;
            _settings.xaxisvar   = pair.xvar;
            _settings.yaxisvar   = pair.yvar;
            _settings.paneLevels = new List <string>();

            DataTable dataxy = GetXYData(mydt);

            ConstructScatterplot(dataxy);
            FormatChart();

            if (corrs != null)
            {
                this.n = corrs.n;
            }
        }
Exemplo n.º 3
0
        public XYpairs(List <string> xvars, List <string> yvars)
        {
            _pairs = new List <XYpair>();

            for (int i = 0; i < xvars.Count; i++)
            {
                for (int j = 0; j < yvars.Count; j++)
                {
                    if (xvars[i] != yvars[j])
                    {
                        XYpair pair = new XYpair {
                            xvar = xvars[i], yvar = yvars[j]
                        };
                        _pairs.Add(pair);
                    }
                }
            }
        }
Exemplo n.º 4
0
        public XYpairs(List <string> vars, List <string> rptmeas, XYpairType type)
        {
            _pairs = new List <XYpair>();
            string x = "";
            string y = "";

            if (type == XYpairType.AllVars_IgnoreLevelsOfRptMeas)
            {
                for (int j = 0; j < (vars.Count - 1); j++)
                {
                    for (int k = j + 1; k < vars.Count; k++)
                    {
                        if (j != k)
                        {
                            x = String.Format("{0}", vars[j]);
                            y = String.Format("{0}", vars[k]);
                            XYpair pair = new XYpair {
                                xvar = x, yvar = y
                            };
                            _pairs.Add(pair);
                        }
                    }
                }
            }
            else if (type == XYpairType.DiffVar_WithinLevelsOfRptMeas)
            {
                for (int i = 0; i < rptmeas.Count; i++)
                {
                    for (int j = 0; j < (vars.Count - 1); j++)
                    {
                        for (int k = j + 1; k < vars.Count; k++)
                        {
                            x = String.Format("{0}_{1}", rptmeas[i], vars[j]);
                            y = String.Format("{0}_{1}", rptmeas[i], vars[k]);
                            XYpair pair = new XYpair {
                                xvar = x, yvar = y
                            };
                            _pairs.Add(pair);
                        }
                    }
                }
            }

            else if (type == XYpairType.DiffVar_AcrossLevelsOfRptMeas)
            {
                for (int i = 0; i < rptmeas.Count; i++)
                {
                    for (int j = i + 1; j < rptmeas.Count; j++)
                    {
                        for (int k = 0; k < vars.Count; k++)
                        {
                            for (int l = 0; l < vars.Count; l++)
                            {
                                x = String.Format("{0}_{1}", rptmeas[i], vars[k]);
                                y = String.Format("{0}_{1}", rptmeas[j], vars[l]);
                                if ((i != j) & (k != l))
                                {
                                    XYpair pair = new XYpair {
                                        xvar = x, yvar = y
                                    };
                                    _pairs.Add(pair);
                                }
                            }
                        }
                    }
                }
            }

            else if (type == XYpairType.SameVar_AcrossLevelsOfRptMeas)
            {
                if (rptmeas != null)
                {
                    for (int i = 0; i < vars.Count; i++)
                    {
                        for (int j = 0; j < (rptmeas.Count - 1); j++)
                        {
                            for (int k = j + 1; k < rptmeas.Count; k++)
                            {
                                x = String.Format("{0}_{1}", rptmeas[j], vars[i]);
                                y = String.Format("{0}_{1}", rptmeas[k], vars[i]);
                                XYpair pair = new XYpair {
                                    xvar = x, yvar = y
                                };
                                _pairs.Add(pair);
                            }
                        }
                    }
                }
            }
        }