Esempio n. 1
0
        public DataRecord AddData(string title, IQueryable <KeyValuePair <string, int> > values, Color color)
        {
            DataRecord record = new DataRecord()
            {
                Key   = title,
                Color = color,
            };

            foreach (string key in values.Select(v => v.Key))
            {
                DataEntity set = new DataEntity()
                {
                    Key   = key,
                    Value = values.FirstOrDefault(v => v.Key == key).Value,
                    Style = new DataEntityStyle
                    {
                        Color = PlainGraphToolkit.GetRandomColor(),
                    },
                };
                record.Set.Add(set);
            }

            records.Add(record);

            return(record);
        }
Esempio n. 2
0
        public DataRecord AddData(string title, Dictionary <int, double> values, Color color)
        {
            DataRecord record = new DataRecord()
            {
                Key   = title,
                Color = color,
            };

            foreach (int key in values.Keys)
            {
                DataEntity set = new DataEntity()
                {
                    Key   = key.ToString(),
                    Value = values[key],
                    Style = new DataEntityStyle
                    {
                        Color = PlainGraphToolkit.GetRandomColor(),
                    },
                };
                record.Set.Add(set);
            }

            records.Add(record);

            return(record);
        }
Esempio n. 3
0
        public DataRecord add_data(string title, Dictionary <int, double> values, Color color)
        {
            var record = new DataRecord {
                Key   = title,
                Color = color,
            };

            foreach (var key in values.Keys)
            {
                var set = new DataEntity()
                {
                    Key   = key.ToString(),
                    Value = values[key],
                    Style = new DataEntityStyle {
                        Color = PlainGraphToolkit.get_random_color(),
                    },
                };
                record.Set.Add(set);
            }

            Records.Add(record);
            return(record);
        }
Esempio n. 4
0
 public DataRecord AddData(string title, Dictionary <int, double> values)
 {
     return(AddData(title, values, PlainGraphToolkit.GetUnusedColor(this)));
 }
Esempio n. 5
0
 public DataRecord AddData(Dictionary <string, double> values)
 {
     return(AddData(string.Empty, values, PlainGraphToolkit.GetUnusedColor(this)));
 }
Esempio n. 6
0
 public DataRecord add_data(string title, Dictionary <int, double> values)
 {
     return(add_data(title, values, PlainGraphToolkit.get_unused_color(this)));
 }
Esempio n. 7
0
 public DataRecord add_data(Dictionary <string, double> values)
 {
     return(add_data(string.Empty, values, PlainGraphToolkit.get_unused_color(this)));
 }