private static void OnNoteTooltip(ReportManager.ReportEntry entry, ReportManager.ReportGroup reportGroup, Dictionary <string, string> data, List <string> headers, Func <ReportManager.ReportEntry.Note, bool> is_note_applicable_cb)
        {
            //Debug.Log("OnNoteTooltip");
            List <ReportManager.ReportEntry.Note> notes = new List <ReportManager.ReportEntry.Note>();

            entry.IterateNotes(delegate(ReportManager.ReportEntry.Note note)
            {
                if (is_note_applicable_cb(note))
                {
                    notes.Add(note);
                }
            });

            foreach (ReportManager.ReportEntry.Note item in Sort(notes, reportGroup.posNoteOrder))
            {
                ReportManager.ReportEntry.Note current = item;

                string colName = CleanHeader(current.note);

                if (current.value > 0f)
                {
                    AddValue(colName + " (+)", current.value, data, headers);
                }
                else
                {
                    AddValue(colName + " (-)", current.value, data, headers);
                }
            }
        }
        private static void CreateOrUpdateLine(ReportManager.ReportEntry entry, ReportManager.ReportGroup reportGroup, int day, ReportData data)
        {
            addedValue   = float.NegativeInfinity;
            removedValue = float.NegativeInfinity;
            netValue     = float.NegativeInfinity;

            SetLine(entry, reportGroup, day, data);
        }
        public static void SetLine(ReportManager.ReportEntry entry, ReportManager.ReportGroup reportGroup, int day, ReportData data)
        {
            //Debug.Log("cycle: "+day);

            string columnName = (entry.context == null ? reportGroup.stringKey : entry.context);

            if (addedValue != entry.Positive)
            {
                addedValue = entry.Positive;
            }
            if (removedValue != entry.Negative)
            {
                removedValue = entry.Negative;
            }
            if (netValue != entry.Net)
            {
                netValue = entry.Net;
            }
            //pos_notes.Clear();
            //neg_notes.Clear();

            string cleanedColName = CleanHeader(columnName);

            AddValue(cleanedColName + " (+)", addedValue, data.dataGeneral.GetValueSafe(day), data.headersGeneral);
            AddValue(cleanedColName + " (-)", removedValue, data.dataGeneral.GetValueSafe(day), data.headersGeneral);
            AddValue(cleanedColName + " (=)", netValue, data.dataGeneral.GetValueSafe(day), data.headersGeneral);

            if (cleanedColName.Contains("Power Usage"))
            {
                //Debug.Log(cleanedColName + " TOOLTIP POSITIVE:");
                OnNoteTooltip(entry, reportGroup, data.dataPower.GetValueSafe(day), data.headersPower, (ReportManager.ReportEntry.Note note) => IsPositiveNote(note));

                //Debug.Log(cleanedColName + " TOOLTIP NEGATIVE:");
                OnNoteTooltip(entry, reportGroup, data.dataPower.GetValueSafe(day), data.headersPower, (ReportManager.ReportEntry.Note note) => IsNegativeNote(note));
            }

            /*
             *          List<ReportManager.ReportEntry.Note> pos_notes = new List<ReportManager.ReportEntry.Note>();
             *          entry.IterateNotes(delegate (ReportManager.ReportEntry.Note note)
             *          {
             *                  if (note.value > 0f)
             *                  {
             *                          pos_notes.Add(note);
             *                          //Debug.Log("pos "+note.note+" = "+note.value);
             *                  }
             *          });
             *
             *          List<ReportManager.ReportEntry.Note> neg_notes = new List<ReportManager.ReportEntry.Note>();
             * entry.IterateNotes(delegate (ReportManager.ReportEntry.Note note)
             * {
             *  if (note.value < 0f)
             *  {
             *      neg_notes.Add(note);
             *      //Debug.Log("neg " + note.note + " = " + note.value);
             *  }
             * });
             */
        }
 private static void CreateHeader(ReportManager.ReportGroup reportGroup)
 {
     Debug.Log("header: " + reportGroup.stringKey);
 }